Files
wtc.waiswuaschd.de/dump_recipe_texts.py

32 lines
995 B
Python

import os
DIR = "/home/maxi/Projekt/wtc.waiswuaschd.de/data/extracted_texts"
files = [
"schnelle Ramen.txt",
"ramen_rezepte.txt",
"Brezen Cracker.txt",
"Currytaschen.txt",
"Kidneybohnen.txt",
"Mango Limetten Triffle.txt",
"Orangentofu mit Reis.txt",
"Orzo Halloumi Salat.txt",
"Schokomousse.txt",
"One Pot Mie Nudeln.txt",
"Bao Buns mit Champignons.txt",
"Lachs in Thai-Curry-Soße mit Zucchini.txt",
"Blätterteigpäckchen mit Spargel.txt",
"Spaghetti in Zitronenbutter und Lachs mit Macadamiakruste.txt"
]
for fname in files:
fpath = os.path.join(DIR, fname)
if os.path.exists(fpath):
print(f"==================================================")
print(f"FILE: {fname}")
print(f"==================================================")
with open(fpath, "r", encoding="utf-8", errors="replace") as f:
print(f.read())
print("\n")
else:
print(f"FILE NOT FOUND: {fname}")