Flocl: Flickr Local

Installing Flocl

You don't need root access or anything special to install flocl.


In order to use flocl, your system must have the following:

  1. A basic XSLT 2.0 processor that supports the Candidate Recommendation drafts of XPath 2.0, XSLT 2.0, and related specifications. It must also support Java extension functions. At the time of this writing, that means you need Saxon 8.8.

  2. Perl with the Digest::MD5 module.

  3. TagSoup.

  4. wget

Getting Started

  1. Download the latest flocl distribution.

  2. Unpack it somewhere. You don't have to install it, it will run from wherever you unpack it.

    The flocl distribution has three directories:


    The flocl code.


    The XSL Flickr libraries that flocl relies on.


    The Java sources (as a NetBeans project) for the MD5 digest extension function that XSL Flickr needs.

  3. Build the MD5 digest code if you're not happy with the jar file in the distribution. Arrange for that jar file to be on your CLASSPATH when you run the XSLT processor.

  4. Edit flocl/bin/runsaxon, flocl/bin/runtagsoup, and flocl/bin/runwget so that they'll work on your system.

  5. Decide where you're going to build your local Flickr. For illustrative purposes, let's assume /share/flocl/.

  6. Create the directories: /share/flocl/, /share/flocl/web/, /share/flocl/web/graphics/, /share/flocl/web/css/, and /share/flocl/web/script/.

  7. Copy the contents of the flocl/graphics, flocl/css, and flocl/script directories in the distribution into the /share/flocl/web/css/ and /share/flocl/web/script/ directories that you just created.

  8. Create the configuration file, /share/flocl/flickr.xml, containing:

    <photos updated="1970-01-01T00:00:00Z"/>

    Yes, really, that's all.

  9. Create /share/flocl/.flocl.xml containing:

    <flocl xmlns="http://flocl.sourceforge.net/ns/config">

    Put your primary email address, according to Flickr, in the space marked “your@email.address”.

Almost ready to go. Next, you need to establish the Flickr API keys. Then you can build your local Flickr.


In order to use services that require authentication, you must apply for (and obtain) your own API key.

After you've obtained an API key, follow the Flickr instructions for obtaining the authentication token for that key. It's a little tricky, but I've tried to make it a little easier.

  1. Edit the details for your key, providing a “Callback URL” that will show you the parameters passed to the URI. You can use http://flocl.sourceforge.net/cgi-bin/apikey.

    (Before you do, however, realize that by doing so you are trusting me not to keep a copy of your API keys values. If I did, I would get read access to all your private photographs. I'm not, but if you don't trust me, don't use my script. But you can still follow my instructions, if you need some help.

  2. Load that apikey URI in your browser.

  3. Fill in the key and secret values from your key and follow the instructions.

When you know your api_key, shared_secret, and auth_token, store them in your /share/flocl/.flocl.xml file.