This commit is contained in:
team3
2026-06-19 12:59:13 +02:00
parent 3168ec9094
commit 26e097dc5a
9 changed files with 107 additions and 199 deletions

View File

@@ -82,6 +82,17 @@ def _crawl_fertig(topic: str) -> bool:
_STUFEN = ("einfach", "mittel", "schwer")
def subbausteine_titel(topic: str, baustein: str) -> list[str]:
"""Subbaustein-Titel eines Bausteins aus der Sidecar (leer, wenn keine)."""
sc = _json_datei(subbausteine_path(topic))
if not isinstance(sc, dict):
return []
return [
t for s in (sc.get(baustein) or [])
if isinstance(s, dict) and (t := str(s.get("titel", "")).strip())
]
def lade_uebersicht(topic: str) -> list[dict]:
"""Strukturierte Baustein-Liste für die Übersicht: Titel + Beschreibung + Subbausteine/Stufen.