cooklang-obsidian icon indicating copy to clipboard operation
cooklang-obsidian copied to clipboard

Combine multiple distinct ingredients into single entry

Open RichSteele opened this issue 3 years ago • 2 comments

If I have multiple uses of the same ingredient in the same recipe I'd prefer if the total was combined, perhaps with an optional "divided" annotation on the ingredient.

So, for example, if I have a recipe like:

Crack the @eggs{3} into a blender, then add the @flour{125%g}, @milk{250%ml} and @sea salt{1%pinch}, and blitz until smooth.

Separate @eggs{2} into separate bowls.

I get an ingredients list that looks like:

  • 3 eggs
  • 125 g flour
  • 250 ml milk
  • 1 pinch sea salt
  • 2 eggs

I'd prefer to see something like:

  • 5 eggs, divided
  • 125 g flour
  • 250 ml milk
  • 1 pinch sea salt

RichSteele avatar Nov 15 '21 22:11 RichSteele

This is definitely something I want to achieve at some point, but there are some things that need thinking through:

  • What happens if the two ingredients have different measurements? e.g. mix in @milk{3%cups} [...] Brush with @milk{1/2%tablespoon}. Maybe unit conversion is a prerequisite for this?
  • If inline measurements is off we'll still need to show inline measurements for these divided ingredients

deathau avatar Nov 18 '21 00:11 deathau

I add a +1 to this.

I'll also add this issue is relevant to cookware too, If a cookware appears more than once in the instructions, it'll appear more than once in the list.

As for the units question, I think a naive implementation to start with will be good enough. Meaning, if the units are the same, combine them. Otherwise, keep them separate. When this project will get to do unit conversions, the issue of smarter handling can be discussed again

snird avatar Dec 03 '21 21:12 snird