This pages contains any and all little hacks I've written for Flickr. The list is short. Maybe it will grow. Maybe not.

Feeds of Sets

By design, Flickr does not provide XML feeds of photosets. Photosets can be non-chronological, so a feed doesn't always make sense.Flickr now natively supports feeds of photosets, which is wonderful. You might still fint this script useful if you want more customised control over the number of results to return and the sorting orer of the feed.

That said, oftentimes a photoset is chronological and a feed would be a useful. My Abridged set works this way.

At Hack Day London I put together a little script that will convert a set into a feed.

Usage

http://flickr.ben-ward.co.uk/sets/feed/{set-id}/{number-of-items}/{sort-order}

For example, to produce a feed of 20 items from the Abridged set:

http://flickr.ben-ward.co.uk/sets/feed/72157594435188323/

Note that the number of items and sort order are optional, defaulting to 20 items in descending order. You can use the additional parts of the URL to change those, for example:

The first URL returns 40 items, the latter two return 25 items in ascending and descending order respectively.

There's also a special keyword all to return everything in a set in a single feed. Be aware that large sets will be very slow generate a feed if you use this, and is a little flakey (may not produce any output at all). When it works though, it could be useful for exporting or piping photos without interacting with the ‘real’ API.'

http://flickr.ben-ward.co.uk/sets/feed/72157594435188323/all – returns all photos in a photoset.

Changelog

  1. 6th January 2008 – Updated intro text to reflect Flickr's new, native support for feeds of sets.
  2. 28th August 2007 – Fixed a bug where ampersands were unencoded in the feeds. All titles and descriptions are now parsed for HTML special characters.