diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-04-05 16:38:26 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-04-05 16:38:26 +0200 |
| commit | 6c9cbaf8aa1915dcb3158d8ae856dab0d15b19e6 (patch) | |
| tree | 2370089ad975240d91783133fe63911170c2af7f | |
| parent | f61b34dbdb4b987359b6fb6543b942c799ac350e (diff) | |
| download | avail-lessons-6c9cbaf8aa1915dcb3158d8ae856dab0d15b19e6.tar.gz avail-lessons-6c9cbaf8aa1915dcb3158d8ae856dab0d15b19e6.zip | |
strip leading whitespace from formatted events
| -rwxr-xr-x | lessons.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -90,8 +90,8 @@ def format_period(period: webuntis.objects.PeriodObject, if period_evs: for event in period_evs: period_events += f' {event.summary} |' - # strip the trailing ' |' suffix - period_events = period_events[:-2] + # strip the leading ' ' and trailing ' |' + period_events = period_events[1:-2] output = config.get( 'fmt') or '{week} {date.strftime(\'%d.%m\')} {period_events}' |
