a7971c4822
gates / gates (push) Successful in 25s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
14 lines
751 B
Python
14 lines
751 B
Python
"""The app page's lines (auto-update / undone / update error / held) for the four drill apps, both languages."""
|
|
import re, sys
|
|
import walk as w
|
|
w.login()
|
|
out = sys.argv[1]
|
|
with open(out, "w") as f:
|
|
for lang in ("hu", "en"):
|
|
for a in ("wishlist", "navidrome", "romm", "vikunja"):
|
|
h = w.page(f"/apps/{a}" + ("?lang=en" if lang == "en" else ""))
|
|
m = re.findall(r'<div class="alert[^"]*"[^>]*data-(?:auto-update|update-undone|update-error|held|unhealthy-stop)[^>]*>(.*?)</div>', h, re.S)
|
|
b = re.findall(r'<span class="tag tag-[^"]*"[^>]*>([^<]*)<', h)[:2]
|
|
f.write(f"[{lang}] {a}: badge={[x.strip() for x in b]} lines={[re.sub(r'<[^>]+>', '', x).strip() for x in m]}\n")
|
|
print(open(out).read())
|