[ rexroof.com ] [ biking ] [ blog ] [ work ] [ disposable ] [ crap ] [ code ] [ phone ] [ pictures ] [ yank ] [ url ] [ linklog ]

Tuesday, April 25, 2006

flickr and unix is awesome

I've been toying around with flickr and downloading random images based on tags. I just wrote a one-liner that grabs a random popular flickr tag, it looks like this:


GET http://flickr.com/photos/tags/ | grep '/photos/tags/[a-z]' | cut -f4 -d/ | random -f - | head -1


note: the random command is something I've only found in FreeBSD. it could easily be replaced with a perl one-liner to shuffle.

this prints out a single, random, popular tag from flickr. used in combination with my perl script that picks a random picture based on tag, I can get some randomly awesome pictures:


slather -t `randomtag`


perhaps soon I'll post slather.

0 Comments:

Post a Comment

<< Home