Comments (10)
It seems like these requests are wanting to make this more than just a recipe store, and something more like Grocy already is (Esp #32). I think that simply storing the recipes is enough, and exporting all ingredients (possibly with fuzzy-sorting) should be good enough.
from mealie.
I'm interested to see how the community would expect this to work. It would be easy enough to export a list of ingredients for each recipe. I'm not sure how useful that is without some sort of consolidate like-ingredients. To get consolidation of ingredients working effectively, you'd basically have to treat each ingredient as a data set with several parameters which makes scraping, and interacting with the recipe more difficult. Anytime you create a recipe you need to add the type, quantity, and description for each ingredient. I think that negatively effects the ease-of-use of the app which is the main goal overall.
from mealie.
A good next step might be something like:
- For first recipe, strip all ingredients of quantities and units and store in a hash table with an array of occurrences, so "1 tsp cayenne" and "1 cup flour" becomes:
{
"cayenne": ["1 tsp cayenne"],
"flour": ["1 cup flour"]
}
- For every following recipe and for each ingredient, fuzzy match the normalized ingredient and if there's a 80% match (arbitrary example), add it to the hash table array by key of match. If not a match, create a new key in the hash table. So if you're adding "1/2 tsp cayenne pepper" and "1 cup corn meal", you get:
{
"cayenne": ["1 tsp cayenne", "1/2 tsp cayenne pepper"],
"corn meal": ["1 cup corn meal"],
"flour": ["1 cup flour"]
}
- Once you get through parsing all the recipes, add them to the shopping list in alphabetical order, so the shopping list becomes:
1 tsp cayenne
1/2 tsp cayenne pepper
1 cup corn meal
1 cup flour
This would make it a little easier to manually combine them. There might be a better way, but this seemed like a fairly logical/easy next step. From there, you can maybe try to combine units, but you'd want a pretty high % fuzzy match to be comfortable that they're the same ingredient.
from mealie.
fwiw I'd be completely fine in the first case of printing page with each meal's ingredients for the week then manually concatenating - currently I do this from recipe books anyway. It's something the human brain is good at but computers are not :-)
from memory Grocy contains a fixed list of ingredients and conversions so the plan can calculate the complete quantities based on each recipe, but that'll probably be a lot of work to implement.
from mealie.
fwiw I'd be completely fine in the first case of printing page with each meal's ingredients for the week then manually concatenating - currently I do this from recipe books anyway. It's something the human brain is good at but computers are not :-)
I think the first feature is reasonable user request and something I'm up for supporting. I'll add it to the feature roadmap
from mealie.
References to implicated issues:
#70 Separate units and ingredients, add scaling
#62 [Feature] Auto-generated shopping list based on Meal Plan
#32 Feature: Crosslink ingredients to Recipe's
from mealie.
It seems like these requests are wanting to make this more than just a recipe store, and something more like Grocy already is (Esp #32). I think that simply storing the recipes is enough, and exporting all ingredients (possibly with fuzzy-sorting) should be good enough.
I agree. I think the best approach to solve these problems is to work outside of the data model. Adjusting the data model makes everyone's life more difficult IMO. I'm working on getting fuzzy search working and I think extending that to the shopping list to provide an optional grouping would be a great approach.
from mealie.
It seems like these requests are wanting to make this more than just a recipe store, and something more like Grocy already is (Esp #32). @StephenBrown2
Maybe I misunderstand either #32 or what Grocy is, but I would disagree. #32 is not concerned, necessarily, with grocery lists, shopping, etc. It is more concerned with an ingredient of a recipe being, itself, another recipe.
I think what #32 is saying is like:
-
Recipe for First Pie
- Ingredients:
- Pie Crust (Link to Recipe for Pie Crust)
- Apples (etc.)
- Ingredients:
-
Recipe for Second Pie
- Ingredients:
- Pie Crust (Link to Recipe for Pie Crust)
- Pecans (etc.)
- Ingredients:
-
Recipe for Pie Crust
- Ingredients:
- Sugar
- Flour
- Spice (etc.)
- Ingredients:
See, for instance, this article and the ingredients of "2 disks dough for 'Basic Crust'" and "1 Chocolate 'Crumb Crust'" The other recipes without the ingredients list are even kind of "sub"-recipes, e.g., "make Chocolate Pie".
This would be an interesting way to store this kind of data so that when you want to make the "Chocolate-Raspberry Pie" it would pull in the recipe for "Chocolate Pie", as that Recipe is a base ingredient.
I have seen this style recipe a lot, esp. in baking recipes and in Keto and Paleo recipes. For example, the recipe may call for "XO Sauce (pg. nn)" meaning that you use the XO Sause on page nn as an ingredient in this recipe since normal XO Sause you would buy at the store isn't Keto/Paleo.
This could also increase usability. When a person is entering a recipe, they would only have to enter something like "pie crust" and it would either import the pie crust recipe, or create an ingredient that would link off to a pie crust recipe.
Another benefit of this type of organization where the ingredients are separated out would be the option of including a method to provide common substitutions within the recipe at some point in the future.
The reason I linked #32 above as implicated is because it would require that the ingredients are more than simple text fields like they currently are.
Scaling recipes, converting units, converting measurements, cross-referencing ingredients, ingredient substitutions - all would require that the ingredients are more than simple strings in a recipe.
from mealie.
Ah yes, I misunderstood #32 based on the title only. That is different than I thought, but I think could be done by allowing markdown or similar in the ingredient list and including a link to that other recipe.
The rest is still getting outside the schema by quite a bit though.
from mealie.
Closing to consolidate feature requests into a mega-issue. See new Issue. Your request has been added to the initial list.
from mealie.
Related Issues (20)
- [BUG] - OpenAI - Error when using Ollama with no API Key HOT 5
- [BUG] - Using Authelia with OIDC comes back to login page HOT 7
- [SCRAPER] - Aldi (Australia) HOT 2
- Meal plan editing on iPad drags items rather than scrolls HOT 1
- [BUG] - Migrate from Recipe Keeper FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpm53kb5gd/recipekeeperhtml/recipes.html' HOT 5
- [BUG] - Recipe Keeper Import Failure HOT 1
- [BUG] - Scraper and image URL getter can't identify .jpeg HOT 4
- Shopping list goes blank as soon as internet connection is lost on iPhone HOT 3
- [BUG] - Users can see/manage foods/units/labels from other groups
- [BUG] - Cannot remove empty ingredient HOT 1
- Comments lost after editing recipe HOT 2
- [BUG] - 404 pages on docs site break styling
- [AllRecipes] - No ingredient are shown HOT 2
- [BUG] - Missing serving size when printing recipe HOT 2
- [BUG] - OpenAI ingredient parser fails in some cases HOT 6
- [BUG] - Recipe ingredient changes not saved before parsing ingredients
- [BUG] - Categories and Tags share query cache In the recipes manager
- Mealie to postgresql connect after database restart HOT 6
- [BUG][UX] The name Search for the Recipes tab is misleading HOT 7
- [BUG] - Daily task scheduler can be off by an hour HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mealie.