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
+17
View File
@@ -0,0 +1,17 @@
import os
import json
TXT_DIR = '/home/maxi/Projekt/wtc.waiswuaschd.de/data/extracted_texts'
files = sorted(os.listdir(TXT_DIR))
summary = {}
for f in files:
path = os.path.join(TXT_DIR, f)
with open(path, 'r', encoding='utf-8', errors='ignore') as fp:
content = fp.read()
summary[f] = content
with open('/home/maxi/Projekt/wtc.waiswuaschd.de/data/recipes_summary.json', 'w', encoding='utf-8') as fp:
json.dump(summary, fp, ensure_ascii=False, indent=2)
print("Saved recipes_summary.json with", len(summary), "files.")