aboutsummaryrefslogtreecommitdiff
path: root/lessons.py
Commit message (Collapse)AuthorAgeFilesLines
* support formatting special eventsFlorian Fischer2023-04-061-12/+49
| | | | | | | | | | | | | | | | | | | | This is usefull to include events like holidays or semester end in the formatted output. I use the following config ```toml [special_events.Notenschluss] pattern = "Notenschluss*" fmt = '''\\rowcolor{{yellow!30}} \\multicolumn{{5}}{{c}}{{{event.start.date().strftime('%d.%m')} {event.summary}}} \\\\''' [special_events.Ferien] pattern = "*ferien*" fmt = '''\\rowcolor{{yellow!30}} \\multicolumn{{5}}{{c}}{{{event.start.date().strftime('%d.%m')}-{event.end.date().strftime('%d.%m')} {event.summary}}} \\\\''' ``` to include any holidays as well as the semester end in my formatted latex table.
* ignore pylint eval warning and use more expressive variable nameFlorian Fischer2023-04-051-3/+4
|
* add line formatting for eventsFlorian Fischer2023-04-051-3/+9
| | | | | | | | | | I want to color a table row in a certain color if a early end of class causes my lesson to be canceled. To do so I use the new configuration table: ```toml [event_line_formats] Unterrichtsschluss = '\\rowcolor{{red!30}} {line}'```
* strip leading whitespace from formatted eventsFlorian Fischer2023-04-051-2/+2
|
* detect end of classes prior to a lessonFlorian Fischer2023-04-051-0/+3
|
* change the symbol separating multiple eventsFlorian Fischer2023-04-051-2/+2
| | | | When generating latex the '&' separator breaks the resulting table.
* support a footer in order to format e.g. latex tablesFlorian Fischer2023-04-051-0/+3
|
* support a output header and make the formatted events available to the formatFlorian Fischer2023-04-051-12/+18
| | | | | | | | | | | | | | | | | | | | I use this oputput configuration: ```toml output_header = """ Woche Datum LP-Abschnitt Std. LP-A. Unterrichtseinheit ----- --------- ------------ ---------- ------------------------""" fmt = "{week:>5} {date.strftime('%d.%m'):>9} {' '*12} {' '*10} {period_events}" ``` To produce a formatted pandoc simple table looking like this: Woche Datum LP-Abschnitt Std. LP-A. Unterrichtseinheit ----- --------- ------------ ---------- ------------------------ 16 18.04 Event1 & Event2 17 25.04 Event3 18 02.05 Event3 & Event4 ...
* initial commitFlorian Fischer2023-04-051-0/+177