Seems like something to do in Ruby. I can give it a go when I get a chance (which might be a wee while).