Xkcd:1110

I really like the webcomic xkcd. Its author, Randall, is hilarious. If you don’t read this comic, you definitely should.

Recently Randall drew one that blew my mind (seriously, there are brains everywhere). He basically made what looks to be a 100x100 (there are some empty tiles in there so that’s not super accurate) grid of a sad, yet wonderful world. This world, populated by javascript, will take you a tremendous amount of time to scroll through. I can only imagine how much time this took him to make.

Well, not to put all of that work to waste, but I decided I wanted to assemble the entire grid into a single image. The first step to that is to download the entire grid of images. With that, I wrote a script.

Currently, that script is downloading all of that commic with a .2 second sleep time between images (no DOSing for me). I will post back here with a zip file containing every image and as soon as I have the time, I will write a script to automagically assemble the entire thing! I will also post that here.

However, first things first (as I said). The first script to download the entire commic looks like so (yes, I’m sure there are more efficient ways to do this)

#!/bin/bash
for n in {0..50..1}; do
  # Quadrant 1
  for e in {0..50..1}; do
    wget "http://imgs.xkcd.com/clickdrag/"$n"n"$e"e.png" && echo $n"n"$e"e.png"
    sleep .2;
  done

  # Quadrant 2
  for w in {0..50..1}; do
    wget "http://imgs.xkcd.com/clickdrag/"$n"n"$w"w.png" && echo $n"n"$w"w.png"
    sleep .2;
  done
done

for s in {1..50..1}; do
  # Quadrant 3
  for w in {0..50..1}; do
    wget "http://imgs.xkcd.com/clickdrag/"$s"s"$w"w.png" && echo $s"s"$w"w.png"
    sleep .2;
  done

  # Quadrant 4
  for e in {0..50..1}; do
    wget "http://imgs.xkcd.com/clickdrag/"$s"s"$e"e.png" echo $s"s"$e"e.png"
    sleep .2;
  done
done

Category:xkcd Category:Linux Category:Scripting