Playing around with applescript last night I suddenly realized I could have my ichat status as what I was watching on the tv. We have a 4 year old Tivo with a web interface (Tivo web project) and from with our LAN it’s straightfoward to grab the channel name being played and the title of the program. With a couple of lines of applescript you can then set the iChat status to be whatever it is. heh!
There are a few problems of course. I can’t see anything about a web version of whatever is actually playing back on the Tivo, and Tivo doesn’t know if I’m actually watching the TV or watching a DVD or am just nowhere near the telly.
As Jim put it:
22:46:51 <JibberJim> hmm, so what happens if your tivo is recording Debbie Does Dallas for its own pleasures whilst you’re watching a futurama DVD, people will get entirely the wrong idea.
22:59:42 <deltab> JibberJim: I imagine it’d be more interested in Debian Does Dells
Still, the whole thing entertained me greatly :)
Fwiw, here’s the shell script:
curl http://10.0.2.15/info/ > tivo.html
#gettitle is a tiny perl script that grabs the title and channel from
#http://our.tivo.ip.address/info/ html file
/usr/bin/osascript < < END
tell application “iChat”
set status message to “$nowwatching”
In preparation for sparqlcamp I spent far too much time playing with a Firefox extension to show RDF information about photos, which I’ve called pigsty party in hommage to the rather better piggy bank extension. I had a terrible time actually writing it – very slow indeed to develop, but the power of Firefox made it worthwhile, I think. Or, at least you can see some of the potential of it, though the result is a terrible old hack, borrowing heavily from the Sage RSS reader in particular.
The idea was to try and show how the results of Sparql queries (for example; they could just be ordinary RDF files) might be usefully displayed to the user in a way that really showed the advantages of RDF (assuming there are any ;-) I’ve been using Sage a lot and I like the way you can get images in the feeds via the html. I like Flickr (and flickrfox) a lot too but I’m certainly not going to try to put my 10000+ photos on their site.
A fair few people have being putting RDF data about images on their sites – especially depiction data, location data, dates and thumbnails. After a Guinness-fuelled meeting at the Foaf workshop in Galway last year, Morten Frederiksen, Greg Williams and I have more or less have the same kinds of information available in similar formats: scene is set for a distributed Flickr thingy. Tags are fashionable, so what the hell… :-)
So some groundwork for something like that was the aim. Of course there are plenty of different ways of creating something like this – some sort of distributed query combining the results from several sources into one html page is another tack, and it looks as if we’ll try something like that out of Sparqling days too.
A Firefox extension is another way. The Pigsty Firefox extension finds gallery files in this format or this format linked from foaffiles which the extension finds using the foaf autodiscovery from html method. More detail is on the Pigsty homepage.
Having found the feeds you can view then with their images and metadata, and also filter the metadata for people, places, dates and tags. Some screenshots are available. Really, the feeds need to be latest photos from each source for it to be an interesting, updating dataset.
This is one to throw away, but I hope it makes some sort of sense. It’s fairly easy to extend – I’ve made some headway into displaying iCalendar RDF files but I’m having some issues with datatypes at the moment. I’d quite like to see what conferences and meetings my friends were going to and then save the events as iCalendar locally.
The main issue I can see with Pigsty (apart from general usability issues) is that processing the RDF files rapidly gets too tiring for the application and you get ‘a script in this page is causing firefox to run slowly’.
Another interesting area for more work is to investigate how to use SKOS tags rather than dc:subject tags (dc:subject are just strings; SKOS tags have an associated uri and can have more structure). The really interesting stuff here is how to reuse tags from friends or events, but this occurs in the authoring area rather than display. We also need Creative Commons and authoring properties to make this stuff realy useful.
Comments welcome – mail me (email@example.com) – comments are switched off in the blog.
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
<dc:description>ericp and solid soup</dc:description>
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:
<dc:description>ericp and solid soup</dc:description>
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 :)