update
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user