💄 indent input json, too

This commit is contained in:
neingeist 2025-06-02 20:26:49 +02:00
parent 81694d8aaf
commit 7e462dfa18
3 changed files with 840 additions and 6 deletions

View file

@ -7,6 +7,9 @@ output_file = 'export_2025-06-02_clean.json'
with open(input_file, 'r', encoding='utf-8') as f:
data = json.load(f)
# indent input file while we're at it
with open(input_file, 'w', encoding='utf-8') as f:
json.dump(data, f, ensure_ascii=False, indent=2)
def normalize_ingredients(recipe):
if 'recipeIngredient' in recipe: