aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-10-01 13:14:15 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-10-01 13:14:15 +0200
commit8f0be4200f9e93ccd35d60cc0a5436ab5f168c8b (patch)
tree988056a23601a8dd7dbf094d33a4003d832ba351 /scripts
parentbd19fee6508e43099181793d66c25bb690b4c77b (diff)
downloadunterricht-8f0be4200f9e93ccd35d60cc0a5436ab5f168c8b.tar.gz
unterricht-8f0be4200f9e93ccd35d60cc0a5436ab5f168c8b.zip
remove ugly 'Lernbereich' and ':' strings from section number
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_map/gen_map.py4
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', ' ')