Abschlussarbeit 2025
Find a file
2026-06-16 10:25:01 +02:00
docs Added Docs 2026-04-22 11:46:05 +02:00
.gitignore Initial commit 2026-04-08 12:14:44 +02:00
backend.py (re)implemented journey planning 2026-06-10 12:22:37 +02:00
flake.lock Basic Station Search 2026-05-06 11:35:53 +02:00
flake.nix Basic Station Search 2026-05-06 11:35:53 +02:00
LICENSE Initial commit 2026-04-08 12:14:44 +02:00
main.py added basic connection between the files, fixed small issues. some parts were achieved using ai. 2026-06-03 10:42:35 +02:00
README.md improved readme 2026-06-16 10:25:01 +02:00
route_planning.py Merge branch 'main' of https://git.miaig.dev/mia/hafas-terminal-app 2026-06-03 11:13:45 +02:00
station_monitor.py finally fixed line numbers, improved rendering of station monitor 2026-06-10 11:54:02 +02:00

hafas-terminal-app

A Python-based terminal application for accessing public transport information via the HAFAS API. This tool provides station-to-station route planning and real-time arrival/departure information for public transport networks.

Features

  • Route Planning: Find optimal routes between stations
  • Station Information: View real-time arrivals and departures
  • Terminal UI: User-friendly command-line interface using prompt_toolkit
  • Multiple Transport Methods: Support for various public transport modes

Requirements

Core Dependencies

  • Python 3.7+: Programming language
  • Hafas API Endpoint: Access to a HAFAS public transport API

Python Packages

  • prompt_toolkit: Terminal user interface (TUI)
  • requests: HTTP library for API communication
  • kivy (optional): Mobile UI support for future mobile versions

Tools

  • Git: Version control

Installation

  1. Clone the repository:

    git clone https://git.miaig.dev/mia/hafas-terminal-app.git
    cd hafas-terminal-app
    
  2. Enter the Nix development environment:

    nix develop  # Modern Nix with flakes
    # or
    nix-shell    # Traditional Nix
    

All dependencies will be automatically configured.

Option 2: Using pip

  1. Clone the repository:

    git clone https://git.miaig.dev/mia/hafas-terminal-app.git
    cd hafas-terminal-app
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    

Usage

Run the application:

python main.py

Features

  • Navigate between stations and search for routes
  • View departure and arrival times
  • Display detailed journey information

Project Structure

hafas-terminal-app/
├── main.py               # Application entry point
├── backend.py            # Backend API communication logic
├── route_planning.py     # Route planning algorithms
├── station_monitor.py    # Station monitoring functionality
├── flake.nix             # Nix environment configuration
├── README.md             # This file
└── docs/                 # Documentation

License

This project is provided under the terms specified in the LICENSE file.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests to help improve the application.