You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

155 lines
2.9 KiB
Python

2 weeks ago
from sys import argv
from random import choice
import textwrap
from time import sleep
first = ['Unloved', 'Unpopular', 'Cheap', 'Distant']
second = ['burden', 'bad person', 'idiot']
adjectives = [
'hateful',
'ugly',
'unloving',
'hostile',
'undesirable',
'avid',
'unenthusiastic',
'unambitious',
'stupid',
'naive',
'dull',
'frivolous',
'dear',
'purposeless',
'unseductive',
'passionless',
'slow',
'unemotional',
'impatient',
'disenchanted',
'coldhearted',
'unattached',
'lovesick',
'hateful',
'unloving',
'unpeaceful',
'unquiet',
'violent',
'immature',
'unsatisfied',
'absent',
]
nouns = [
'hate',
'imperfection',
'disloyalty',
'dullness',
'malfunction',
'detach',
'unattractiveness',
'lateness',
'dislike',
'unspell',
'disapproval',
'aversion',
'distaste',
'rejection',
'dissatisfaction',
'infatuation',
'malevolence',
'despair',
'pride',
'ingratitude',
'sadness',
'bore',
]
adverbs = [
'cheapely',
'anxiously',
'unlovely',
'avidly',
'unplesantly',
'discouragingly',
'coldly',
'uncuriously',
'unkindly',
'unpleasantly',
'unemotionally',
'fondly',
'impatiently',
'unattachedly',
'hatefully',
'unlovingly',
'unseductively',
'painfully',
]
verbs = [
'hates',
'disrespects'
'repels',
'unspells',
'neglets',
'forgets',
'dislikes',
'untie from',
'disapproves',
'unlashes',
'lusts after',
'unwish for',
'sighs for',
'cries for',
'laughs about',
'loses',
]
def maybe(words):
if choice([False, True]):
return ' ' + choice(words)
return ''
def longer():
return (
' My'
+ maybe(adjectives)
+ ' '
+ choice(nouns)
+ maybe(adverbs)
+ ' '
+ choice(verbs)
+ ' your'
+ maybe(adjectives)
+ ' '
+ choice(nouns)
+ '.'
)
def shorter():
return ' ' + choice(adjectives) + ' ' + choice(nouns) + '.'
def body():
text = ''
you_are = False
for i in range(0, 5):
type = choice(['longer', 'shorter'])
if type == 'longer':
text = text + longer()
you_are = False
else:
if you_are:
text = text[:-1] + ': my' + shorter()
you_are = False
else:
text = text + ' You are my' + shorter()
you_are = True
return text
def letter():
text = choice(first) + ' ' + choice(second) + '\n\n' + \
textwrap.fill(body(), 80) + '\n\n' + \
' Yours ' + choice(adverbs) + '\n\n' + \
' Alessia' + '\n'
return text.upper() if (len(argv) > 1 and argv[1] == '-c') else text
print('')
while True:
print(letter())
sleep(12.0)