Initial commit: What To Cook (WTC) v4.4 - Digitales Kochbuch, Wochenmenueplan & Buchdruck

This commit is contained in:
2026-10-14 20:24:37 +02:00
commit c01d2d7639
171 changed files with 14073 additions and 0 deletions
Executable
+24
View File
@@ -0,0 +1,24 @@
import sqlite3
import os
db_path = "/home/maxi/Projekt/wtc.waiswuaschd.de/data/wtc.db"
conn = sqlite3.connect(db_path)
c = conn.cursor()
tables = c.execute("SELECT name FROM sqlite_master WHERE type='table'").fetchall()
print("Tables:", tables)
for t in tables:
tname = t[0]
cnt = c.execute(f"SELECT COUNT(*) FROM {tname}").fetchone()[0]
print(f"Table {tname}: {cnt} rows")
rows = c.execute("SELECT id, name, category, effort FROM dishes").fetchall()
print(f"Dishes ({len(rows)}):")
for r in rows[:5]:
print(" ", r)
r_rows = c.execute("SELECT * FROM recipes").fetchall()
print(f"Recipes ({len(r_rows)}):")
for r in r_rows:
print(" ", r)