Skip to content
dovydasjaru edited this page Jun 2, 2025 · 8 revisions

Welcome to the TimetableMaker wiki!

This project creates excel file with a timetable. Timetable is configurable through config.json file.

How to run TimetableMaker

  • Download project;
  • Define config.json file in the same directory as main.py to your requirements;
  • In command line interface run python main.py or run in Python IDE;

Configuration of timetable

config.json structure

{
  "workers": {
    "Worker1": {
      "is_in_all_positions": bool,
      "positions": list[str],
      "positions_with_help": list[str],
      "appearance_skips": int,
      "date_exceptions": list[str]
    },
    "Worker2": {},
    ...
  },
  "positions": list[str],
  "starting_date": str,
  "ending_date": str,
  "interval": int,
  "default_time": str
}

Explanation

Worker1, Worker2 - distinct names of people that are in the timetable.

workers.is_in_all_positions - bool parameter can have true or false (default false). If true will assign worker to every position.

workers.positions - array of strings parameter can only have strings that are defined in higher level positions list (default empty). If non-empty the worker will be assigned to those positions to work in alone. Might also receive another worker which that worker will have to teach on that position (in timetable defined as: worker + trainee).

workers.positions_with_help - array of strings parameter can only have strings defined in higher level positions list (default empty). if non-empty the worker will be assigned to another worker to be trained (in timetable defined as: worker + trainee).

workers.appearance_skips - integer parameter (default 0). The higher the number, the rarer the worker will appear in timetable. The ratio will be (appearance_skips + 1):1

workers.date_exceptions - array of strings with dates in iso format (default is empty). If non-empty the worker will not be put in a timetable on that date.

positions - array of strings. Defines available positions. Essentially the rows in timetable.

starting_date - string of a date in iso format. Defines the starting date of timetable.

ending_date - string of a date in iso format. Defines the ending date of timetable, however the timetable may be filled to a later date. This date only ensures the minimum end of a timetable.

interval - integer parameter. Defines the gap in days between each date.

default_time - string parameter. Defined as HHMMSS (H - hours, M - minutes, S - seconds), used in iCalendar format writer to set default time for every event.

Clone this wiki locally