diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-10-01 13:14:15 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-01 13:14:15 +0200 |
| commit | 8f0be4200f9e93ccd35d60cc0a5436ab5f168c8b (patch) | |
| tree | 988056a23601a8dd7dbf094d33a4003d832ba351 | |
| parent | bd19fee6508e43099181793d66c25bb690b4c77b (diff) | |
| download | unterricht-8f0be4200f9e93ccd35d60cc0a5436ab5f168c8b.tar.gz unterricht-8f0be4200f9e93ccd35d60cc0a5436ab5f168c8b.zip | |
remove ugly 'Lernbereich' and ':' strings from section number
| -rwxr-xr-x | scripts/gen_map/gen_map.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/gen_map/gen_map.py b/scripts/gen_map/gen_map.py index 90b848af..8765336b 100755 --- a/scripts/gen_map/gen_map.py +++ b/scripts/gen_map/gen_map.py @@ -153,6 +153,10 @@ def parse_section_html(section, summary_class: str) -> t.Tuple[str, str, int]: 'class': 'head-absatz-num' }).children)[2].strip() + if num.startswith('Lernbereich'): + # strip "Lernbreich" and trailing ':' + num = num[len('Lernbereich'):-1] + summary = section.find(**{'class': summary_class}).string.strip() summary = summary.replace('\xa0', ' ') |
