crossword viewer

After watching Wordplay, a documentary about crossword puzzle enthusiasts, I got a craving for a good crossword puzzle. That's probably normal.
For a while I'd been thinking about subscribing to the nytimes online crossword, and today I finally gave in. Now, I was already sore about the way they removed features from the free crosswords over the years (they now only offer one crossword per week, and only as a java applet). So I log in to my new, paid subscription and think "I'll just print off a crossword, solve it, and then go to bed! Perfect!"
Nothing is ever perfect. To print the puzzle, you have to use the .puz file. To use the .puz file, you have to run Across Lite. To run Across Lite, you have to download the version for your platform. They thoughtfully provide versions for Linux and OS/2 (first sign of trouble there). The download page mentions Motif libraries. Also, the program doesn't run! (It's not compiled for linux/ppc, and apparently doesn't run on 64-bit processors either.) There's no source code in the tarball, just an ugly little LICENSE file saying I can use the software if I agree to use it "only in machine-readable form" and it goes downhill from there.
A quick google showed no free software replacements for this program. Why not? The puzzle format should be easy enough to figure out. The toughest part is assigning the numbers to the clues and boxes, and if I can do that, surely a computer can.
Normally Chris encourages me to get to bed at a reasonable hour, but tonight he said "Hey, if you're going to stay up to reverse-engineer a file format to write a GPL'd replacement, fine by me!"
So that was my evening. The viewer is available here. You run it on the command line, and it outputs an HTML file on stdout. Just redirect that puppy into a file, print it, and you're done. The program is a perl script, no external modules needed, and it might even turn out to be cross-platform. Enjoy!
To geekery by Beth on
2007-04-06.
About Beth
I am a freelance writer, based in Pittsburgh, PA, specializing in science and technical topics. Yes, I am available for new writing projects!
I was checking out other puz files and I noticed that the copyright symbol in the comments was missing in those. This lead to your code breaking. So, it seems that the comments will all be 3 lines, thus no need to check for the copyright symbol. At least that is my best guess.
Also, I was considering making it output svg as some browsers can read these files and it would be able to create its own black square.
Cheers.
Stay tuned for a version that can output to postscript (which you can easily convert to pdf). Thank Marty for that feature.