You could do it like this : Create a data tiddler for a recipe with a quantity associated to each ingredient. To make things easier the unit will be hardcoded in grams (or whatever you like, but always the same).
Then you can select your recipe for the week with a select widget for example (https://tiddlywiki.com/#SelectWidget), use the data of the widget in a list widget (https://tiddlywiki.com/#ListWidget) which will sum the values of each unique index accross the data-tiddlers you selected. I think you will need the count Operator (https://tiddlywiki.com/#count%20Operator), getindex Operator (https://tiddlywiki.com/#getindex%20Operator), sum Operator (https://tiddlywiki.com/#sum%20Operator). Good luck and let me know if you need help to understand something :) Le samedi 4 décembre 2021 à 22:50:32 UTC+1, [email protected] a écrit : > Hello everyone, > > New here, using TW since a year ago but only for simple notekeeping which > didn't use a lot of in deep knowledge with it. > > I'm currently using the latest version available of TW (the v5.2.0 I think > ?). > > So here's my problem. As an effort to manage a bit more my money and my > time, I decided to invest in a batch cooking book which has proven great > overtime. > My problem is that each week, I need to manually type the cooking list on > my phone/computer. > I decided if I keep on doing it for a long time, I could as well simplify > the process. I thought about using TW but I am at loss as how to do it. > > *What I would want ideally* : > - To click on or in the tiddler "Week 1" for example and have an automatic > generated list of all the ingredients I need to buy for this week > - At the same time, I wish I could check/uncheck which recipe I would want > to in this week or not and have the adapted grocery list > - As an add-on, it would be great if I could check multiples ingredients > and see recipe which contain them > > The first thing (in my mind) doesn't seem complicated as I can simply > write the grocery list in "hard". > But I can't even begin to imagine how to "uncheck" a recipe of this week > and "decrease" the grocery list accordingly. > As a very very very basic knowledge (minimal), it would be like for > exemple creating a variable for "egg" which would contain "4" if all recipe > are checked but if I uncheck recipe for the tuesday which contain an egg, > the variable egg will be "3". > And to do it for all ingredients / recipe. > > Is someone here has an idea how to begin or to do something similar, I'm > all ear ! > > Thank for your answers > > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0243eabb-fb1f-4835-b209-eef7e749ee53n%40googlegroups.com.

