# Tower Bridge Lifts Provides lift times information, parsed from TowerBridge.org.uk [missing_demo_link](http://www.github.com) ## Description This repo was born as I couldn't find an API to access bridge info to another side project and didn't hear back from the official website mantainers. It parses data from the official page (http://www.towerbridge.org.uk/lift-times) and makes it available in other formats. Bascule and traffic information are inferred from the lift times and might not correspond to reality. (Please ping me if you'd like to collaborate and improve them using computer vision on this live stream http://www.ustream.tv/towerbridge ;-) ## Installation Add it to your application's Gemfile: ```ruby gem 'tower_bridge_lifts' ``` and.. $ bundle OR from the command line: $ gem install tower_bridge_lifts ## Usage ### IRB or inside your own application: ```ruby require 'tower_bridge_lifts' bridge = TowerBridgeLifts::Base.new puts bridge.status puts bridge.time puts bridge.lifts puts bridge.next_lift puts bridge.updated ``` ### Command line wrapper: ``` $ tblifts --help Tower Bridge Lifts - provides lift times information, parsed from towerbridge.org.uk Usage: tblifts [COMMAND] [OPTIONS] Commands: | lifts shows all scheduled lifts next | next_lift shows the next lift only bascules shows the bascules position time shows local time (London) traffic shows traffic status accross the bridge status shows all above server serves an api in server mode Options: -d, --date=date filter by date (DD-MM-YY | today | tomorrow) -c, --compact shows compact -g, --group group lifts by date -l, --lines=num lines to display -p, --port=port sets the port on server mode -h, --help displays help -v, --version displays version For more info, please visit http://github.com/aaparmeggiani/tower_bridge_lifts $ tblifts --date=today 01-Jan-16 Sun 08:00 ⬆︎ A Vessel 01-Jan-16 Sun 13:00 ⬇︎ Another Vessel $tblifts --group --lines=2 01-Jan-16 Sun [2] 08:00 13:00 02-Jan-16 Mon [4] 08:00 08:30 12:00 15:00 15:00 ``` ### Server mode: tblifts can also operate as a daemon, serving json through RESTful http requests. ``` $ tblifts server -p 3000 $ curl http://localhost:3000/api/v1/status ``` API docs + sandbox can be found [here_missing_link](http://github.com). ## Contributing Bug reports and pull requests are welcome through this repo. ## License MIT