NaNoGenMo / 2019

National Novel Generation Month, 2019 edition.
97 stars 5 forks source link

[NanoNaNoGenMo] Delta Flight 18, Detroit to London #112

Open rossgoodwin opened 4 years ago

rossgoodwin commented 4 years ago

As I just noted on Twitter, I am deeply honored that my perceived NaNoGenMo-related climate crimes (Ghost Flights) partially inspired Nick Montfort to create NanoNaNoGenMo: https://nickm.com/post/2019/11/nano-nanogenmo-or-nnngm/

As a result, I figured it would only be fair to submit a NanoNaNoGenMo entry myself, so here it is:

python3 -c "import re;k=re.findall(r'\w+|\W+',open('b').read());n=set(k);r=lambda o,l:any(m==b and m in set('aeiou') for m,b in zip(o[::-1],l[::-1]));g={t:[j for j in n if r(t,j)]for t in n};print(''.join(w+' '+g[w].pop()if g[w]else w for w in k))"

I also wrote this one on a flight, this time over the Atlantic & without wifi :)

To run my code, you'll simply need any plain text file named "b" (no extension) in your working directory. Python 3 also required.

Already tested this on some Project Gutenberg novels and books of poetry, and it works great. Will post some output PDFs here later today when I get a chance. Otherwise, this is DONE 💯

rossgoodwin commented 4 years ago

Slight delay in uploading output, as I was traveling for the past week...

I ran the NanoNanoGenMo python script above on Chicago Poems by Carl Sandburg twice to create a version that is over 50,000 words. (The script works by inserting a word between each pair of words in the input text, so running it twice creates a manuscript that is 4x longer than the original.)

The result has kind of a long title:

Chicago drank wait drank Poems left Youth clocks by Carl drank wait Place Sandburg Gaunt Youth Gaunt

Chicago_Poems_4x.pdf

Enjoy!

@dariusk: Please mark this one completed, or let me know if I'm missing something. Thanks!

rossgoodwin commented 4 years ago

BONUS NOVEL

Ulysses appliances by James appliances Joyce Free

(a.k.a. Double Ulysses)

double_ulysses.pdf

hugovk commented 4 years ago

Good stuff, have a "completed" label!