feat: import mahavivo english-wordlists into me/lang.db (13k words, level=lowest cert); add 'new' status + items pagination

This commit is contained in:
Lang
2026-10-14 21:20:15 +08:00
parent 6069a49927
commit 671cecacfe
6 changed files with 171 additions and 11 deletions
+2 -2
View File
@@ -166,12 +166,12 @@ def export(conn: sqlite3.Connection) -> dict:
def overview(conn: sqlite3.Connection) -> dict:
def counts(where):
c = {"known": 0, "learning": 0, "fix": 0}
c = {"new": 0, "known": 0, "learning": 0, "fix": 0}
for r in conn.execute(
f"SELECT status, COUNT(*) n FROM items WHERE {where} GROUP BY status"):
if r["status"] in c:
c[r["status"]] = r["n"]
c["total"] = sum(c[k] for k in ("known", "learning", "fix"))
c["total"] = sum(c.values())
return c
g = conn.execute(