Get live UK bus times on stdout
Project description
Given ATCO codes, shows the next bus times at given stops.
This is particularly useful bound to a keybinding and passed to libnotify’s notify-send program, so you can quickly get an overview of the next buses at stops you care about.
You must set WTB_APP_ID and WTB_APP_KEY to an app ID and app key valid at TransportAPI.
Usage
Pass ATCO codes with -a. See below for how to find them.
% WTB_APP_ID=xxx WTB_APP_KEY=xxx wtb -a 490004733D -a 4100008HAYRS Canada Water Bus Station (Stop D) (490004733D): - 199 to Canada Water: Due, 11 min, 25 min - C10 to Canada Water: 3 min, 9 min, 19 min - 1 to Canada Water: 8 min, 20 min - P12 to Surrey Quays: 11 min, 20 min - 225 to Canada Water: 13 min - LO-M to Canada Water: 23 min Haymarket Bus Station (R) (4100008HAYRS): - 44 to Dinnington: 4 min, 34 min, 1 hr 4 min - 43 to Cramlington Manor Walks Dudley Lane: 11 min, 41 min - 45 to Dinnington: 19 min, 49 min, 1 hr 19 min - 43 to Morpeth Bus Station: 26 min
How do I find ATCO codes?
For London bus stops, it’s in the URI. For example, in this URI, “490004733D” is the ATCO code.
For non-London, try the following:
Navigate to the bus stop on OpenStreetMap
On the right, click “layers”
Tick “map data”
Click on the bus stop on the map
On the left, you should see the ATCO code (possibly as something like naptan:AtcoCode)
Installation
To install the latest stable version from PyPi:
$ pip install -U whensthebus
To install the latest development version directly from GitHub:
$ pip install -U git+https://github.com/cdown/whensthebus.git@develop
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file whensthebus-1.0.0.tar.gz
.
File metadata
- Download URL: whensthebus-1.0.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61e171e255177ebb700da7db49ba1eb1bbaa2b48d8be1bfa0ea51f1b24bb6014 |
|
MD5 | f5ed8a4c426ca95114fab8065581da13 |
|
BLAKE2b-256 | 9e5255e386a59efcecc52a952c74ec4fa011d987a611af6032632720c825fa67 |