Volume 9, Issue 120; 06 Dec 2006; last modified 08 Oct 2010

Flocl: a local copy of your Flickr photostream.

What happened was, last year, I went to England to visit my folks. Before I went, I was sure that they'd want to see photographs from family events and recent trips.

No problem, just grab the external drive onto which I archive photographs and…hold on a moment. I made the mistake once of trying to use every photograph that I took on a particular trip as a kind of photo album/slide show/scrap book. It was a disaster of the sort you see parodied on television where some poor family is subjected to eleven hours of the neighbor's vacation slides.

I knew not to make that mistake again. Thinking about how to cull the collection, I realized that the easiest way to discriminate between the entire set of photographs and a more reasonable subset of interesting ones was to take the photographs that I'd uploaded to Flickr.

It was pretty easy to cobble together a Perl script with one of the Flickr API modules that could find and download all my images. Trouble is, that results in an essentially random arrangement of photographs; there's no rhyme or reason to the names of the images.

I did my best, with images from norman.walsh.name and a some desperate Perl hacking, but it was very unsatisfying.

Fast forward a year or so and I'm just about to head off to England again. And I've got the same problem again.

But this time, I invested a weekend in building a better solution. I started by updating my XSL Flickr library and then I wrote three tools to get the job done.

  1. I wrote getflickr.xsl to construct an XML document that contains all of the information about a Flickr photostream that's available from the public APIs.

  2. I wrote backupflickr to download all of the images in that photostream.

  3. And I wrote flocl.xsl to build a set of web pages that expose an interface on the local backup images that's inspired by the sorts of things that the Flickr site provides: access to images, sets, tags, and even pools (only your images in each pool, of course).

Then, because information wants to be free, I dropped it all on http://flocl.sourceforge.net/ so the next person doesn't have to reinvent this particular wheel. There's a sample online, so you don't actually have to install it to see what it looks like. This may be a good thing: the instructions I wrote for installing and using Flocl haven't had much of a shakedown.

I've tried to make the HTML pages valid and I've used class names and CSS to do most of the layout. I don't claim any particular skill as a graphic designer so if someone's inspired to give the design a little boost with more sophisticated CSS, that'd be cool. Otherwise, I think it's pretty complete.

Share and enjoy.


Thank you very much, Norman, it is very nice and it worked seamlessly following your instructions. The only thing I noticed is that the original file (XXX_b.jpg) is not always present, thus the slideshow is not always working; replacing the images used in slideshow mode with XXX.jpg works fine.

—Posted by Alberto Bolchini on 08 Dec 2006 @ 09:58 UTC #

Thanks Norman, it works really great!

—Posted by Mike on 11 May 2007 @ 01:49 UTC #