<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#" xmlns:foaf="http://xmlns.com/foaf/0.1/">
<info>
    
    
    
    
    
    
    
    
    
    
    
<title>Flocl</title><biblioid class="uri">http://norman.walsh.name/2006/12/06/flocl</biblioid>
<volumenum>9</volumenum>
<issuenum>120</issuenum>
<pubdate>2006-12-06T09:18:57-05:00</pubdate>
<date>$Date: 2006-12-06 09:34:49 -0500 (Wed, 06 Dec 2006) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2006</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>Flocl: a local copy of your Flickr photostream.</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Photography"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Software"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#XSLT"/>
</info>

<para xml:id="p1">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.</para>

<para xml:id="p2">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.</para>

<para xml:id="p3">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
<wikipedia>Flickr</wikipedia>.</para>

<para xml:id="p4">It was pretty easy to cobble together a Perl script with one of the
<link xlink:href="http://www.flickr.com/services/api/">Flickr API</link>
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.</para>

<para xml:id="p5">I did my best, with images from <uri>norman.walsh.name</uri> and
a some desperate Perl hacking, but it was very
unsatisfying.</para>

<para xml:id="p6">Fast forward a year or so and I'm just about to
<link xlink:href="/2006/itinerary/12-22-vacation">head off</link> to England
again. And I've got the same problem again.</para>

<para xml:id="p7">But this time, I invested a weekend in building a better solution.
I started by updating my
<link xlink:href="/2005/projects/xslflickr">XSL Flickr</link> library and then
I wrote three tools to get the job done.</para>

<orderedlist>
<listitem>
<para xml:id="p8">I wrote <filename>getflickr.xsl</filename> to construct an XML document
that contains all of the information about a Flickr photostream that's available
from the public APIs.</para>
</listitem>
<listitem>
<para xml:id="p9">I wrote <filename>backupflickr</filename> to download all of the images
in that photostream.</para>
</listitem>
<listitem>
<para xml:id="p10">And I wrote <filename>flocl.xsl</filename> 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 <link xlink:href="http://www.flickr.com/">Flickr</link>
site provides: access to images, sets, tags, and even pools (only your images
in each pool, of course).</para>
</listitem>
</orderedlist>

<para xml:id="p11">Then, because information wants to be free, I dropped it all on
<link xlink:href="http://flocl.sourceforge.net/"/> so the next person doesn't
have to reinvent this particular wheel. There's
<link xlink:href="http://flocl.sourceforge.net/sample/web/">a sample</link> 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 <citetitle>Flocl</citetitle>
haven't had much of a shakedown.</para>

<para xml:id="p12">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.</para>

<para xml:id="p13">Share and enjoy.</para>

</essay>

