This commit is contained in:
team3
2026-09-29 13:47:21 +02:00
parent aa80a5f17c
commit 828e3978e9
6 changed files with 52 additions and 8 deletions

View File

@@ -167,3 +167,15 @@ def slug(text: str) -> str:
t = t.replace(a, b)
t = re.sub(r"[^a-z0-9]+", "-", t).strip("-")
return t[:60] or "kapitel"
def position(name: str) -> dict:
"""Leseposition (Abschnitt der Buchansicht, Bildschirm des Lesemodus) – geräteübergreifend auf dem Server."""
return _lesen(verzeichnis(name) / "position.json", {})
def position_setzen(name: str, werte: dict) -> dict:
p = position(name)
p.update(werte)
_schreiben(verzeichnis(name) / "position.json", p)
return p