Skip to content

Solmath/Infoscreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infoscreen Application

This application provides real-time departure information for public transport stations using the EFA (Elektronische Fahrplanauskunft) API. It is built with Flask for the backend and vanilla JavaScript for the frontend.

Features

  • Fetches real-time departure data from the EFA API.
  • Displays departure information including line, destination, departure time, countdown, and delay.
  • Updates departure information every 2 minutes.

Requirements

  • Python 3.7+
  • Flask
  • aiohttp

Installation

  1. Clone the repository:

    git clone https://github.com/Solmath/Infoscreen.git
    cd efa-departures/services/web
  2. Create a virtual environment and activate it:

    python -m venv .venv
    venv\Scripts\activate  # `venv/bin/activate` on Linux
  3. Install the required packages:

    pip install -r requirements.txt

Usage

  1. Change the URL for the EFA interface of your public transport operator and station of your choice in web/project/__init__.py.

  2. Run the Flask application:

    Pass the app as an argument:

    flask --app infoscreen run --debug
  3. Open your web browser and navigate to http://localhost:5000/departure to view the departure information.

Docker

Start server:

docker-compose build
docker-compose up -d

Rebuild

docker-compose up -d --build

Stop containers:

docker-compose down -v

Project Structure

  • web/EFS_API/__init__.py: Contains the EFA class for interacting with the EFA API.
  • web/infoscreen/__init__.py: The main Flask application file.
  • web/infoscreen/templates/base.html: The HTML template for the infoscreen.
  • web/infoscreen/templates/departure.html: The HTML template for displaying departure information.
  • web/infoscreen/static/styles/style.css: The CSS file for styling the HTML template.

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

Acknowledgements

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published