You can now download all xkcd comics in one go using the following bash script.
#!/bin/bash
for i in `seq 1 472`
do
wget http://xkcd.com/$i/
wget `grep http://imgs.xkcd.com/comics/ index.html | head -1 | cut -d\" -f2`
mv `grep http://imgs.xkcd.com/comics/ index.html | head -1 | cut -d\/ -f5 | cut -d\" -f1` $(echo $(echo $i"_")`grep http://imgs.xkcd.com/comics/ index.html | head -1 | cut -d\/ -f5 | cut -d\" -f1`)
rm index.html
done
Made a few modifications to the earlier code so that the comics are named according the sequence that they were put up.
Make the file executable and execute as ::
$sh filename
Happy reading.
September 6, 2008 at 3:39 pm |
Yay….
September 6, 2008 at 5:36 pm |
good good….
creative work !!:)
September 7, 2008 at 12:57 pm |
keep it up dude, niiiccceee!! 🙂
September 7, 2008 at 1:19 pm |
explain that script please !!
September 7, 2008 at 1:57 pm |
See… I told you the first time. Download first and then rename. Don’t try to do both things at the same time… but you don’t listen….
September 7, 2008 at 1:59 pm |
@aditya:: aah…yes…i forget….it was ur idea…thanks for that..and i did the same thing eventually…
so i did listen
September 9, 2008 at 8:32 pm |
wat is dis..
wats dis for??
September 9, 2008 at 8:39 pm |
@aniket:: check the previous posts regarding xkcd … its a webcomic