Getting ready for TFL to release live bus countdown information at the moment just parsing webpage and displaying results in a more mobile phone friendly format.
Shell 14.11%Python 85.89%
london-bus-countdown's Introduction
Stack:
Python 2.4 (will work fine on 2.7 with simplejson module installed)
BeautifulSoup
flup
Nginx
Werkzeug
Beaker
=== Running in Dev mode ===
OS X:
$ easy_install werkzeug
$ easy_install beautifulsoup
$ easy_install simplejson
$ easy_install beaker
$ ./shortly.py
* Running on http://127.0.0.1:8080/
* Restarting with reloader
Now you can check that web service is working.
From another terminal tab:
$ curl http://127.0.0.1:8080/shortly/56320
[["E3", "Chiswick ", "5 min"], ["E3", "Chiswick ", "14 min"], ["E3", "Chiswick ", "19 min"]]
=== Deploying in production ===
You should follow Werkzeug instructions depending on your web server setup:
http://werkzeug.pocoo.org/docs/deployment/
If you choose to go with FastCGI setup you could use shorly.fcgi script included in the repository.