Question 3: A ‘Python’ solution
from os import system, chdir
import inflect
import os.path
system("rm -rf work; mkdir work")
chdir("work")
system("uudecode -o - 03-mooooon > data")
system("gunzip < data > data.xxd")
system("xxd -r < data.xxd > data.zip")
system("unzip data.zip")
inf = inflect.engine()
for i in range(1, 100):
file = "pages/page-" + inf.number_to_words(i) + ".pdf"
if not os.path.isfile(file):
break
system(
"pdftotext - - < " + file +
" | sed -e 's/\014//' | grep . >> data.b64"
)
system("base64 -d - < data.b64 > data.png")
system("strings data.png | tail -20")