forked from Wardyn/lgfbot
removed conjugation function. pre-conjugated list
This commit is contained in:
parent
86e4c02f1c
commit
91cd12c2b4
15
lgfbot.py
15
lgfbot.py
|
@ -62,23 +62,14 @@ with open('verbs.txt') as f:
|
|||
verbs = list(map(str.rstrip, f))
|
||||
|
||||
postform = random.choice((
|
||||
'{adjective} {gender} who {verb}',
|
||||
'{adjective} {gender} who {verb}',
|
||||
'{adjective} {gender}',
|
||||
'{gender} who {verb}',
|
||||
))
|
||||
|
||||
gender = random.choice(('lgf', 'lbf', 'elf'))
|
||||
verb = random.choice(verbs)
|
||||
if verb[-2:] == 'ed' and verb[-3] not in {'a', 'e', 'i', 'o', 'u'}:
|
||||
verb = verb[:-2]
|
||||
if verb[-1] in {'a', 'i', 'o', 'u'}:
|
||||
verb = verb + 'es'
|
||||
elif verb[-1] in {'s', 'x'} or verb[-2] in {'s', 'x'} or verb[-2:] == 'ch':
|
||||
verb = verb + 'es'
|
||||
elif verb[-1] == 'y' and verb[-2] not in {'a', 'e', 'i', 'o', 'u'}:
|
||||
verb = verb[:-1] + 'ies'
|
||||
else:
|
||||
verb = verb + 's'
|
||||
adjective = random.choice(adjectives)
|
||||
content = postform.format(adjective=adjective, gender=gender, verb=verb)
|
||||
print(content)
|
||||
session.post(instance + '/api/v1/statuses', data={'status':content, 'visibility':'direct'})
|
||||
session.post(instance + '/api/v1/statuses', data={'status':content, 'visibility':'unlisted'})
|
||||
|
|
Loading…
Reference in New Issue