An open API service indexing awesome lists of open source software.

https://github.com/billstclair/xkcd-click-and-drag

Lisp code to pull down all the images in the XKCD "Click and Drag" comic
https://github.com/billstclair/xkcd-click-and-drag

Last synced: 3 months ago
JSON representation

Lisp code to pull down all the images in the XKCD "Click and Drag" comic

Awesome Lists containing this project

README

          

On Wednesday, September 19, 2012, XKCD's cartoon was entitled "Click and Drag": http://xkcd.com/1110/

I wrote some lisp code to pull down all the image files and create a huge HTML table to display them. The table shows the images reduced from 2048x2048 to 256x256. Click on part of the image to show that square in full resolution (in a new window/tab).

The result is viewable at http://billstclair.com/click-and-drag/

Boing Boing (http://boingboing.net/2012/09/19/xkcds-14-foot-wide-click-and.html) has provided a link to a site that provides a fully-zoomable dynamic map of the whole space, including some images I missed, since I only walked the space directly connected to the starting point: http://xkcd-map.rent-a-geek.de/

The lisp code is in "source/xkcd.lisp". Load it by cd'ing to the project directory, and executing "./start [slime-port]", or by starting a lisp and executing (load "start").

I have only tested it in Clozure Common Lisp on a Macintosh.

(xkcd:pull-all)
Pull all the files down from xkcd.org, and store them in the www/images directory

(xkcd:reduce-files)
Reduce the size of the files in www/images to 256x256 and write in www/small-images

(xkcd:write-html-table)
Write www/index.html, a big table displaying all the files downloaded by pull-all.

(xkcd:pull-reduce-and-index)
Call pull-all, reduce-files, and write-html-table.

There are 212 image files, each 2048x2048 pixels.

The table is 27 images high and 81 images wide, from 19s33w to 8n48e in the coordinate system of the file names. That's 2187 table cells, only 212 of which contain anything but white.

map.txt shows a simple map of which table locations are filled.

Licensed under THE BILL ST. CLAIR LICENSE (BSCL). See license.txt.