diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-04-05 14:45:22 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-04-05 14:45:22 +0200 |
| commit | 4ebf9578ce2ff68be120ad057f001c6440c82b37 (patch) | |
| tree | 8d75bf532b8a28f395269825606bf8a5760559ed | |
| parent | 4ec3c06525274bd90d7c7c9c130b777a837d80e2 (diff) | |
| download | avail-lessons-4ebf9578ce2ff68be120ad057f001c6440c82b37.tar.gz avail-lessons-4ebf9578ce2ff68be120ad057f001c6440c82b37.zip | |
Readme: mention output format and give examples
| -rw-r--r-- | Readme.md | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -41,6 +41,29 @@ All command line options are supported in the configuration file. Additionally, an array of ICS calendar URIs can be specified with the `icalendars` key. A sample configuration file is included in the repository. +The probably most interesting configuration options are `output_header`, `output_footer` and `fmt` that control the format of the gathered lessons and events. + +I personally use + +```toml +output_header = """ +Woche Datum LP-Abschnitt Std. LP-A. Unterrichtseinheit +----- --------- ------------ ---------- ------------------------""" +fmt = "{week:>5} {date.strftime('%d.%m'):>9} {' '*12} {' '*10} {period_events}" +``` + +to generate a formatted simple table to use with pandoc. + +To generate a latex table one could use: + +```toml +output_header = ''' +\begin{tabular}{l l l l l} +Woche & Datum & LP-Abschnitt & Std. LP-A. & Unterrichtseinheit \\''' +fmt = "{week} & {date.strftime('%d.%m')} & & & {period_events} \\" +output_footer = '\end{tabular}' +``` + ## Usage To obtain a list of future lessons for an example (5A) math class run `./lessons.py --class 5A --subject M`. |
