This script processes train schedules from an Excel file and generates posters with departure times, train details, and routes.
- Install the dependencies:
pip install pillow pandas openpyxl
- Place the Excel file with the train schedules in the folder with the python file
- Run the script:
python main.py
The Excel file can have multiple sheets, each sheet representing a different train line. These sheets must have 'LK' in the name.
Formating:
Row 1 must be Empty(This is no longer a requirement)- The first 3 rows, column 1 must be "Train Info"
- Following rows must be train station names. Use 2 rows combined for major stations that also have arrival data
- Column 2 signifies if the time shown in the following columns are arrival(przyj. or przj) or departure(odj.)
- Each following column has the train name/operator in row 2 and train number in row 3
- Each following row of the column signifies a departure time corresponding to the station in the same row
- use "<" or "|" to signify that a train doesn't stop at a station(This is a Requirement, empty spaces will result in wrong data)
- Use "End" on Column 1 to signify the end of the schedule
example of a base file and a generated poster: