⇒ ⇒ this is the song that never ends
⇗ ⇓
⇑ yes it goes on and on my friends
⇑ ⇓
⇑ one day we... started singing it
⇑ not knowing what it was
⇑ ⇓
⇑ and now we'll keep on singin' it forever
⇑ just because
⇖ ⇓
⇖ ⇐ ⇐ ⇐ ⇐ ⇐ ⇐ ⇐ ⇐ ⇐ ⇐ ⇙ ⇒ ⇒ metafilter thread
⇗ ⇓
⇑ moan
⇑ ⇓
⇑ complain
⇑ ⇓
⇑ nitpick
⇖ ⇓
⇖ ⇐ ⇐ ⇐ ⇐ ⇙ #!/usr/bin/python
import re
song = """
hey Jude, don't make it bad.
take a sad song and 3:2 better.
remember to let her into your heart,
then you can start 15 11:2 13.
0:3 be afraid.
22 were made 25 go out 10 get 17.
the minute 34 16:2 under 19 skin,
21:2 begin 25:4
40 anytime 52 feel 43 pain, 29:2 refrain,
31 carry 62 world upon 49 shoulders.
for well 60 know that it's 7 fool who plays 56 cool
by making his 70 80 little colder.
na 93:4, 93:4.
29:3 46 me down.
76 have found 47, now 38 40:3
14:15
so 119 130 39:2 133:2 in, 102:2 53,
you're waiting 74 someone 128 perform with.
136 104 76:4 just 152, 140:2 you'll do,
69 movement 152 need is on 122 shoulder.
93:8 101, yeah.
0:18 48:4 160 53:3 192
193 207:4 211, oh!
170 170:8, 180 181...
214:154"""
def f(m):
x, n, z, a = m.group(1, 2, 3, 0)
if not n:
if x: a = words[int(x)].rstrip(',.\n') + z
words.append(a)
return a
for i in range(int(n)): words.append(words[int(x)+i])
if z: words[-1] = words[-1].rstrip('\n') + z
return ' '.join(words[-int(n):])
words = []
print re.sub('(?m)^ *([a-z])', lambda m: m.group(1).capitalize(),
re.sub('(\\d+)(?::(\\d+))?([,.\\n]*)|\\w[^ \\n]*\\n*', f, song))
0 HOME
10 REM AROUND THE WORLD BY DAFT PUNK
20 FOR I = 1 TO 144
30 PRINT "AROUND THE WORLD, ";
40 NEXT I
50 END
« Older Sky Lanterns...... | A Hierarchy of Classic Horror ... Newer »
This thread has been archived and is closed to new comments
posted by jeffamaphone at 8:51 PM on October 28, 2009