hotdogs lets you know (in no uncertain terms) whether there are hot-dogs at King's Cross Eat Street today.
It's a Python script that simply grabs the Eat Street listings page using urllib2, uses BeautifulSoup to scrape the relevant data, and spits back the friendly notification.
It's a modified version of my eat street noms script.
Like this:
Simple, huh?
Python, and it's reliant upon BeautifulSoup to parse the HTML … if you see the following error:
ImportError: No module named BeautifulSoup
… then try installing BeautifulSoup:
$ easy_install BeautifulSoup
(That's obviously the thing to do for the other modules as well, should they be missing)
Should you wish to display the information on your desktop, like me, then (on OS X) you'll be wanting to grab the fantastic GeekTool. Grab it even if you couldn't care less about Eat Street. GeekTool is brilliant!
$ mkdir -p ~/bin
$ curl -skL https://github.com/dotcode/aretherefuckinghotdogsatkingscrosstoday/raw/master/hotdogs >~/bin/hotdogs
$ chmod +x ~/bin/hotdogs
Make sure ~/bin
is in your $PATH
- or put the hotdogs
script somewhere else on your $PATH
.
$ hotdogs
I trigger the command using GeekTool so that I have the info displaying on my desktop. It's nice like that.
Jude Robinson -- dotcode at gmail dot com -- @dotcode