Skip to content

A script that processes train schedules from an Excel file and generates posters with departure times, train details, and routes.

Notifications You must be signed in to change notification settings

stacode123/TrainScheduleGeneration

Repository files navigation

Train Schedule Poster Generator

This script processes train schedules from an Excel file and generates posters with departure times, train details, and routes.

Dependencies

Usage:

  1. Install the dependencies:
pip install pillow pandas openpyxl
  1. Place the Excel file with the train schedules in the folder with the python file
  2. Run the script:
python main.py

Excel file format:

The Excel file can have multiple sheets, each sheet representing a different train line. These sheets must have 'LK' in the name.

Example: Excel file example

Formating:

  1. Row 1 must be Empty (This is no longer a requirement)
  2. The first 3 rows, column 1 must be "Train Info"
  3. Following rows must be train station names. Use 2 rows combined for major stations that also have arrival data
  4. Column 2 signifies if the time shown in the following columns are arrival(przyj. or przj) or departure(odj.)
  5. Each following column has the train name/operator in row 2 and train number in row 3
  6. Each following row of the column signifies a departure time corresponding to the station in the same row
  7. use "<" or "|" to signify that a train doesn't stop at a station(This is a Requirement, empty spaces will result in wrong data)
  8. Use "End" on Column 1 to signify the end of the schedule

example of a base file and a generated poster:

Base file example Generated poster example

If using a different base file, make sure to change the config of data locations in config.ini

About

A script that processes train schedules from an Excel file and generates posters with departure times, train details, and routes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages