1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
.. image:: https://pypip.in/download/bvg-grabber/badge.svg
:target: https://pypi.python.org/pypi/bvg-grabber/
:alt: Downloads
.. image:: https://pypip.in/version/bvg-grabber/badge.svg
:target: https://pypi.python.org/pypi/bvg-grabber/
:alt: Latest Version
.. image:: https://travis-ci.org/Markush2010/bvg-grabber.svg?branch=develop
:target: https://travis-ci.org/Markush2010/bvg-grabber
:alt: 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:
.. image:: https://markusholtermann.eu/images/BVG-Grabber-LightningTalk-installation1tb.jpg
:alt: Installation 1
.. image:: https://markusholtermann.eu/images/BVG-Grabber-LightningTalk-installation2tb.jpg
:alt: 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)"
}
]
]
]
|