remove unecessary duplication
This commit is contained in:
parent
1c38aa94e8
commit
e9b8d97a62
1 changed files with 12 additions and 18 deletions
30
post.py
30
post.py
|
@ -24,25 +24,19 @@ except:
|
|||
meta = json.load(open('meta.json', 'r'))
|
||||
takes = json.load(open('takes.json'))
|
||||
|
||||
take = random.choice(takes['templates']).format(
|
||||
ideology = random.choice(takes['ideologies']),
|
||||
ideology2 = random.choice(takes['ideologies']),
|
||||
thing = random.choice(takes['things']),
|
||||
thing2 = random.choice(takes['things']),
|
||||
thing3 = random.choice(takes['things']),
|
||||
site = random.choice(takes['sites']),
|
||||
ideolog = random.choice([i[:-1] + "t" for i in takes['ideologies'] if i.endswith("ism")])
|
||||
)
|
||||
args = {
|
||||
'ideology': random.choice(takes['ideologies']),
|
||||
'ideology2': random.choice(takes['ideologies']),
|
||||
'thing': random.choice(takes['things']),
|
||||
'thing2': random.choice(takes['things']),
|
||||
'thing3': random.choice(takes['things']),
|
||||
'site': random.choice(takes['sites']),
|
||||
'ideolog': random.choice([i[:-1] + "t" for i in takes['ideologies'] if i.endswith("ism")])
|
||||
}
|
||||
|
||||
cw = random.choice(takes['content warnings']).format(
|
||||
ideology = random.choice(takes['ideologies']),
|
||||
ideology2 = random.choice(takes['ideologies']),
|
||||
thing = random.choice(takes['things']),
|
||||
thing2 = random.choice(takes['things']),
|
||||
thing3 = random.choice(takes['things']),
|
||||
site = random.choice(takes['sites']),
|
||||
ideolog = random.choice([i[:-1] + "t" for i in takes['ideologies'] if i.endswith("ism")])
|
||||
)
|
||||
take = random.choice(takes['templates']).format(**args)
|
||||
|
||||
cw = random.choice(takes['content warnings']).format(**args)
|
||||
|
||||
print(take)
|
||||
|
||||
|
|
Loading…
Reference in a new issue