Machine Tags

It was when I started using Huffduffer that I noticed that people were doing strange and unusual things with the tags. Instead of just putting a word or two they were joining words using ‘:’ and ‘=’ in a very specific way. Jeremy wrote a post at on machine tagging Hufferduffer and on the machine tag browsing that he’d set up. I did some Googling and found that the concept had been around for a while. In fact I’m sure it was reading Jeremy’s post Ghost in the Machine Tags that I’d first heard of it.

The way it works is ridiculously simple. A machine tag consists of three parts, a namespace, a predicate and a value: ‘namespace:predicate=value’. The way that it’s used on Huffduffer is that someone can enter say, ‘book:author=jeremy keith’ as a tag and the application has been set up to recognise that it’s a book author and so use the Amazon API to retrieve books. The same goes for music, ‘music:artist=alice in chains’ will return details from, items from Amazon or both. As far as I can tell there is no certified standard for how machine tags are defined.

After seeing it’s potential I started to added little ‘extras’ to the tags of my posts. At first it was just a case of adding a persons twitter account name, ‘twitter:username=eddieizzard’. This then uses a Ruby gem called feedzirra to take the last 5 tweets from that users RSS feed. Then I tried geo tags with latitude and longitude coordinates. This shows a Google Map of the location which, at the moment, is just a static image. Then for music artists and book authors I’ve used the ruby-aaws gem to take the top 8 covers with links to the web-site. The post about Eddie Izzard’s gig at the M.E.N. shows all three in action.

The feedzirra task is set to run every 6 hours, picking tweets as well as a few personal feeds, using whenever. This job also deletes the cache and pings the main page as well as the archives and tags pages. Any other pages that get hit will be cached then expire after 6 hours. I was wondering if I could just expire the pages that had changed or switch to partial page caching but for just a personal blog it isn’t worth the hassle.

For the time being that’s it. In the future I’ll add tags for flickr and possibly Watch this space.

After the switch to Jekyll in 2011 I removed all the machine tags.

  • Posted on Saturday, 05 December 2009
  • Tagged with web