Avoiding Crossword Applets

This post discusses a script that converts one frequently used crossword file format into another one with the advantage that it can be loaded into a free software crossword client.

The brilliant cryptic crossword in The Independent is available for free online, but only in the form of a Java applet, generated with the non-free software Crossword Compiler. It’s wonderful that the crossword is published online now, but the way it’s published is irritating for me because of the following things:

  • Unbelievably, given how long they’ve been around, Java applets still have terrible usability problems: in particular they’re slow to load and hang Firefox while they’re doing so.
  • If you accidentally navigate away from the page you lose everything you’ve done in the crossword so far.
  • The applet is fiddly to use – it has to be carefully arranged to fit in the browser window on my netbook and then you can only see a couple of clues at a time. The tiny scrollbar buttons are awkward to hit.
  • There’s no simple way to print the crossword from the applet.

An easy solution to these problems was suggested to me by a post on Dafydd’s livejournal. I hadn’t head of xword before, but it’s a pretty nice gtk interface for doing crosswords and it reads the AcrossLite .PUZ format appropriately liberally, e.g. ignoring the checksums that AcrossLite itself requires.  So, this Python 3 script, called ccj-parse.py will parse the .bin or .ccj file that the applet loads and generates a .puz file which is acceptable to xword.  e.g. example usage:

  ./ccj-parse.py -o foo.puz -t "Independent" -c "© independent.co.uk" \
                 -d 2009-07-24 < c_240709.bin

And here’s an example screenshot showing xword with The Independent crossword from a couple of days ago:

Independent 7103 / Merlin in xword
Independent 7103 / Merlin in xword

This solution works pretty well for me. xword isn’t perfect by any means, but has the advantage that it works well on my netbook’s small screen, and, perhaps most importantly, autosaves your progress. I also like that if you’ve used the “Solve Word” (or “Cheat”) button, the lights are marked with a red triangle in the corner to indicate which ones you had to give up on.

I’ve tested this script on lots of The Indepedent’s cryptic crosswords, and quickly checked that it works on one from the Glasgow Herald, but I’ve no idea how generally it will work.

Someone created a sourceforge project called ccj2puz that suggests it would do the same, but it’s never had any source code uploaded, as far as I can tell, and the author hasn’t replied to the message I sent asking about it.  The basic file format is quite easily guessable from the output of hexdump -C, so I don’t think this is a particularly big deal.

Download

You can get the script from the ccj-to-puz repository on github.

Dependencies

You need the version of xword with Dafydd’s patches to support British-style crosswords which is version 1.0-4 in Debian. (It’s not in Ubuntu yet, but the .deb file installs without any issues on Ubuntu.)

One thought on “Avoiding Crossword Applets”

  1. Nice! I hadn’t heard of the .ccj format before, and it’s great that lots of websites use it so that they can be read by your converter.

    It seems the X-Word upstream is inactive, so the patches probably won’t be upstream any time soon.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>