skip down to the 2 comments

Creating shopping lists from BBC Recipes using Sinatra

[UPDATED] The BBC Recipe site has now been update. See updated blog post.

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.

There have been 2 responses to this post.

  1. Lewis

    I’ve got an iPhone and I love stuff like this – connecting datasets from various sources into usable formats.
    I work for a company in the tech sector and we have ways of communicating across the company to contribute enhancements to the way other teams look at their data – doesn’t the BBC have anything similar? Mark-up on text is a really easy thing to introduce, or at least standardise… The BBC doesn’t do enough apps, IME.

  2. Duncan

    Lewis, thanks for your comments and wholeheartedly agree. I would love to see more of these apps appear against BBC services, it’s just the people who make the decisions, don’t appear to share our views. It’s extremely frustrating.


back to the top