This system will automatically download and print the day's crossword puzzle from the Houston Chronicle. It also saves an answer key to your home directory. Alter as needed.
I had to modify the original source code to have it do the answer key. That's the second program. If you are a coder and know how to combine this into a single program, be my guest. Credit to the author, I only hacked his code to make the second program and changed the script to bash (and used LPR instead of GS for printing):
This is my first HOWTO so it probably has mistakes; I'll correct as they're found.
Step 1 - Create working directories
We're going to create a temporary directory for setting everything up.
You should do everything else from this directory.
Step 2 - Download and install components
First make sure you have texlive.
Then get the utilities necessary for compiling:
sudo apt-get install texlive texlive-base texlive-base-bin
Next you want to download the file that is attached to this post. Scroll down and get it Then come back and run this:
sudo apt-get install psutils build-essential
This next step is very important, otherwise it will not all convert properly. Run the following program and select "rehash". This allows latex to use the cwpuzzle.sty (which tells it how crossword puzzles work).
tar -xf nytconv2.c.tar.gz
sudo mv nytconv2.c /tmp/crossword/
gcc -o nytconv nytconv.c
gcc -o nytconv2 nytconv2.c
sudo mv nytconv /usr/bin/
sudo mv nytconv2 /usr/bin/
sudo mv cwpuzzle.sty /usr/share/texmf-texlive/tex/latex/base/
Step 3 - Create script file
The follow script file should be enough to get you going. Replace YOURPRINTER with the name of your printer (as shown in System > Administration > Printing). Name the script something like autopuz (that's what I used).
then move it so it can be used from anywhere.
#Processing unsolved puzzle
nytconv today.puz >today.tex
dvips -x 1400 today.dvi
psnup -l -2 -pletter today.ps today.wps
echo \"quit\" >>today.wps
lpr -P YOURPRINTER today.wps
#Processing solved puzzle
nytconv2 today.puz >today2.tex
dvips -x 1400 today2.dvi
ps2pdf today2.ps ~/$todaydate.pdf
rm -f /tmp/crossword/*.*
Step 4 - Decide how you want to run the script
chmod +x autopuz
sudo mv autopuz /usr/local/bin/
You can either create a launcher or run a cronjob (or both!).
For the launcher, I don't need to tell you how to do that. Here's the icon I used:
For a cronjob, I think they update their crosswords pretty early, but I'm not sure when. Either set it for when you know your computer will be on, or if you keep it on all the time, when you know you'll be asleep (unless the printer is in your bedroom).
sudo mv crossword_icon.gif /usr/share/pixmaps/