Tuesday, April 26, 2005

Flickr API for Ruby

Flickr logoFound a link on the Flickr site to a Flickr API for Ruby library. Looks pretty good and inludes image upload capabilities. I like the documentation:
# see code to understand stuff
Well, fortunately, I can understand the code, which is straightforward enough but bears the mark of Python styling, with underscored variable names and methods indicating "hidden".
@__id = id
@__owner = owner
@__dateuploaded = dateuploaded
Perfectly OK code, but not how I'd do it. Nonetheless, all I need is a decent library so that I can build some commandline tools so that I can do things like:
ls -1 . fam*.jpg| xargs -i flickr_upload --family=1
--public=0 --tags='family' {}
Not pretty if you're not a commandline person, but it's nice to be able to just run the command and go have supper rather than upload six at a time through the web interface.

Hope to get something going in the next week along this road.