lib: read_recipes()

This commit is contained in:
neingeist 2026-04-12 23:51:21 +02:00
parent d54fd73e53
commit 6c7ad52c72
4 changed files with 7 additions and 30 deletions

View file

@ -7,6 +7,7 @@ import os
from tqdm import tqdm
from config import *
from lib import *
def allergens_for_step_ingredients(step):
@ -59,12 +60,7 @@ def main():
Path("report_allergene_korrektur.csv").unlink(missing_ok=True)
Path("report_allergene.md").unlink(missing_ok=True)
recipes = []
for json_file in os.listdir(OUTDIR_JSON):
with open(os.path.join(OUTDIR_JSON, json_file), "r", encoding="utf-8") as f:
data = json.load(f)
recipes.append(data)
recipes.sort(key=lambda r: r["name"])
recipes = read_recipes()
for recipe in recipes:
with open("report_allergene_korrektur.csv", "a") as f: