init
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import random
|
||||
import re
|
||||
|
||||
templates = open("template.txt").read().splitlines()
|
||||
delivery = open("delivery.txt").read().splitlines()
|
||||
events = open("event.txt").read().splitlines()
|
||||
|
||||
def fill(line):
|
||||
line = re.sub(r"\{DELIVERY\}", lambda _: f"[{random.choice(delivery)}]", line)
|
||||
line = re.sub(r"\{EVENT\}", lambda _: f"[{random.choice(events)}]", line)
|
||||
return line
|
||||
|
||||
VARIANTS = 10
|
||||
|
||||
scripts = [fill(t) for t in templates if t.strip() for _ in range(VARIANTS)]
|
||||
|
||||
open("scripts.txt", "w").write("\n".join(scripts) + "\n")
|
||||
print(f"{len(scripts)} scripts written to scripts.txt")
|
||||
Reference in New Issue
Block a user