Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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.
Python Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README
TFLBusStopsWithLatLong.csv
cached_countdown.py
csvToJson.sh
index.html
locate.html
nearest_stop.py
parse_countdown.py
shortly.fcgi
shortly.py
stops.json
stops.malformed.json

README

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
$ easy_install pymongo

$ ./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.
Something went wrong with that request. Please try again.