dbrgn / fahrplan

A SBB/CFF/FFS commandline based timetable client. Project started at make.opendata.ch.
GNU General Public License v3.0
132 stars 20 forks source link

Short output version #14

Open dbrgn opened 12 years ago

dbrgn commented 12 years ago

Add a --short / -s option for shorter output.

Possible formattings:

1 - Grouped

Von Zürich Manegg nach Zürich HB SZU:
- ab 18:00 Gleis 2 an 18:11 Gleis 1 (0:11h)
- ab 18:10 Gleis 3 an 18:21 Gleis 1 (0:11h)
- ab 18:20 Gleis 2 an 18:31 Gleis 1 (0:11h)
...

Downsides: There could be different start/end locations. This could be solved by grouping the different start/end locations. Might be a great possibility.

2 - Compact

Zürich Manegg ab 18:00 Gleis 3 - Zürich HB SZU an 18:11 Gleis 1 (0:11h, 0 mal umsteigen)
Zürich Manegg ab 18:10 Gleis 3 - Zürich HB SZU an 18:21 Gleis 1 (0:11h, 0 mal umsteigen)
Zürich Manegg ab 18:20 Gleis 3 - Zürich HB SZU an 18:31 Gleis 1 (0:11h, 0 mal umsteigen)
...

Each row contains all necessary information, no need for grouping.

3 - Text

Abfahrt in Zürich Manegg um 18:00 auf Gleis 3. Fahrt mit S4, S5 und Bus, 2 mal umsteigen.
Ankunft um 18:21 in Zürich HB SZU auf Gleis 1. Gesamtdauer: 0:11h.
-----
Abfahrt in Zürich Manegg um 18:10 auf Gleis 2. Fahrt mit S4, S5 und Bus, 2 mal umsteigen.
Ankunft um 18:31 in Zürich HB SZU auf Gleis 1. Gesamtdauer: 0:11h.
-----
...

Plaintext version, e.g. for SMS messages etc... Could also be used with a separate -t / --text option.