import json

with open('parsed_recipes.json', encoding='utf-8') as f:
    recipes = json.load(f)

print(f"Total recipes: {len(recipes)}")
total_ing = sum(len(r['ingredients']) for r in recipes)
print(f"Total ingredients across all recipes: {total_ing}")

empty_ing = [r for r in recipes if len(r['ingredients']) == 0]
print(f"Recipes without ingredients: {len(empty_ing)}")
for r in empty_ing:
    print(f"  #{r['num']}: {r['name']} (Fuente: {r['source']})")

print("\nSample 5 recipes:")
for r in recipes[:5]:
    print(f"\nReceta #{r['num']}: {r['name']} ({r['family']}) - Fuente: {r['source']}")
    for ing in r['ingredients']:
        obs = f" ({ing['obs']})" if ing['obs'] else ""
        print(f"  - {ing['ingrediente']}: {ing['cantidad']} {ing['unidad']}{obs}")
    if r['proceso']:
        print(f"  Proceso: {r['proceso'][:100]}...")

