Skip to content

Get useful information of public transport in Germany (Deutsche Bahn) regarding train stations, departures, routes, parking spots and more straight from the CLI .

License

Notifications You must be signed in to change notification settings

Manu10744/deutsche-bahn-cli

Repository files navigation

deutsche-bahn-cli

Get useful information regarding public transport in Germany (DeutscheBahn) such as train stations, departures and arrivals, routes, parking spots and more straight from the CLI.
This program is powered by the official Deutsche Bahn APIs:


Installation & Prerequisites

You must have Python v3 installed on your device.

Installation steps

  1. Clone the repository
$ git clone https://github.com/Manu10744/deutsche-bahn-cli.git
  1. Create a .env file in the root directory and enter your API Key:
DB_API_KEY=<your_key>
  1. Install the necessary dependencies with pip
$ pip install -r requirements.txt

Usage Examples

Search for a train station and get information such as the station-ID.

# Search with a fracture of a name
py main.py --search Münc

# Search with a full name
py main.py --search "München Hbf"

# Search with a wildcard
py main.py --search "München*,Berlin*"

Use the station-ID to search for the current timetable, arrivals or departures

py main.py --timetable 8006550

py main.py --arrivals 8006550

py main.py --departures 8006550


TO-DO's:

  • Get API Key
  • Setup fundamental structure and configuration
  • Implement search for train stations => maybe --find str ?
  • Implement search for departures given a train station => maybe --departures xy ?
  • (WIP) Implement search for parking spots => maybe --parking xy ?
  • Implement route information output => maybe --from xy --to z ?
  • Include changed data (departures, arrivals) as well

Possible enhancements

  • Instead of printing lots of results, print some and ask user if he wants to output more results
  • Add --verbose argument
  • (WIP) Bash autocomplete
  • Web Dashboard

About

Get useful information of public transport in Germany (Deutsche Bahn) regarding train stations, departures, routes, parking spots and more straight from the CLI .

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages