Hacker News new | ask | show | jobs
by 22c 1088 days ago
This is interesting though perhaps a bit over-engineered.

I'd probably find myself less motivated to simply type something out to recipe.txt vs. manage all this but CookCLI does open up some interesting possibilities.

The first thing that came to mind would be that it'd be cool if CookCLI could "halve" recipes automatically. Say you had a recipe for 12 muffins but you only wanted to make 6 or 4, it could automatically divide those quantities and spit out a new recipe or shopping list.

Another cool CLI feature would be unit conversion; converting things like fluid ounces, or cups into ml.

My other piece of feedback is the overloading of {} for ending multi-word ingredient seems a bit off. It's more syntax but I'd still rather have something dedicated for that purpose eg. @(ground black pepper)

4 comments

> The first thing that came to mind would be that it'd be cool if CookCLI could "halve" recipes automatically. Say you had a recipe for 12 muffins but you only wanted to make 6 or 4, it could automatically divide those quantities and spit out a new recipe or shopping list.

The problem is that scaling recipes doesn't work this way, particularly for baking. Some ingredients don't scale linearly, cooking and mixing time doesn't scale linearly, etc. Savory items also have scaling issues, for example, some dishes include extra liquid that is lost to evaporation while cooking; you would likely not want to scale that up and would end up too much liquid at the end if you did. The opposite can be a problem too, don't scale down liquids in pressure cookers without thinking because you might end up without enough.

You would need a lot of extra metadata to be able to effectively scale recipes.

I didn't want to go into the details but I know that ingredients don't always scale linearly, but sometimes they do.

A recipe for 6 baked potatoes could probably be halved linearly, a recipe for pancakes could also probably be halved as well.

>My other piece of feedback is the overloading of {} for ending multi-word ingredient seems a bit off. It's more syntax but I'd still rather have something dedicated for that purpose eg. @(ground black pepper)

Yep, or just use the same tag marker at the end of the multi-word thing: #pot, #pressure cooker#, @onions, @ground black pepper@.

I was just about to write a comment saying that it would be more consistent with the other markup to have: @{ground black pepper}.
According to the docs [1], the halving thing is a work in progress with a syntax like:

>> servings: 2|4|8

Add @milk{1/2*%cup} and mix until smooth. -- Multiply by serving size

Add @milk{1|2|3%cup} and mix until smooth. -- Specific quantity per serving size

[1] https://cooklang.org/docs/roadmap/