![]()
Sparqling days in Tuscany was excellent fun and seems to have spawned enough interest to create a small community of developers – ‘the Gargonza Experiment‘. More of that later, but if you’re interested, do mail us – the infrastructure’s not quite there yet but we want to make something that’s completely open and interesting to anyone who wants to play with some (non-commercial) cross-sparqling experiments.
In between all the lovely food and wine I started hacking on a converter from iPhoto data to RDF so we could easily create some data for querying with Sparql. I started using XSLT over AlbumData.xml – bleugh – what horrible XML! and then realised that comments were not exported to AlbumData.xml, so I switched to Applescript to grab out the fields, which more or less works ok but involves a bit of string munging that’s probably somewhat specific to the way I put my photos online. I want to look in more detail about using SKOS for the keywords, but not done that yet.
Finally, I wanted to use the comments field from iPhoto to parse out people depicts data using nicknames from my foaffile. So in a dc:description field (the comment field from iPhoto) you might find
<foaf:Image rdf:about=”http://swordfish.rdfweb.org/photos/2005/04/14/2005-04-14-Images/9.jpg”>
…
<dc:description>ericp and solid soup</dc:description>
…
</foaf:Image>
The python script I created using Sean B. Palmer’s very cool Pyrple API checks each word in that dc:description field and matches it against the foaf:nicks in my foaffile. The we can find out other stuff about the person, such as their name and mbox_sha1sum, and then put that information back in the image description file, like this:
<foaf:Image rdf:about=”http://swordfish.rdfweb.org/photos/2005/04/14/2005-04-14-Images/9.jpg”>
…
<dc:description>ericp and solid soup</dc:description>
<foaf:depicts>
<foaf:Person>
<foaf:name>Eric Prud’hommeaux</foaf:name>
<foaf:mbox_sha1sum>e2d67791b2a0ce3441c0c770f94daa130b4e6d95</foaf:mbox_sha1sum>
<foaf:nick>ericp</foaf:nick>
</foaf:Person>
</foaf:depicts>
</foaf:Image>
I think Edd Dumbill used to do this for his photos but I’ve not found a writeup of it. Anyway, that’s where I got the idea from. I wonder if it might also work for places if we had some property like foaf:visited or somesuch.
It’s all been a bit of an education learning some bits of XSLT I didn’t know and learning applescript (this site was useful) and python (mostly using diveintopython).
All these experiments are available to play with (read the readme first), including the RDF output and my photos from the week. Also check out rdf4food wiki for better photos of that gorgeous part of Tuscany.
Update: Richard Newman reminded me of his iPhoto 4 plugin which is doing something similar. He’s doing a version for iPhoto 5 apparantly
-
Recent Posts
- Archers Avoider
- SVG D3.js bar chart
- Connecting a Wifly shield to an Arduino
- Nanode / twitter blink example
- A node.js bot in XMPP
- Archiving a Mediawiki Installation
- Web [on|and|in|for|with|via|through] TV Workshop
- Some FOAF stats
- Displaying Guardian book reviews for quick buying on Amazon
- Generating specs from RDFS / OWL docs
Archives
- April 2013
- March 2012
- February 2012
- January 2012
- December 2011
- October 2010
- September 2009
- June 2009
- May 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- January 2008
- February 2007
- May 2006
- April 2006
- March 2006
- February 2006
- November 2005
- October 2005
- September 2005
- July 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- April 2004
- March 2004
- February 2004
- December 2003
- October 2003
- September 2003
- August 2003
- July 2003
