this post has nothing to do with the generic theme of the blog, but who cares...
I wanted to create an off-line archive of xkcd.com web comic, and found plenty of shell script to do so, but none packaged the image with the mouseover/tooltip text (which for me was half the fun). So i did, what any self-respecting xkcd reader would do, i went on to create one. So here it is for all the xkcd fans.
The link to download the offline archive (from 1-592 in )
https://dl.getdropbox.com/u/138928/xkcd.cbr
the script used to create it.
################################
#!/bin/bash
#Download all xkcd and package with tooltip text
#3rd June, 2009, created by subiet
for i in `seq 1 592`
do
wget http://xkcd.com/$i/
echo "$(grep http://imgs.xkcd.com/comics/ index.html | head -1 | cut -d\" -f4)" | convert -antialias -background yellow -page 1024x70 text:- $i.jpg
wget `grep http://imgs.xkcd.com/comics/ index.html | head -1 | cut -d\" -f2`
convert -append $(ls -t | tail -n 1) $i.jpg $i.jgp
rm index.html
rm *.jpg
rm *.png
done
###################################
http://twitter.com/subiet
Wednesday, June 03, 2009
XKCD offline archive with Mouseover Text
Posted by Subiet at 9:16 PM
| Hotlinks: DiggIt! Del.icio.us