On Thu, Sep 20, 2012 at 12:33 PM, Ben Scott <dragonh...@gmail.com> wrote:
> On Thu, Sep 20, 2012 at 11:52 AM, Joshua Judson Rosen > <roz...@geekspace.com> wrote: > > ... thwarted by the unholy amount of hole-iness in the map: > > you can't just start at the center, walk until you hit `the end' > > of the world ... > > Why not? Your suggestion does not disprove his claim that you can't walk to the end since their are several false ends. Personally, I don't think something that tries to walk to the end is all that brutish. =) I mean, I get that not all the tile locations actually > have image files there, but presumably you just get the 404 error and > move on. > > wget hxxp://imgs.xkcd.com/clickdrag/{1..256}{n,s}{1..256}{e,w}.png > > Granted, this would hammer the server with lots of requests for > non-existent files. And I imagine it would take some time to run > through 256*256*2*2 HTTP GET requests. And maybe hit command line > length limits. So polite or efficient, it's not. But if you want > brute force and ignorance.... :) > > I got around the command line issue by dumping a list of generated URLs to a file and then feeding that file to wget: ajohnson@helium:~/tmp/xkcdclickdrag$ for v in n s; do for h in e w; do for x in `seq 100`; do for y in `seq 1 100`; do echo http://imgs.xkcd.com/clickdrag/$y$v$x$h.png; done; done; done; done > urls ajohnson@helium:~/tmp/xkcdclickdrag$ wget -qi urls How's that for brute? =) No where near as elegant as your one-liner, but I like to just loop the hell out of things rather than use some more elegant, but less familiar, syntax. I narrowed it down to x max of 40 and y max of 20 after reading some forum posts. I quit googling for programmatic ways to stitch the pngs together when, after reading a bit of the forum posts for this comic, I realized that others with much more time on their hands would solve the problem much more completely while I focused on not getting fired. =) Side note: I was hoping, or expecting, it would wrap at all the edges. =) Another side note: All this hacking is fun and all, but the panel is much more fun to explore without zooming or mapping. It is just a wicked time sync. I'll probably spend some time with my kids looking around the original version this weekend. Or... maybe we will go out and explore the real world a bit. =)
_______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/