This commit is contained in:
jonas committed 2026-09-06 14:41:23 +02:00
commit 55778039fb
5 files changed
+164

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import json
import sqlite3
db = sqlite3.connect("mensa.db")
rows = db.execute("""
SELECT date, mensa, type, title, description, category, allergens
FROM dishes
ORDER BY rowid DESC
LIMIT 3
""").fetchall()
for date, mensa, typ, title, description, category, allergens in rows:
print(f"{date} | {mensa} | {typ}")
print(f" {title}")
print(f" {description}")
print(f" category: {', '.join(json.loads(category))}")
print(f" allergens: {', '.join(json.loads(allergens))}")
print()
db.close()