Skip to main content

Querying the upcoming public transport departures in Berlin

Project description

Downloads Latest Version Development branch

bvg-grabber

Showing BVG Departures In Your Office

Blog post:

https://markusholtermann.eu/2013/06/showing-bvg-departures-in-your-office/

Slides:

https://speakerdeck.com/markush/showing-bvg-departures-in-your-office

Pictures:
Installation 1 Installation 2

Installation

To use bvg-grabber go and install it as you do with every Python package:

$ pip install bvg-grabber

or:

$ pip install --user bvg-grabber

Usage

bvg-grabber comes with a simple command line tool bvg-grabber.py:

$ bvg-grabber.py --help
usage: bvg-grabber.py [-h]
                    [--vehicle [{S,U,TRAM,BUS,FERRY,RB,IC} [{S,U,TRAM,BUS,FERRY,RB,IC} ...]]]
                    [--limit LIMIT]
                    station file

Query the BVG-website for departures

positional arguments:
station               The station to query
file                  Path to file. Use - for stdout

optional arguments:
-h, --help            show this help message and exit
--vehicle [{S,U,TRAM,BUS,FERRY,RB,IC} [{S,U,TRAM,BUS,FERRY,RB,IC} ...]]
                        Vehicles which shall be queried, if non given
                        actualdepartue (bus) will be used
--limit LIMIT         Max departures to query

Example:

$ bvg-grabber.py "U Ernst-Reuter-Platz (Berlin)" - --vehicle U --limit 2 | json_pp
[
   [
      "U Ernst-Reuter-Platz (Berlin)",
      [
         {
            "line" : "U2",
            "end" : "U Ruhleben (Berlin)",
            "remaining" : 12180,
            "start" : "U Ernst-Reuter-Platz (Berlin)"
         },
         {
            "line" : "U2",
            "start" : "U Ernst-Reuter-Platz (Berlin)",
            "remaining" : 12600,
            "end" : "S+U Pankow (Berlin)"
         }
      ]
   ]
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bvg-grabber-0.1.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

bvg_grabber-0.1.1-py2.py3-none-any.whl (11.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file bvg-grabber-0.1.1.tar.gz.

File metadata

File hashes

Hashes for bvg-grabber-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4551f74ad1cbdbfd8c9b002a5c1a9d21b560e1c2c586da5333e3fd6e19c17345
MD5 81b73467df2879dc477ac694b30a3edd
BLAKE2b-256 3cdcb022f1f13df74cdec9ddbb0e068b25852ab2b89e4d3c513ed4ef3c702751

See more details on using hashes here.

File details

Details for the file bvg_grabber-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for bvg_grabber-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 82e1934ee953f4465e3db6848ece384acf8f924abda549ce928b10a03d365c7e
MD5 002982d9e909a054fe851147908a833f
BLAKE2b-256 1deae93de9488bd19e9e8fae38421fa3d71611d4020708b07b3a5b1ecda00518

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page