blob: 83f8d9a0051dd729f9fbfcdbb395f8ac0056f40a (
plain)
1 Xkcd:1110
2 =========
3 :author: Aaron Ball
4 :email: nullspoon@iohq.net
5
6 == {doctitle}
7
8 I really like the webcomic http://xkcd.com[xkcd]. Its author, Randall, is
9 hilarious. If you don't read this comic, you definitely should.
10
11 Recently Randall http://xkcd.com/1110[drew one] that blew my mind (seriously,
12 there are brains everywhere). He basically made what looks to be a 100x100
13 (there are some empty tiles in there so that's not super accurate) grid of a
14 sad, yet wonderful world. This world, populated by javascript, will take you a
15 tremendous amount of time to scroll through. I can only imagine how much time
16 this took him to make.
17
18 Well, not to put all of that work to waste, but I decided I wanted to assemble
19 the entire grid into a single image. The first step to that is to download the
20 entire grid of images. With that, I wrote a script.
21
22 Currently, that script is downloading all of that commic with a .2 second sleep
23 time between images (no DOSing for me). I will post back here with a zip file
24 containing every image and as soon as I have the time, I will write a script to
25 automagically assemble the entire thing! I will also post that here.
26
27 However, first things first (as I said). The first script to download the
28 entire commic looks like so (yes, I'm sure there are more efficient ways to do
29 this)
30
31 ----
32 #!/bin/bash
33 for n in {0..50..1}; do
34 # Quadrant 1
35 for e in {0..50..1}; do
36 wget "http://imgs.xkcd.com/clickdrag/"$n"n"$e"e.png" && echo $n"n"$e"e.png"
37 sleep .2;
38 done
39
40 # Quadrant 2
41 for w in {0..50..1}; do
42 wget "http://imgs.xkcd.com/clickdrag/"$n"n"$w"w.png" && echo $n"n"$w"w.png"
43 sleep .2;
44 done
45 done
46
47 for s in {1..50..1}; do
48 # Quadrant 3
49 for w in {0..50..1}; do
50 wget "http://imgs.xkcd.com/clickdrag/"$s"s"$w"w.png" && echo $s"s"$w"w.png"
51 sleep .2;
52 done
53
54 # Quadrant 4
55 for e in {0..50..1}; do
56 wget "http://imgs.xkcd.com/clickdrag/"$s"s"$e"e.png" echo $s"s"$e"e.png"
57 sleep .2;
58 done
59 done
60 ----
61
62 Category:xkcd
63 Category:Linux
64 Category:Scripting
65
66
67 // vim: set syntax=asciidoc:
|