✨ lib: read_recipes()
This commit is contained in:
parent
d54fd73e53
commit
6c7ad52c72
4 changed files with 7 additions and 30 deletions
|
|
@ -8,6 +8,7 @@ import os
|
|||
from tqdm import tqdm
|
||||
|
||||
from config import *
|
||||
from lib import *
|
||||
|
||||
include_title = False
|
||||
|
||||
|
|
@ -107,11 +108,7 @@ def format_recipe_to_markdown(recipe):
|
|||
|
||||
def main():
|
||||
|
||||
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 = read_recipes()
|
||||
|
||||
for recipe in tqdm(recipes):
|
||||
markdown_fn = f"{recipe.get('name', 'Untitled Recipe')}.md"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue