Cooliris-enabled scrapbook

There’s more 3D goodness for you to enjoy now that the Mapping our Anzacs scrapbook is Cooliris-enabled. If you have Cooliris installed, you’ll notice that the Cooliris icon on your browser toolbar lights up when you visit the site. Just click on the icon to browse all the photos posted to the scrapbook on a glorious 3D wall.

Scrapbook posts in 3D
Scrapbook posts in 3D

(If you don’t have Cooliris then go and get it. It can be used both in Internet Explorer and Firefox, though you’ll probably need to have admin rights to install for IE.)

Having given the 3D treatment to digitised files from the National Archives of Australia and portrait images from the Australian Dictionary of Biography, it wasn’t too hard to do. The scrapbook is a Tumblr site and the api makes it easy to extract all the photos. So I created a php file to gather all the details and then write them to a media-rss file. Then it was just a matter of  inserting a link to it in the scrapbook.

Code follows:

[code language=”php”]

loadHTML($result);
$xpath = new DOMXPath($dom);
$attrs = $xpath->evaluate(“//posts/@total[1]”);
foreach ($attrs as $attr) {
$total = $attr->nodeValue;
}
$num_pages = ceil($total/50);
$start_next = $start+50;
$start_previous = $start-50;

echo “n”;
echo “n”;
echo “n”;
echo “Mapping our Anzacs scrapbookn”;
echo “Photos posted to the Mapping our Anzacs scrapbookn”;
echo “http://our-anzacs.tumblr.comn”;
if ($start_previous >= 0) {
echo ““;
}
if ($start_next <= $total) { echo "
n”;
echo “
n”;
?>

[/code]

This work is licensed under a Creative Commons Attribution 4.0 International License.

Tim Sherratt Written by:

I'm a historian and hacker who researches the possibilities and politics of digital cultural collections.

4 Comments

  1. March 12, 2010
    Reply

    just installed Greasemonkey, your script and then Cooliris…OMG…what a way to browse images…certainly brings the archives to life not to mention the photos of the kids from the desktop! thanks heaps Tim.

    Now I’m trying to work out if I can cut and paste an url such as http://proarchives.imagineering.com.au/index_search_results.asp into the cooliris url so that i can browse images off specific sites?

    Cheers, asa

    • March 14, 2010
      Reply

      The short answer is no. In order to do its magic, CoolIris needs a nicely formatted Media RSS feed. The RSS feed includes the links for the thumbnail, the full-size image, a caption and a link to the site. If the site itself doesn’t supply it, there are some DIY possibilities, but they’re not entirely straightforward.

      The archives browser userscript achieves this by first extracting a file barcode from the page and then sending this barcode off to a php script sitting on my server. Because the image locations are all based on the barcode, the php script can use it to build a Media RSS feed. The ‘View in 3D’ button launches CoolIris using the url of the php script.

      The Mapping our Anzacs scrapbook uses a different approach. First of all I had access to the template, so I could insert a link directly rather than with a userscript. The link again goes to a php script, but this time it uses the Tumblr API to gather the info it needs to build the RSS feed.

      In theory, you should be able to write a userscript that extracts all the information you need from a page of thumbnails to generate the Media RSS feed. Indeed, I’ve done this for the online photo collections at the PROV. The problem is that there’s currently no way of directly loading this feed into the CoolIris plugin. The best you can do is load it into a ‘flat’ slideshow using the CoolIris default javascript option. It looks quite nice, but it’s no 3D wall. If you want to see it in action, then install this userscript and go the the public transport photos.

      If you want the full 3D CoolIris experience then you need something a bit more complicated. If the server is using GET to return search results, then it should be possible to use a userscript to send the current search to a php or python script somewhere else. This script could then do all the parsing, pull out the details and return them as an RSS feed.

      The PROV site doesn’t allow this. So the only way I could see to CoolIris-enable it from the outside would be to have a userscript extract the image details then send them on to a server script somewhere to generate the feed. I had a go at this, but ran into a problem with the length of the querystring that was being passed.

      Of course, the best solution would be to write and deliver the Media RSS feed from the PROV servers themselves! Or even better, make all the data available through an API or as Open Linked Data and leave it to users to develop all sorts of cool new interfaces.

  2. June 14, 2010
    Reply

    […] discontents – Cooliris-enabled scrapbook There’s more 3D goodness for you to enjoy now that the Mapping our Anzacs scrapbook is Cooliris-enabled. If you have Cooliris installed, you’ll notice that the Cooliris icon on your browser toolbar lights up when you visit the site. Just click on the icon to browse all the photos posted to the scrapbook on a glorious 3D wall. (tags: cooliris) […]

  3. […] viewers will recall my previous encounters with CoolIris — Archives in 3D and CoolIris enabled scrapbook — but these relied on having the CoolIris plugin installed. The embeddable Flash version […]

Leave a Reply

Your email address will not be published. Required fields are marked *