https://github.com/poustouflan/just-do-eat
Just Do Eat is a proof of concept of a recipe generator from ingredients
https://github.com/poustouflan/just-do-eat
Last synced: 4 months ago
JSON representation
Just Do Eat is a proof of concept of a recipe generator from ingredients
- Host: GitHub
- URL: https://github.com/poustouflan/just-do-eat
- Owner: PoustouFlan
- License: mit
- Created: 2022-09-07T18:00:39.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-09T13:02:35.000Z (almost 3 years ago)
- Last Synced: 2025-01-16T14:52:43.089Z (5 months ago)
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Just Do Eat !
##### Minimum Viable Code as a Proof of ConceptPython Proof of Concept for getting recipes from ingredients only
### Usage / Example :
```python
from justdoeat import Justdoeat
from marmiton import Marmitonsave = Justdoeat.load("data/save.p")
filtered = Justdoeat.filter(save, isVegan=True)print("3 recettes végan aléatoires :")
for url in Justdoeat.random_recipes(filtered, 3):
print(Marmiton.title_of_url(url))
print()ingredients = (
'beurre',
'sel',
'sucre',
'eau',
'tomate',
'oignon',
'ail',
'poivre',
'persil',
'thym',
'chair à saucisse',
'lait',
'muscade',
'pomme de terre',
'crème',
)
print("Toutes les recettes que vous pouvez faire en utilisant seulement ces"
" ingrédients:", ', '.join(ingredients))
for url in Justdoeat.uses_only(save, ingredients):
print(Marmiton.title_of_url(url))
print()ingredients = (
'chair à saucisse',
'pomme de terre',
'courgette',
)
print("Toutes les recettes qui utilisent chacun de ces ingrédients:",
', '.join(ingredients))
for url in Justdoeat.uses(save, ingredients):
print(Marmiton.title_of_url(url))
print()filtered = Justdoeat.filter(save, isPorkFree=True)
print("7 recettes sans porc qui ne nécessiteraient pas beaucoup d'achats"
" supplémentaires")
for url in Justdoeat.minimum_buy(save, ingredients, 7):
print(Marmiton.title_of_url(url))
```