Alan Johnson <a...@datdec.com> writes:
>
> 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. =)

Well, it's at least barbarian ;)


> > 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

xargs FTW. Though, actually..., you should be able to just pipe
stdout from that loop directly into "wget -qi", shouldn't you?

But, if you want be more *magically bruticious*, try parallel:

    http://www.gnu.org/software/parallel/

You can also use cURL in stead of wget, and just use cURL's range/set syntax:

    curl -f -JO 'http://imgs.xkcd.com/clickdrag/[1-100]{n,s}[1-100]{e,w}.png'


> 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. =)

Yeah. See, that's all part of the `moral-ambiguity' (as opposed to
`moral ambiguity') part of the story.

Most. Evil. Comic. Ever. :)

-- 
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to