/usr/share/pyshared/fabulous/gotham.py is in python-fabulous 0.1.5+dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | """
fabulous.gotham
~~~~~~~~~~~~~~~
I implement functions to satisfy your darker side.
"""
import sys
import random
import itertools
them = ['angels', 'mourners', 'shadows', 'storm clouds', 'memories', 'condemned',
'hand of Heaven', 'stroke of death', 'damned', 'witches', 'corpses']
them_verb = ['follow', 'hover close', 'approach', 'loom', 'taunt',
'laugh', 'surround', 'compell', 'scour']
adj = ['cold', 'dead', 'dark', 'frozen', 'angry', 'ghastly', 'unholy', 'cunning', 'deep',
'morose', 'maligned', 'rotting', 'sickly']
me_part = ['neck', 'heart', 'head', 'eyes', 'soul', 'blood', 'essence', 'wisdom']
feeling = ['pain', 'horror', 'frenzy', 'agony', 'numbness', 'fear', 'love',
'terror', 'madness', 'torment', 'bitterness', 'misery']
angst = ['care', 'understand', 'question']
me_verb = ['flee', 'dance', 'flail madly', 'fall limply', 'hang my head', 'try to run',
'cry out', 'call your name', 'beg forgiveness', 'bleed', 'tremble', 'hear']
action = ['sever', 'crush', 'mutilate', 'slay', 'wound', 'smite', 'drip',
'melt', 'cast', 'mourn', 'avenge']
place = ['the witching hour', 'the gates of hell', 'the door', 'the path', 'death',
'my doom', 'oblivion', 'the end of life', 'Hell', 'nothingness', 'purgatory',
'void', 'earth', 'tomb', 'broken ground', 'barren land', 'swirling dust']
def lorem_gotham():
"""Cheesy Gothic Poetry Generator
Uses Python generators to yield eternal angst.
When you need to generate random verbiage to test your code or
typographic design, let's face it... Lorem Ipsum and "the quick
brown fox" are old and boring!
What you need is something with *flavor*, the kind of thing a
depressed teenager with a lot of black makeup would write.
"""
w = lambda l: l[random.randrange(len(l))]
er = lambda w: w[:-1]+'ier' if w.endswith('y') else (w+'r' if w.endswith('e') else w+'er')
s = lambda w: w+'s'
punc = lambda c, *l: " ".join(l)+c
sentence = lambda *l: lambda: " ".join(l)
pick = lambda *l: (l[random.randrange(len(l))])()
while True:
yield pick(
sentence('the',w(adj),w(them),'and the',w(them),w(them_verb)),
sentence('delivering me to',w(place)),
sentence('they',w(action),'my',w(me_part),'and',w(me_verb),'with all my',w(feeling)),
sentence('in the',w(place),'my',w(feeling),'shall',w(me_verb)),
sentence(punc(',', er(w(adj)),'than the a petty',w(feeling))),
sentence(er(w(adj)),'than',w(them),'in',w(place)),
sentence(punc('!','oh my',w(me_part)),punc('!','the',w(feeling))),
sentence('no one',s(w(angst)),'why the',w(them),w(them_verb + me_verb)))
def lorem_gotham_title():
"""Names your poem
"""
w = lambda l: l[random.randrange(len(l))]
sentence = lambda *l: lambda: " ".join(l)
pick = lambda *l: (l[random.randrange(len(l))])()
return pick(
sentence('why i',w(me_verb)),
sentence(w(place)),
sentence('a',w(adj),w(adj),w(place)),
sentence('the',w(them)))
def main(args):
"""I provide a command-line interface for this module
"""
print
print "-~*~--~*~--~*~--~*~--~*~--~*~--~*~--~*~--~*~--~*~-"
print lorem_gotham_title().center(50)
print "-~*~--~*~--~*~--~*~--~*~--~*~--~*~--~*~--~*~--~*~-"
print
poem = lorem_gotham()
for n in range(16):
if n in (4, 8, 12):
print
print poem.next()
print
if __name__ == '__main__':
main(sys.argv)
|