How hengdapi/school-timetable-generator works
School Timetable Generator is a desktop tool for configuring school scheduling inputs and constraints, automatically generating timetables, manually correcting them, and exporting class/teacher schedules or CSES files. The graph follows the documented product workflow and the visible startup and generation excerpts. Several settings, import, editing, and export connections are documented in the README but their implementation was not sampled, so those links are represented only where the tree and module names support them.
Main entry points: generate.py Generation page · generate_core.py Constraint scheduler · main.py Application shell · settings.py Settings page
Components 19
Desktop interface
- Application shell
main.py - Home page
pages/home.py - Settings page
pages/settings.py - Generation page
pages/generate.py - Timeline view
pages/timeline.py - Dialogs
pages/dialogs.py
Scheduling inputs
- Settings state
wr_settings.py - School data
locals.py - Scheduling rules
core/rules.py
Timetable generation
- Constraint scheduler
core/generate_core.py - Timetable state
locals.py
Review and export
- Manual adjustment
pages/generate.py - Plan persistence
core/save_core.py - Schedule export
core/save_core.py - CSES export
core/cses_core.py - Completion alerts
core/system_notification.py
Other components
- School staff
- Spreadsheet files
- CSES YAML files
Connections 21
- School staff → Application shell: launches
- Application shell → Home page: opens
- Application shell → Settings page: opens
- Application shell → Generation page: opens
- Settings page → Settings state: configures
- Settings page → School data: imports inputs
- Settings page → Scheduling rules: configures
- Generation page → Constraint scheduler: starts generation
- Constraint scheduler → Scheduling rules: checks constraints
- Constraint scheduler → School data: reads classes
- Constraint scheduler → Settings state: reads options
- Constraint scheduler → Timetable state: assigns lessons
- Generation page → Manual adjustment: edits schedule
- Manual adjustment → Timetable state: updates lessons
- Generation page → Timeline view: shows schedule
- Generation page → Plan persistence: manages plans
- Generation page → Schedule export: exports schedules
- Generation page → CSES export: exports CSES
- Schedule export → Spreadsheet files: writes files
- CSES export → CSES YAML files: writes YAML
- Generation page → Completion alerts: requests alerts