Coder Social home page Coder Social logo

Comments (10)

StephenBrown2 avatar StephenBrown2 commented on July 20, 2024 2

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.

hay-kot avatar hay-kot commented on July 20, 2024 1

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.

mdrichardson avatar mdrichardson commented on July 20, 2024 1

A good next step might be something like:

  1. 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"]
}
  1. 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"]
}
  1. 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.

obbardc avatar obbardc commented on July 20, 2024

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.

hay-kot avatar hay-kot commented on July 20, 2024

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.

dpieski avatar dpieski commented on July 20, 2024

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.

hay-kot avatar hay-kot commented on July 20, 2024

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.

dpieski avatar dpieski commented on July 20, 2024

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.)
  • Recipe for Second Pie

    • Ingredients:
      • Pie Crust (Link to Recipe for Pie Crust)
      • Pecans (etc.)
  • Recipe for Pie Crust

    • Ingredients:
      • Sugar
      • Flour
      • Spice (etc.)

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.

StephenBrown2 avatar StephenBrown2 commented on July 20, 2024

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.

hay-kot avatar hay-kot commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.