cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

Auto-detect times in steps to start timers

Open seyfeb opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

In recipes times for cooking, baking, etc. is often mentioned within the text. Often one wants to run a timer for this (and not necessarily or only the cooking time defined for the whole recipe).

Describe the solution you'd like

If in a text a time is mentioned like, e.g.,

Pour in the noodles and cook for 7 minutes.

the time should be auto detected, visually highlighted, and clicking/tapping on 7 minutes should start a timer.

I am aware that this requires language-specific implementations. Therefore I propose to add the https://schema.org/inLanguage property to recipes. This would allow creating regexes for the specific languages, starting by the most common ones (i.e., English and the ones the developers know) and working the way through other languages via pull requests of devs proficient in the respective language.

An alternative to the language property or a fallback if it's not set is to try to automatically detect the language (1, 2, 3).

Describe alternatives you've considered

Manually define cooking time for single steps. This would most certainly require manual work for auto-imported recipes.

seyfeb avatar Jun 06 '24 19:06 seyfeb

I really like the timer included. it is much better than the smartphone timer and with one click you have the right time, and even multiple timer at once :) That would be a very great feature to have more timers :) and to start it would be very useful to define timer(s) per step manually :)

SirFlour avatar Oct 05 '24 08:10 SirFlour

@seyfeb proposed something like that in a comment of the issue Timer per step

For the sake of completeness: On some other recipe/cooking website or app (can't remember which one) there were parts of an instruction > with a time highlighted that indicate a time. Something like

... bake the cake for 45 Minutes ....

which would start a timer when clicked upon. This could be auto-detected (difficult due to many available languages) or manually setup, e.g. via a link in markdown to some specific URL timer:T0H45M0S or whatever.

However in https://github.com/nextcloud/cookbook/discussions/1874 I made an example using the timeRequired property.

source: Comment by @seyfeb on https://github.com/nextcloud/cookbook/issues/706#issuecomment-1817810795

lmarvaud avatar Nov 16 '24 09:11 lmarvaud