Archive for December, 2010

An API for twitter hashtags for TV programmes

Friday, December 31st, 2010

Hacking together an API that returns commonly-used hashtags for the programme you’re watching on the TV

tweets on TVLast April, I wrote a quick-and-dirty Python script that displays tweets for a given hashtag on my TV screen so that I could follow the twitter backchannel about a programme that I watched.

Considering that it was a random idea that was hacked together in a few minutes, I’ve used it a lot since then: it’s made watching a bunch of programmes much more entertaining – Eurovision is probably the best example (the commentary on twitter is hysterical), but there are many others.

But I never made any changes to the script since I first wrote it. If I’m watching something on TV that I know has a hashtag, I ssh to my set-top box and run my hashtags script, giving it the hashtag to filter on in the command.

I was thinking – it’d be much better if it was all automatic. It’d be better if my set-top box automatically showed tweets with the hashtag for whatever programme I’m watching.

To do this, I needed some way of knowing what was the right hashtag for the programme currently on a given TV channel. I could’ve hacked this into my existing script, but I thought it might be a feature that people might find other uses for, so instead I’ve made a stand-alone thing, available as a web-service.

What it does
I’ve made a web feed that returns a blob of either JSON or XML. You can get either:

  • the commonly-used hashtag for the programme currently on a specified channel (e.g. “what is the hashtag for the programme that’s on BBC 1 now?”)
  • the next programme on TV that has a commonly-used hashtag (e.g. “what are the next five programmes on TV that have hashtags?”)


Programmatically identifying DVDs by their barcodes from Android

Thursday, December 30th, 2010


A few Android code snipperts for how to identify a DVD by it’s barcode


In November, I wrote a simple Android app that lets me add films to my LOVEFiLM list by taking a photo of a movie poster.

It also works by taking a photo of the front of a DVD case, as the DVD covers are essentially mini-posters. But a few people pointed out that using image recognition for the front of a DVD case is overkill, when DVD cases have a machine-readable barcode printed on them.

So I spent an evening adding the ability to scan barcodes to the app – and now you can add to your LOVEFiLM list either by photos of posters or barcodes.

I thought I’d quickly share how I did it, in case it’s useful to anyone else.


Welcome to Eastleigh

Sunday, December 26th, 2010

This is a video that my (at the time) five year old, Grace, made last summer.

It was in the school holidays when I was looking for things that would keep her occupied for a couple of days – and I suggested that she might want to do some filming. She decided to make a documentary about the town where we live.

I would have posted this at the time, but it all got a little out of hand and ended up over twenty minutes long – which made it too long for me to upload to YouTube. But today, my YouTube account got approved for posting longer videos, so I thought that (even if five or six months late!) it’d still be worth sharing.

Welcome to Eastleigh

Grace was, unsurprisingly, in charge of everything – acting as presenter, director, narrator, location scout, and all-around bossy boots. My job was to point the camera where I was told in the bits where she wanted to talk. 🙂

It was all filmed using a normal digital stills camera that happens to let you record video clips. So the quality isn’t great (the microphone in particular doesn’t handle the wind well!).