Many Pies

Many Pies

Monday, September 09, 2013

My first Little Printer publication - UK daily weather

I've just made my first Little Printer publication live - UK Daily Weather "Daily Weather from the BBC (not officially affiliated with the BBC)". I've been following Little Printer for a while and when they announced a github project with a complete PHP publication it wasn't long before I forked it and made my own. A while back I developed the twitter bot behind Wycombe Weather, so my first thought was to develop a similar weather app, including an idea that I never got round to with that - pictorial representation of the weather.

It wasn't too hard to strip out the code at the heart of the original publication and substitute some code to parse the BBC RSS feed, print out the date and the description of the weather, and then display a picture of the weather. I used the whole of the @wycombeweather twitter feed to find a list of the words that the BBC uses, and then created some PNG pictures based on some original SVG weather symbols. I originally created them as SVG files but the Berg preview test tool didn't display SVG. Using the Berg tools you can test everything without having to actually own a printer, which I don't. I'm hoping they may give all developers a free one at some point.

The next step was to let the user specify their postcode, which wasn't in the original code, but I found some other sample code that did most of the work. Then I polished it up a little, and now it's live! While working on it I deliberately didn't look to see if anyone had done anything similar, but as I was deciding on the final name I had a look and was glad to see that there was only one other weather publication in the appropriate category.

It's been great to do a nice little project with such a cool device. If you end up subscribing I'd be grateful if you could get in touch and send me one of the printouts.

Update: I found you can send a message to the Little Printer people and they'll send you picture:

Post a Comment