This post is not about barbecue. If you come here for those posts, thanks! But this isn't one of those. This is a nerd thing.

The xkcd comic today is amazing. You should really check it out. The way you have to navigate it is part of the art itself, and it just kind of leads you into this experience of exploration. I really, really like this.

It also inspired me to "get excited and make things" (oh wait, I'm mixing Wil Wheaton up with Randall Munroe), so here is a Python script to download all the component images of the comic and stitch them together in (very) scaled-down single image file. This requires PIL (the Ubuntu package for this is python-imaging and on Mac OS X run pip install pillow). The script has only been tested on Linux works on Linux and Mac OS X (thanks commenters!), and may work on other platforms.

Once you run this (and it should take a while to complete) you'll have the comic pieces at full resolution (PNG files) and a 10M-ish JPEG file with at 1/16th resolution of the whole comic. This is still *big*, but I wanted it so I knew where to look for more hidden surprises after clicking and dragging so much on the xkcd site that my wrist started to hurt.

Your could fool with this script to make the assembled image higher-res if you like. The assembled image also has stark edges; it seems the grass on the ground and cave edges might be stored somewhere other than in the tiled PNGs (or maybe I just have a bug in my script).

I release this script under the terms of the GNU General Public License version 3.

Please don't use this to abuse the terms of the CC-BY-NC license under which xkcd is published.