feat: import mahavivo english-wordlists into me/lang.db (13k words, level=lowest cert); add 'new' status + items pagination
This commit is contained in:
+2
-2
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user