Show a what's-new card on the home screen after each update.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepaskopec-blip 2026-09-18 19:51:52 +02:00
commit 6556c6691b
21 changed files with 490 additions and 0 deletions

View file

@ -36,6 +36,7 @@ mkdir -p "$APPDIR/usr/bin" \
cp -f "$ROOT/maturita" "$APPDIR/usr/bin/maturita"
cp -f "$ROOT/data/style.css" "$APPDIR/style.css"
cp -f "$ROOT/data/changelog.txt" "$APPDIR/changelog.txt"
cp -f "$ICON_512" "$APPDIR/icons/hicolor/512x512/apps/maturita.png"
cp -f "$ICON_512" "$APPDIR/usr/share/icons/hicolor/512x512/apps/maturita.png"
cp -f "$ICON_512" "$APPDIR/maturita.png"

View file

@ -47,6 +47,7 @@ mkdir -p "$MACOS" "$RES/icons/hicolor/512x512/apps" "$RES/share" "$FW"
cp -f "$ROOT/maturita" "$MACOS/maturita-bin"
cp -f "$ROOT/data/style.css" "$RES/style.css"
cp -f "$ROOT/data/changelog.txt" "$RES/changelog.txt"
cp -f "$ICON_512" "$RES/icons/hicolor/512x512/apps/maturita.png"
cp -R "$ROOT/data/share/." "$RES/share/"

View file

@ -690,6 +690,28 @@ def net_tasks(rows) -> list[dict]:
return out
def parse_changelog(path: Path) -> list[dict]:
if not path.is_file():
return []
entries: list[dict] = []
current = None
for raw in path.read_text(encoding="utf-8").splitlines():
line = raw.strip()
if not line or line.startswith("#"):
continue
if line.startswith("---"):
current = {"date": line[3:].strip(), "cs": [], "en": []}
entries.append(current)
continue
if current is None:
continue
if line.startswith("cs:"):
current["cs"].append(line[3:].strip())
elif line.startswith("en:"):
current["en"].append(line[3:].strip())
return [e for e in entries if e["cs"] or e["en"]]
def parse_i18n(src: str) -> dict:
arrays = find_arrays(src)
out = {}
@ -1219,6 +1241,7 @@ def main() -> int:
"hw": hw_lessons,
"mluvnice": mluvnice,
"books": books,
"changelog": parse_changelog(ROOT / "data" / "changelog.txt"),
}
# Fix single-string banks stored as char* "arrays"
@ -1252,6 +1275,7 @@ def main() -> int:
print(f" hw lessons: {sum(1 for L in hw_lessons if L['slides'])}")
print(f" mluvnice: {len(mluvnice)}")
print(f" books quiz items: {[len(b['quiz']) for b in books]}")
print(f" changelog entries: {len(payload.get('changelog', []))}")
missing = []
for u in german_units:
if not u["unlocked"]: