derhuerst / db-cli

A CLI for Deutsche Bahn.
https://github.com/derhuerst/db-cli#db-cli
ISC License
6 stars 1 forks source link

pass station names as arguments #2

Open manuels opened 5 years ago

manuels commented 5 years ago

When I call the script with station names instead of IBNRs I get this error:

$ db-journey "Köln" "München"
station ID must be an IBNR.
derhuerst commented 5 years ago

This works as intended.

We could add this as a shortcut though: If you pass an IBNR, it will use that, otherwise it will prompt you which station you meant. PR welcome!

This would have to be changed here: https://github.com/derhuerst/hafas-cli/blob/706a1d6269b64f767e3cbf6b7a4f4ca6dc492175/journeys.js#L44-L60