Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to provide a range of values for quantities, times #49

Open
shayaknyc opened this issue Mar 15, 2022 · 2 comments
Open

Be able to provide a range of values for quantities, times #49

shayaknyc opened this issue Mar 15, 2022 · 2 comments

Comments

@shayaknyc
Copy link

Sometimes, a recipe isn't exact and would require a range of quantities like 1-2 tablespoons, or 12-15 minutes. There doesn't appear to be an elegant way to accommodate something like this. While there are some "workarounds" in the instructions section, such as:

~bake{12%minutes} - 13 minutes

What renders in the "Timers" section is just "bake (12 minutes)". Similarly, if a dough needs 1-2 tablespoons of water, adding as needed to adjust for environmental factors (altitude, humidity, etc) the steps will only allow to define a single quantity such as @water{1%tablespoon}. Would be great to see this implemented. Unless there's something I'm missing?

@shayaknyc shayaknyc changed the title Be able to provide a range of values for quantities, times [Enhancement]: Be able to provide a range of values for quantities, times Mar 15, 2022
@dubadub
Copy link
Contributor

dubadub commented Mar 16, 2022

@shayaknyc there's some (simple) support of ranges in CLI. For example for ingredients and timer:

$ echo "Add @baking soda{1-2%tsp} and leave for ~{5-10%minutes}" | cook recipe read
Ingredients:
    baking soda                   1-2 tsp

Steps:
     1. Add baking soda and leave for 5-10 minutes
        [baking soda: 1-2 tsp]

It's not smart in a way that interpreted like string and in shopping list it won't combine with other references of baking soda.

@shayaknyc
Copy link
Author

I see....gottit. I think the issue I was having is that I'm primarily using the CookLang Editor extension in Obsidian, and I think it parses the code a little differently when it displays. If I type ~pickling{12-24%hours} in Obsidian, it renders literally ~pickling{12-24%hours} instead of showing the time as a range. The CLI doesn't seem to output the timer at all tho....

It does work with ingredient ranges though, so thank you - I see that working.

@dubadub dubadub changed the title [Enhancement]: Be able to provide a range of values for quantities, times Be able to provide a range of values for quantities, times Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants