skip main content

I built a Chrome extension, and yes it shows BBC Now Next information

posted by Duncan at 12:33 pm on February 8th, 2010

I like Google Chrome, it’s fast and simple and works as expected. It’s currently my main browser, and with Extensions, it’s likely to remain that way.

An extension is a zipped bundle of files — HTML, CSS, JavaScript, images, and anything else you need — that adds functionality to the Google Chrome browser. Extensions are essentially web pages, and they can use all the APIs that the browser provides to web pages, from XMLHttpRequest to JSON to HTML5 local storage

I use a Mac so extensions have not been available to me, until that is the dev versions of Chrome started incorporating them. I installed it the other day, and thought I’d have a play at creating one. You can build them too, as their dev site is very helpful.

Using my standard use case, I have built an extension that displays BBC stations Now and Next information. Give it a whirl:

You can see what it looks like in action below.

chrome extension

It uses feeds from BBC Programmes, the upcoming feed and the lesser know service feed. So you install it, and choose the stations you are interested in. You then get to see what is on now and next when you click the BBC icon that appears in the browser bar. the results are clickable. You can click on the network icons to listen or watch live. You can click on the show images or heading to go to that shows programme page.

Oh, and if you’re interested in the code, it on available via my Github account.

Enjoy!

Worth keeping. Snow covers Great Britain

posted by Duncan at 8:06 pm on January 7th, 2010

I thought I should keep this photo and this post, as a record of events in the UK. We don’t get much snow normally, but this year we’ve had endless amounts. It’s a photo from the MODIS Rapid Response System.

The Uk snow from 1km above

What’s quite funny, is that Wool, in Dorset from where I originate, is pretty much the only place that is still green.

Language, Timothy! A simple Google Wave robot

posted by Duncan at 10:47 pm on January 3rd, 2010

In late May last year Google first announced ‘Google Wave‘ at their IO conference. If you haven’t already, I advise you read all about it, and watch the introductory video.

Now I heard about GW early on, but didn’t really make any time for myself to understand the concept, or find out about the inner workings. In fact, like may people I know, I just thought it was an exercise in swapping invites, and once I had one, and had a very quick play, I didn’t get it.

Well, now I’ve read all the documentation, watched the videos, understood the concept, I tend to agree with the team. This could indeed be a gamer changer. We do need something to replace the increasingly old fashion email (40 years old), and this not only does that, but merges in a whole bunch of tasks and possibilities as well. It could be the future.

Now for developers, one of the things that GW comes with is the Wave API. The API allows you to use and enhance GW in a couple of ways. By extensions, or by embedding GW in other web pages.

So in order to understand the API more, I thought I’d build a simple Extension. In this case a robot, that when added to your GW conversation, will remove all the bad words it catches people using. This simple example starts allowing me to understand how the API works, and how I interact with Waves, Wavelets and Blips.

Google Wave Robot

Now, it is a very simple example of what’s possible via the API and what will be possible in GW, but it’s a good example of how you get up and running with the Python SDK. I am of course assuming you have a App Engine account, and downloaded the SDK.

If you’d like to see the robot in action in a wave, just add the contact:

language-timothy@appspot.com

and then add this contact as a participant in your wave conversation you want monitoring. I only tried it in conversation with myself, but I’m sure it’ll be fine. The robot is also in the wave sample gallery.

As always, grab the code over at Github.

Creating shopping lists from BBC Recipes using Sinatra

posted by Duncan at 12:44 pm on October 28th, 2009

This is another case of looking at a BBC site I use frequently, and extending it. Here’s my use case. I found a recipe I’d like to make from the BBC Recipes site, so I first need to buy the ingredients. The ingredients by default are part of the recipe page, and even if I print out the recipe, it’s still got stuff I don’t need. It would be nice if I could just turn that recipe information into this:

Ingredients

It’s a simple list of ingredients, that have a checkbox next to each item to mark when I have put it in my basket.

So I have built myself a simple Sinatra app that does just this:

If you look at it on your iphone it will look styled, whereas on other devices it will just look simple and standard.

From the site you just need to post the url of a recipe you want the ingredients listed, for example the screenshot above is what happened when I posted this url into it:

It’s very simple, give it a try, see what you think.

Ok, one thing I should note, is that I can’t be sure it will be 100% correct every time. This is a real pain, but out of may hands. The BBC recipe pages look very nice and all, but the most important part of the page “The Recipe” is not only terribly marked up, but it’s not consistent. I suspect this is due to being a free text field in a legacy CMS? but it means that when I get my application to try to look at it, and turn it into a list of ingredients, I can’t be sure of the structure and have to make a bunch of assumptions, which are sometimes wrong.

It would be great if this could be rectified, as we could then see lots of experiments like this out there. In fact with well marked up recipes, and there does appear to be a recipe markup spec:

People could build some great application around all this information.

BBC Gardeners’ Planner in your calendar part deux

posted by Duncan at 1:01 pm on October 20th, 2009

This is just a small extension to the original post: Subscribe to the BBC Gardeners’ Planner with the help of Sinatra.

I mentioned there that I needed to add some caching to the application, and also that it didn’t live anywhere. Well it now has caching (a feeds cached for a day) thanks to rack/cache and it now has a url:

Which you can now use in your iCal enabled calendar, one of which is Google Calendar, which is used in the photo below where I have subscriber to:

Google Calendar

I was having some strange problems the other day, where Google Calendar was showing the calendar titles as long email addresses. I think this may be a Google Calendar index thing (anyone know?), as it appears to fix itself over time so ignore it.

Subscribe to the BBC Gardeners’ Planner with the help of Sinatra

posted by Duncan at 9:45 am on October 15th, 2009

[UPDATE] I have posted an update with a url you can use

I really like being in my garden, so I was looking at the BBC Gardening site the other day for some gardening tips. The hardest part for me, is the lack of experience I have in knowing what needs to be done and when.

The BBC Gardening website solves this by having a gardeners’ planner. Great I thought, there’s loads of really useful stuff in there. The problem is I have to keep going back to the site, to check what I’m suppose to be doing. As it’s a planner, it would be great of I could have this information to put in my own calendar, so I could see it along with other jobs I have to do. Even better if I could subscribe to this information, so if it ever changes, I’m kept up-to-date. Maybe they will provide this one day (I really think they should), but in the mean time I decided to roll my own:

Subscribing to the BBC Garden planner

I’ve created a web app that reads this planner data, and converts it into the iCal format that you can now subscribe to. It’s written using Sinatra, and I choose to run it under the awesome Passenger via mod_passenger. It’s currently not hosted anywhere (other than on my laptop), so you’ll have to run it on your own server. Maybe that will change if I can find somewhere to stick it, I’ll keep you posted. I think some caching may be needed before that happens though.

Once running on your computer of choice, you only really have one uri to stick in your calendar of choice. You can extend this uri by passing in section names to filter the information displayed in the calendar. Here’s a few examples:

# to subscribe to a calendar of everything ( quite big! )
http://mydomain.local/planner.ics
 
# to subscribe to a calendar of tips on just trees, ponds and wildlife
http://mydomain.local/planner.ics?s=trees,ponds,wildlife
 
# to view all the available sections
http://mydomain.local/

And here’s what it looks like in Apple’s iCal once you have subscibed:

BBC Garden planner in iCal

Get your own copy of the app from github. You get up and running in the same way you would with any Sinatra/Passenger app. The structure and config file is already written, so you really just need to do the vhost and symlinking :

Happy Gardening!

My first puzzle game KeyCell is now in the App Store

posted by Duncan at 11:13 am on October 9th, 2009

After the fun I had building my last iPhone app, I thought I’d have a go and writing a puzzle game. I bring you KeyCell.

KeyCell is based on a puzzle game I remember seeing in a ActionScript book about 8 years ago. It’s a kind of reverse Tetris. Touch a cell that has adjacent cells of the same colour to make them disappear. The more cells that you remove in one go, the more points you get. The challenge is to try and clear all the cells and achieve the highest score.

Now this appears simple, but actually, to get the real high scores you really have to think about it, making sure you remove the cells in such away that they setup the next bunch of coloured cells to remove. Here’s a screen shot of the game in action:

KeyCell for iPhone and iPod touch

You can also share your scores with the world. This option is off by default, as I wanted the game to be as simple as possible out of the box, but you can turn on the feature via the settings page. The score are then submitted to cocosLive. Check out the scores.

Thanks once again go out to David Wilson who created the wonderful App Icon. I asked him in passing if he’d be interested in creating an icon, and a few days later it popped into my inbox, thankyou again David.

The game is written using the iPhone cocos2d game framework. This was something I’ve never used before, but has been a very enjoyable experience to use. If you want to write iPhone games, this is certainly a good starting point.

Fun with Quartz Composer in Snow Leopard and the BBC Radio Schedule

posted by Duncan at 12:34 pm on October 7th, 2009

I’ve just posted on the BBC Radio Labs blog about some tinkering with Quartz Composer I’ve done. Please read the full article there, but in short, I’ve created a Quartz Composition that you can install as a Screen Saver, that reads in the BBC National Radio Schedule and rolls through each station showing who’s on and displays a pretty picture. Oh, and I think it all looks very pretty.

BBC Radio Screen Saver

Head on over to the Radio Labs site to download and install on your machine. Please note though, it’s for OSX 10.6 Snow Leopard only.

Hydrate 1.2 available, you asked and I delivered

posted by Duncan at 10:10 am on September 17th, 2009

Hydrate 1.2 is now in the App Store. I had lots of kind people, who took time out of their day, to let me know of improvements they thought the app needed. I went through this list and have implemented the most requested feature, which was customisable goals and containers.

Custom Goals

Oh, and on a slightly different note, the puzzle game I’m writing “KeyCell” is almost finished. Here’s a little sneek preview:

KeyCell preview

Hydrate 1.1 for iPhone, Available Now

posted by Duncan at 10:41 am on August 29th, 2009

1.1 of my Hydrate iPhone app is now in the App Store. This update speeds up the app, fixes a few bugs, and adds a new icon made by David Wilson as well as extra Language support.

The next release 1.2 is on it’s way soon, and adds custom goals and measures as this was a popular request by people who have already installed the app.


back to the top