A simple command-line timetable for Swiss public transport
| vendor | ||
| .gitignore | ||
| CHANGELOG.md | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| Makefile | ||
| README.md | ||
abfahrt 🚂 🚆 🚄 🚅 🚍 🚊 🚢 🚡
abfahrtis a small cli tool to find public transport connections in Switzerland. It uses routing-data from transport.opendata.ch.
Example
you@some ~> abfahrt Basel Bern
│ Basel SBB (14:56) --------------- [ 1h0m ] --------------- Bern (15:56)
• 🚄 IC6 Basel SBB (14:56, 7!) ⟼ Bern (15:56, 6)
│ Basel SBB (15:03) --------------- [ 1h18m ] --------------- Bern (16:21)
• 🌍 EC000173 Basel SBB (15:03, 6) ⟼ Olten (15:28, 12)
• 🚃 IR35 Olten (15:36, 9) ⟼ Bern (16:21, 50)
│ Basel SBB (15:16) --------------- [ 1h8m ] --------------- Bern (16:24)
• 🚃 IR27 Basel SBB (15:16, 15) ⟼ Olten (15:48, 12)
• 🚃 IR16 Olten (15:56, 8) ⟼ Bern (16:24, 12)
│ Basel SBB (15:28) --------------- [ 58m ] --------------- Bern (16:26)
• 🚄 IC61 Basel SBB (15:28, 10) ⟼ Bern (16:26, 7)
Usage
Usage of abfahrt:
-arrival
time is arrival time
-date string
date for your journey, formated as YYYY-MM-DD (default: current date)
-from string
start of your yourney
-full
display full and detailed information
-in duration
time offset for your yourney, for example 1h
-time string
time for your journey, formated as hh:mm (default: current time)
-to string
start of your yourney
-transport string
Transportation types (comma-separated: train,tram,ship,bus,cableway)
-version
show version information
-via string
intermediate stops, separated by ','
- At minimum,
-fromand-tohave to be specified -incan be used to make relative timeadjustments, use-to search for connections in the past- If only two arguments are given, they are treated as
-fromand-to
Install
go install go.lks.li/abfahrt@latest