Re: [tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-07 Thread John D
/!\ I discovered there is a small issue with my data tiddler editor :
plugins tiddlers are also affected by the viewtemplate ! This is a bit
annoying so here's how to fix it :

replace

<$list filter="[is[current]get[type]match[application/json]]" variable=_>

by

<$list 
filter="[is[current]!is[shadow]!has[plugin-type]get[type]match[application/json]]"
variable=_>

Updated tiddler : download it here


Also please note that this tool will only work with application/json data
tiddler, in the form { "key":"value", "key2":"value2" } (no nested data!)
To create a new recipe, create a new tiddler and set the type to
application/json (or clone an existing recipe).

If you only want this viewTemplate to work for data tiddler with the tag
*recipe*, change the list filter to

"[tag[recipe]is[current]!is[shadow]!has[plugin-type]get[type]match[application/json]]"



Le mar. 7 déc. 2021 à 12:28, Télumire  a écrit :

> This thread was a very interesting read and a fun coding experience,
> thanks to all of you ^^
> And @cassandra, I'm french too and happen to have an interest in cooking
> so please share your work ! :)
> Le mardi 7 décembre 2021 à 02:39:55 UTC+1, cj.v...@gmail.com a écrit :
>
>> "Je batch cook? "  Moi too, et thank le p'tit bébé Jésus parc'que-j'batch
>> mange...
>>
>> Which makes me think right away of "Le Chiac est la solution
>> " and something a gal once
>> told me:  "ma soeur va shack-é up avec son boyfriend."
>>
>> BTW: I love "development" with/in TiddlyWiki, from the
>> mostly-all-about-data-and-organization (Le P'tit Aurèle
>> ) to some pretty out-there kind of
>> "programming" (BASIC Anywhere Machine
>> ).  The stuff that
>> can be done with TiddlyWiki is really amazing.
>>
>> But collaborative "development" via forums?  Yeah, that's major heartburn
>> for this kid.
>>
>> On Monday, December 6, 2021 at 9:10:28 PM UTC-4 cassandr...@gmail.com
>> wrote:
>>
>>> Thank you all !
>>>
>>> In the order :
>>> @CJ : thank you for your help ! I can see how the type of plateform for
>>> developing can be awful to use haha. Hope my little project was interessing
>>> for you ! Cheers =D
>>>
>>> @Mat : I'm keeping the NewTids macro in my mind for future use, it does
>>> seem pretty useful ! For now, with a mix of google lens on my phone and
>>> copy pasting directly in my computer, I'm doing it pretty fast ! Just a bit
>>> of tweaking and adjusting the format is fine.
>>> I work in a field which sometime is a bit taxing mentally and I find
>>> doing simple repetitive task help me allievate the stress haha.
>>>
>>> @Stobot : thank you for the files ! I imported both yours and John D
>>> methods and while Télumire's is more completed, I really like your idea and
>>> how you formated it ! I think it can be pretty useful for a lot of
>>> situation.
>>> As a total newbie, TW was a bit hard to get into at first. I watched a
>>> serie of tutorial video and read some more to only begin to have a normal
>>> functionnal TW.
>>> Your idea of incremental tutotal could be a great way to facilitate the
>>> appropriation of the TW for beginner !
>>>
>>> @And finally Télumire/John D : thank you a lot for all your work ! I
>>> tested it and it worked just fine. It answers to all my problem and more
>>> haha.
>>> Reading the programing behind was very interessing ! I understood where
>>> it comes from (but I never could have written it as easily as you and not
>>> for a bit of time).
>>> Thank you as well for the ressources you listed. I will read it to
>>> optimize my utilisation of TW which is such a great tool but I only scraped
>>> the surface.
>>> The Data Tiddler Editor you writted was way way way too complicated for
>>> me to understand but I can really appreciate what it does ^^ !
>>> Anyway, thank you again !
>>>
>>> With thing as they are now, I guess I can do a pretty good version of
>>> the TW I imagined. I will maybe post it here when it will be a bit fuller
>>> but I'm french so all the tiddly/recipe/ingredient would be too. Not sure
>>> if it could help someone without the book (which is "Je batch cook toute
>>> l'année" of Sandra Thomann).
>>>
>>> Thank you all again !
>>>
>>> Le lundi 6 décembre 2021 à 12:35:37 UTC+1, Télumire a écrit :
>>>
 check multiples ingredients and see recipe which contain them
>
 To get the recipes with a specific ingredient :

 <$list filter="[[apple]] [[banana]]" variable=ingredient>

 <> = {{{ [has:index] }}}

 

 Le lun. 6 déc. 2021 à 12:10, John D  a écrit :

> I ended up procrastinating so here's the solution :
>
> !!! 1. Select the recipes
>
> <$select field='selection' multiple
> size={{{[tag[recipe]type[application/json]count[]]}}}>
> <$list 

Re: [tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-07 Thread Télumire
This thread was a very interesting read and a fun coding experience, thanks 
to all of you ^^ 
And @cassandra, I'm french too and happen to have an interest in cooking so 
please share your work ! :)
Le mardi 7 décembre 2021 à 02:39:55 UTC+1, cj.v...@gmail.com a écrit :

> "Je batch cook? "  Moi too, et thank le p'tit bébé Jésus parc'que-j'batch 
> mange...
>
> Which makes me think right away of "Le Chiac est la solution 
> " and something a gal once 
> told me:  "ma soeur va shack-é up avec son boyfriend."
>
> BTW: I love "development" with/in TiddlyWiki, from the 
> mostly-all-about-data-and-organization (Le P'tit Aurèle 
> ) to some pretty out-there kind of 
> "programming" (BASIC Anywhere Machine 
> ).  The stuff that 
> can be done with TiddlyWiki is really amazing.
>
> But collaborative "development" via forums?  Yeah, that's major heartburn 
> for this kid.
>
> On Monday, December 6, 2021 at 9:10:28 PM UTC-4 cassandr...@gmail.com 
> wrote:
>
>> Thank you all !
>>
>> In the order :
>> @CJ : thank you for your help ! I can see how the type of plateform for 
>> developing can be awful to use haha. Hope my little project was interessing 
>> for you ! Cheers =D
>>
>> @Mat : I'm keeping the NewTids macro in my mind for future use, it does 
>> seem pretty useful ! For now, with a mix of google lens on my phone and 
>> copy pasting directly in my computer, I'm doing it pretty fast ! Just a bit 
>> of tweaking and adjusting the format is fine.
>> I work in a field which sometime is a bit taxing mentally and I find 
>> doing simple repetitive task help me allievate the stress haha.
>>
>> @Stobot : thank you for the files ! I imported both yours and John D 
>> methods and while Télumire's is more completed, I really like your idea and 
>> how you formated it ! I think it can be pretty useful for a lot of 
>> situation.
>> As a total newbie, TW was a bit hard to get into at first. I watched a 
>> serie of tutorial video and read some more to only begin to have a normal 
>> functionnal TW.
>> Your idea of incremental tutotal could be a great way to facilitate the 
>> appropriation of the TW for beginner !
>>
>> @And finally Télumire/John D : thank you a lot for all your work ! I 
>> tested it and it worked just fine. It answers to all my problem and more 
>> haha.
>> Reading the programing behind was very interessing ! I understood where 
>> it comes from (but I never could have written it as easily as you and not 
>> for a bit of time).
>> Thank you as well for the ressources you listed. I will read it to 
>> optimize my utilisation of TW which is such a great tool but I only scraped 
>> the surface.
>> The Data Tiddler Editor you writted was way way way too complicated for 
>> me to understand but I can really appreciate what it does ^^ !
>> Anyway, thank you again !
>>
>> With thing as they are now, I guess I can do a pretty good version of the 
>> TW I imagined. I will maybe post it here when it will be a bit fuller but 
>> I'm french so all the tiddly/recipe/ingredient would be too. Not sure if it 
>> could help someone without the book (which is "Je batch cook toute l'année" 
>> of Sandra Thomann).
>>
>> Thank you all again !
>>
>> Le lundi 6 décembre 2021 à 12:35:37 UTC+1, Télumire a écrit :
>>
>>> check multiples ingredients and see recipe which contain them 

>>> To get the recipes with a specific ingredient : 
>>>
>>> <$list filter="[[apple]] [[banana]]" variable=ingredient>
>>>
>>> <> = {{{ [has:index] }}}
>>>
>>> 
>>>
>>> Le lun. 6 déc. 2021 à 12:10, John D  a écrit :
>>>
 I ended up procrastinating so here's the solution : 

 !!! 1. Select the recipes

 <$select field='selection' multiple 
 size={{{[tag[recipe]type[application/json]count[]]}}}>
 <$list filter='[tag[recipe]type[application/json]]'>
 <$view field='title'/>
 
 

 Recipe selected : {{!!selection}}

 !!! 2. List of ingredients

 
 <$list filter="[list[!!selection]indexes[]]" variable=ingredient>
 <>{{{ 
 [list[!!selection]getindexsum[]]}}}
 
 

 Online demo : 
 https://telumire.be/TiddlyTweaks/index.html#:%5B%5BGrocery%20list%5D%5D%5B%5Brecipe%202%5D%5D%5B%5Brecipe%201%5D%5D%5B%5BData%20Tiddler%20Editor%5D%5D

 Le lun. 6 déc. 2021 à 10:42, John D  a écrit :

> Seems like google group doesnt like avi files, here's a GIF instead : 
> [image: 
> image.gif]
>
>
>
>
> Le lun. 6 déc. 2021 à 10:24, John D  a écrit :
>
>> One big obstacle for me is how to use operator in Tiddlywiki 
>>>
>>
>> @Cass, at first tiddlywiki seems a bit weird in its logic, the best 
>> advice I can give you is to search for system tiddler and see how 
>> everything is done :) I also highly recommend you to read 
>> GrokTiddlywiki 

Re: [tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-06 Thread Charlie Veniot
"Je batch cook? "  Moi too, et thank le p'tit bébé Jésus parc'que-j'batch 
mange...

Which makes me think right away of "Le Chiac est la solution 
" and something a gal once 
told me:  "ma soeur va shack-é up avec son boyfriend."

BTW: I love "development" with/in TiddlyWiki, from the 
mostly-all-about-data-and-organization (Le P'tit Aurèle 
) to some pretty out-there kind of 
"programming" (BASIC Anywhere Machine 
).  The stuff that can 
be done with TiddlyWiki is really amazing.

But collaborative "development" via forums?  Yeah, that's major heartburn 
for this kid.

On Monday, December 6, 2021 at 9:10:28 PM UTC-4 cassandr...@gmail.com wrote:

> Thank you all !
>
> In the order :
> @CJ : thank you for your help ! I can see how the type of plateform for 
> developing can be awful to use haha. Hope my little project was interessing 
> for you ! Cheers =D
>
> @Mat : I'm keeping the NewTids macro in my mind for future use, it does 
> seem pretty useful ! For now, with a mix of google lens on my phone and 
> copy pasting directly in my computer, I'm doing it pretty fast ! Just a bit 
> of tweaking and adjusting the format is fine.
> I work in a field which sometime is a bit taxing mentally and I find doing 
> simple repetitive task help me allievate the stress haha.
>
> @Stobot : thank you for the files ! I imported both yours and John D 
> methods and while Télumire's is more completed, I really like your idea and 
> how you formated it ! I think it can be pretty useful for a lot of 
> situation.
> As a total newbie, TW was a bit hard to get into at first. I watched a 
> serie of tutorial video and read some more to only begin to have a normal 
> functionnal TW.
> Your idea of incremental tutotal could be a great way to facilitate the 
> appropriation of the TW for beginner !
>
> @And finally Télumire/John D : thank you a lot for all your work ! I 
> tested it and it worked just fine. It answers to all my problem and more 
> haha.
> Reading the programing behind was very interessing ! I understood where it 
> comes from (but I never could have written it as easily as you and not for 
> a bit of time).
> Thank you as well for the ressources you listed. I will read it to 
> optimize my utilisation of TW which is such a great tool but I only scraped 
> the surface.
> The Data Tiddler Editor you writted was way way way too complicated for me 
> to understand but I can really appreciate what it does ^^ !
> Anyway, thank you again !
>
> With thing as they are now, I guess I can do a pretty good version of the 
> TW I imagined. I will maybe post it here when it will be a bit fuller but 
> I'm french so all the tiddly/recipe/ingredient would be too. Not sure if it 
> could help someone without the book (which is "Je batch cook toute l'année" 
> of Sandra Thomann).
>
> Thank you all again !
>
> Le lundi 6 décembre 2021 à 12:35:37 UTC+1, Télumire a écrit :
>
>> check multiples ingredients and see recipe which contain them 
>>>
>> To get the recipes with a specific ingredient : 
>>
>> <$list filter="[[apple]] [[banana]]" variable=ingredient>
>>
>> <> = {{{ [has:index] }}}
>>
>> 
>>
>> Le lun. 6 déc. 2021 à 12:10, John D  a écrit :
>>
>>> I ended up procrastinating so here's the solution : 
>>>
>>> !!! 1. Select the recipes
>>>
>>> <$select field='selection' multiple 
>>> size={{{[tag[recipe]type[application/json]count[]]}}}>
>>> <$list filter='[tag[recipe]type[application/json]]'>
>>> <$view field='title'/>
>>> 
>>> 
>>>
>>> Recipe selected : {{!!selection}}
>>>
>>> !!! 2. List of ingredients
>>>
>>> 
>>> <$list filter="[list[!!selection]indexes[]]" variable=ingredient>
>>> <>{{{ 
>>> [list[!!selection]getindexsum[]]}}}
>>> 
>>> 
>>>
>>> Online demo : 
>>> https://telumire.be/TiddlyTweaks/index.html#:%5B%5BGrocery%20list%5D%5D%5B%5Brecipe%202%5D%5D%5B%5Brecipe%201%5D%5D%5B%5BData%20Tiddler%20Editor%5D%5D
>>>
>>> Le lun. 6 déc. 2021 à 10:42, John D  a écrit :
>>>
 Seems like google group doesnt like avi files, here's a GIF instead : 
 [image: 
 image.gif]




 Le lun. 6 déc. 2021 à 10:24, John D  a écrit :

> One big obstacle for me is how to use operator in Tiddlywiki 
>>
>
> @Cass, at first tiddlywiki seems a bit weird in its logic, the best 
> advice I can give you is to search for system tiddler and see how 
> everything is done :) I also highly recommend you to read 
> GrokTiddlywiki , it's a very good 
> book (the chapter Variables, Macros, and Transclusions 
> 
>  
> in particular should give you all the info you need).
>
> To sum it up : filter expressions can be used either as-is in widgets 
> with a filter attribute (like the list widget, set widget, etc), or as a 
> 

Re: [tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-06 Thread Cass P
Thank you all !

In the order :
@CJ : thank you for your help ! I can see how the type of plateform for 
developing can be awful to use haha. Hope my little project was interessing 
for you ! Cheers =D

@Mat : I'm keeping the NewTids macro in my mind for future use, it does 
seem pretty useful ! For now, with a mix of google lens on my phone and 
copy pasting directly in my computer, I'm doing it pretty fast ! Just a bit 
of tweaking and adjusting the format is fine.
I work in a field which sometime is a bit taxing mentally and I find doing 
simple repetitive task help me allievate the stress haha.

@Stobot : thank you for the files ! I imported both yours and John D 
methods and while Télumire's is more completed, I really like your idea and 
how you formated it ! I think it can be pretty useful for a lot of 
situation.
As a total newbie, TW was a bit hard to get into at first. I watched a 
serie of tutorial video and read some more to only begin to have a normal 
functionnal TW.
Your idea of incremental tutotal could be a great way to facilitate the 
appropriation of the TW for beginner !

@And finally Télumire/John D : thank you a lot for all your work ! I tested 
it and it worked just fine. It answers to all my problem and more haha.
Reading the programing behind was very interessing ! I understood where it 
comes from (but I never could have written it as easily as you and not for 
a bit of time).
Thank you as well for the ressources you listed. I will read it to optimize 
my utilisation of TW which is such a great tool but I only scraped the 
surface.
The Data Tiddler Editor you writted was way way way too complicated for me 
to understand but I can really appreciate what it does ^^ !
Anyway, thank you again !

With thing as they are now, I guess I can do a pretty good version of the 
TW I imagined. I will maybe post it here when it will be a bit fuller but 
I'm french so all the tiddly/recipe/ingredient would be too. Not sure if it 
could help someone without the book (which is "Je batch cook toute l'année" 
of Sandra Thomann).

Thank you all again !

Le lundi 6 décembre 2021 à 12:35:37 UTC+1, Télumire a écrit :

> check multiples ingredients and see recipe which contain them 
>>
> To get the recipes with a specific ingredient : 
>
> <$list filter="[[apple]] [[banana]]" variable=ingredient>
>
> <> = {{{ [has:index] }}}
>
> 
>
> Le lun. 6 déc. 2021 à 12:10, John D  a écrit :
>
>> I ended up procrastinating so here's the solution : 
>>
>> !!! 1. Select the recipes
>>
>> <$select field='selection' multiple 
>> size={{{[tag[recipe]type[application/json]count[]]}}}>
>> <$list filter='[tag[recipe]type[application/json]]'>
>> <$view field='title'/>
>> 
>> 
>>
>> Recipe selected : {{!!selection}}
>>
>> !!! 2. List of ingredients
>>
>> 
>> <$list filter="[list[!!selection]indexes[]]" variable=ingredient>
>> <>{{{ 
>> [list[!!selection]getindexsum[]]}}}
>> 
>> 
>>
>> Online demo : 
>> https://telumire.be/TiddlyTweaks/index.html#:%5B%5BGrocery%20list%5D%5D%5B%5Brecipe%202%5D%5D%5B%5Brecipe%201%5D%5D%5B%5BData%20Tiddler%20Editor%5D%5D
>>
>> Le lun. 6 déc. 2021 à 10:42, John D  a écrit :
>>
>>> Seems like google group doesnt like avi files, here's a GIF instead : 
>>> [image: 
>>> image.gif]
>>>
>>>
>>>
>>>
>>> Le lun. 6 déc. 2021 à 10:24, John D  a écrit :
>>>
 One big obstacle for me is how to use operator in Tiddlywiki 
>

 @Cass, at first tiddlywiki seems a bit weird in its logic, the best 
 advice I can give you is to search for system tiddler and see how 
 everything is done :) I also highly recommend you to read 
 GrokTiddlywiki , it's a very good 
 book (the chapter Variables, Macros, and Transclusions 
 
  
 in particular should give you all the info you need).

 To sum it up : filter expressions can be used either as-is in widgets 
 with a filter attribute (like the list widget, set widget, etc), or as a 
 filtered 
 transclusion  
 (between {{{ }}}).

 From what I understand in the pure logic form (correct me if I'm wrong) 
> : 
> I need to write a formula which will take into account which data 
> tiddler I selected in the multiple select. With selected data tiddlers, I 
> will need to show the name property with the index value associated 
> (which 
> I need to get with getindex). In case there are multiples same named 
> property, I need to use the function SUM.
>

 Yup, that sounds about right ! You may need to nest several list widget 
 but it should be possible to do it for each ingredient in one filter. Also 
 you may need to use the indexes Operator 
 to get the list of 
 ingredient name in a data tiddler

 I don't have a lot of time right now 

[tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-05 Thread Mat
Feeding in individual food items into TW is a tedious task. *IF* you intend 
to do this, may I recommend the NewTids macro 
.

<:-)

On Sunday, December 5, 2021 at 7:52:47 PM UTC+1 cj.v...@gmail.com wrote:

> There are loads of ridiculously adept TiddlyWiki folk who can help you out.
>
> I'll have to bail, because trying to help out with this kind of thing via 
> any forum is way too chaotic and disorganised for me to contribute towards 
> the development of good stuff.  (Information Systems/Business Analyst and 
> software developer I am, but I have a cognitive disability and quickly 
> become dysfunctional in this kind of environment.)
>
> I look forward to seeing the end-result, because what you have in mind is 
> an awesome use-case for TiddlyWiki.
>
> Cheers  and best regards!
> On Sunday, December 5, 2021 at 1:54:42 PM UTC-4 cassandr...@gmail.com 
> wrote:
>
>> Thank you all for your answer !
>>
>> @CJ : for the practical aspect of the grocery list, I already have a 
>> pretty good idea of the function I want as I'm already be using the book 
>> for quite some time. The serving doesn't need to be adapted.
>> Most ingredients are either in gram or in unity (for exemple, most of the 
>> vegetable is indicated as "two onions". Pasta or rice are indicated in 
>> gram).
>> I am confortable enough with the recipes and cooking in general to adapt 
>> which type (volume) of onion I need even if it's roughly indicated I need 4 
>> onions.
>> The biggest problem for me right now is the programming part as I have no 
>> education in the matter unfortunately haha.
>>
>> @Télumire : thank for the proceding, I did understand the reasoning but 
>> I'm having troubles for implementing it.
>> As said just now, I don't have a good programming knowledge and I think 
>> the most I knew where how to print the famous HelloWorld haha.
>> For now, I did create the  data tiddler for all recipes of week 1.  I did 
>> implement a simple multiple select but with no function in it because I 
>> can't write it.
>>
>> From what I understand in the pure logic form (correct me if I'm wrong) : 
>> I need to write a formula which will take into account which data tiddler 
>> I selected in the multiple select. With selected data tiddlers, I will need 
>> to show the name property with the index value associated (which I need to 
>> get with getindex). In case there are multiples same named property, I need 
>> to use the function SUM.
>>
>> One big obstacle for me is how to use operator in Tiddlywiki. Just 
>> copy-pasting the formula doesn't seem to work because I guess I need to put 
>> something to tell Tiddler that what I'm writing is a formula. Until now, 
>> using the bracet [] for simple list were enough. I think I don't know the 
>> basic of the basic to implement formula in my tiddler. 
>> Do you have a good ressource to learn from ? I saw TW page for developper 
>> but I don't know if it's adapted. Ressources with already written formula 
>> from which I can inspire myself is a big help too ^^ (for example, a 
>> pratical use of the getindex in action and not in the example of the TW. If 
>> not, it's okay !).
>>
>> I am not in hurry, it's more of a fun side project so learning it to do 
>> it myself could be benefical in the long term if I want to use Tiddlywiki 
>> more ^^ !
>>
>> Le dimanche 5 décembre 2021 à 00:00:18 UTC+1, Álvaro a écrit :
>>
>>>
>>> As they said, you have to think about how save the ingredients of the 
>>> recipe in the tiddler, you can use the index of a data tiddler for recipe 
>>> or simply the field of a tiddler for recipe. 
>>>
>>> Then you would need to use the filters  
>>> and their operators. You will need to retrieve the data for your grocery 
>>> list.
>>> El sábado, 4 de diciembre de 2021 a las 23:37:47 UTC+1, 
>>> cj.v...@gmail.com escribió:
>>>
 Example of something to keep in mind: if a recipe calls for 100grams of 
 onion, you'll want to convert that into something useful for grocery 
 shopping.

 Probably good to instead talk about a measure of an onion for 
 groceries.  You won't be buying a 100 g onion, so you'll want to have 1 
 onion, regardless of size and know you'll have left-over onion for your 
 omelette the next day.  Because you need about 1/4 of a small onion, or 
 whatever  of a big onion.

 But if you need an amount of grams o' onion that requires a large 
 onion, then you'll want a way to say a large onion.  Or two small onions.  
 Or whatever.  Knowing you'll be doing a little bit of rough math at the 
 grocery store.

 Your grocery list will get messy if you have 1 small onion and 1 large 
 onion when the onions are in a bag.

 All of that to say, don't be to quick to start building everything in 
 TW until you can visualize (spreadsheet or whatever) get a somewhat 
 reasonable amount of "stuff" for the big picture.


[tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-05 Thread Charlie Veniot
There are loads of ridiculously adept TiddlyWiki folk who can help you out.

I'll have to bail, because trying to help out with this kind of thing via 
any forum is way too chaotic and disorganised for me to contribute towards 
the development of good stuff.  (Information Systems/Business Analyst and 
software developer I am, but I have a cognitive disability and quickly 
become dysfunctional in this kind of environment.)

I look forward to seeing the end-result, because what you have in mind is 
an awesome use-case for TiddlyWiki.

Cheers  and best regards!
On Sunday, December 5, 2021 at 1:54:42 PM UTC-4 cassandr...@gmail.com wrote:

> Thank you all for your answer !
>
> @CJ : for the practical aspect of the grocery list, I already have a 
> pretty good idea of the function I want as I'm already be using the book 
> for quite some time. The serving doesn't need to be adapted.
> Most ingredients are either in gram or in unity (for exemple, most of the 
> vegetable is indicated as "two onions". Pasta or rice are indicated in 
> gram).
> I am confortable enough with the recipes and cooking in general to adapt 
> which type (volume) of onion I need even if it's roughly indicated I need 4 
> onions.
> The biggest problem for me right now is the programming part as I have no 
> education in the matter unfortunately haha.
>
> @Télumire : thank for the proceding, I did understand the reasoning but 
> I'm having troubles for implementing it.
> As said just now, I don't have a good programming knowledge and I think 
> the most I knew where how to print the famous HelloWorld haha.
> For now, I did create the  data tiddler for all recipes of week 1.  I did 
> implement a simple multiple select but with no function in it because I 
> can't write it.
>
> From what I understand in the pure logic form (correct me if I'm wrong) : 
> I need to write a formula which will take into account which data tiddler 
> I selected in the multiple select. With selected data tiddlers, I will need 
> to show the name property with the index value associated (which I need to 
> get with getindex). In case there are multiples same named property, I need 
> to use the function SUM.
>
> One big obstacle for me is how to use operator in Tiddlywiki. Just 
> copy-pasting the formula doesn't seem to work because I guess I need to put 
> something to tell Tiddler that what I'm writing is a formula. Until now, 
> using the bracet [] for simple list were enough. I think I don't know the 
> basic of the basic to implement formula in my tiddler. 
> Do you have a good ressource to learn from ? I saw TW page for developper 
> but I don't know if it's adapted. Ressources with already written formula 
> from which I can inspire myself is a big help too ^^ (for example, a 
> pratical use of the getindex in action and not in the example of the TW. If 
> not, it's okay !).
>
> I am not in hurry, it's more of a fun side project so learning it to do it 
> myself could be benefical in the long term if I want to use Tiddlywiki more 
> ^^ !
>
> Le dimanche 5 décembre 2021 à 00:00:18 UTC+1, Álvaro a écrit :
>
>>
>> As they said, you have to think about how save the ingredients of the 
>> recipe in the tiddler, you can use the index of a data tiddler for recipe 
>> or simply the field of a tiddler for recipe. 
>>
>> Then you would need to use the filters  
>> and their operators. You will need to retrieve the data for your grocery 
>> list.
>> El sábado, 4 de diciembre de 2021 a las 23:37:47 UTC+1, cj.v...@gmail.com 
>> escribió:
>>
>>> Example of something to keep in mind: if a recipe calls for 100grams of 
>>> onion, you'll want to convert that into something useful for grocery 
>>> shopping.
>>>
>>> Probably good to instead talk about a measure of an onion for 
>>> groceries.  You won't be buying a 100 g onion, so you'll want to have 1 
>>> onion, regardless of size and know you'll have left-over onion for your 
>>> omelette the next day.  Because you need about 1/4 of a small onion, or 
>>> whatever  of a big onion.
>>>
>>> But if you need an amount of grams o' onion that requires a large onion, 
>>> then you'll want a way to say a large onion.  Or two small onions.  Or 
>>> whatever.  Knowing you'll be doing a little bit of rough math at the 
>>> grocery store.
>>>
>>> Your grocery list will get messy if you have 1 small onion and 1 large 
>>> onion when the onions are in a bag.
>>>
>>> All of that to say, don't be to quick to start building everything in TW 
>>> until you can visualize (spreadsheet or whatever) get a somewhat reasonable 
>>> amount of "stuff" for the big picture.
>>>
>>> This process will help you decide to what degree of complex you want, 
>>> and how/what/where to simplify when you don't want to get that bogged down 
>>> in complexity, yadda yadda.
>>>
>>> On Saturday, December 4, 2021 at 6:17:49 PM UTC-4 Télumire wrote:
>>>
 You could do it like this : 

 Create a data tiddler for a recipe 

[tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-05 Thread Cass P
Thank you all for your answer !

@CJ : for the practical aspect of the grocery list, I already have a pretty 
good idea of the function I want as I'm already be using the book for quite 
some time. The serving doesn't need to be adapted.
Most ingredients are either in gram or in unity (for exemple, most of the 
vegetable is indicated as "two onions". Pasta or rice are indicated in 
gram).
I am confortable enough with the recipes and cooking in general to adapt 
which type (volume) of onion I need even if it's roughly indicated I need 4 
onions.
The biggest problem for me right now is the programming part as I have no 
education in the matter unfortunately haha.

@Télumire : thank for the proceding, I did understand the reasoning but I'm 
having troubles for implementing it.
As said just now, I don't have a good programming knowledge and I think the 
most I knew where how to print the famous HelloWorld haha.
For now, I did create the  data tiddler for all recipes of week 1.  I did 
implement a simple multiple select but with no function in it because I 
can't write it.

>From what I understand in the pure logic form (correct me if I'm wrong) : 
I need to write a formula which will take into account which data tiddler I 
selected in the multiple select. With selected data tiddlers, I will need 
to show the name property with the index value associated (which I need to 
get with getindex). In case there are multiples same named property, I need 
to use the function SUM.

One big obstacle for me is how to use operator in Tiddlywiki. Just 
copy-pasting the formula doesn't seem to work because I guess I need to put 
something to tell Tiddler that what I'm writing is a formula. Until now, 
using the bracet [] for simple list were enough. I think I don't know the 
basic of the basic to implement formula in my tiddler. 
Do you have a good ressource to learn from ? I saw TW page for developper 
but I don't know if it's adapted. Ressources with already written formula 
from which I can inspire myself is a big help too ^^ (for example, a 
pratical use of the getindex in action and not in the example of the TW. If 
not, it's okay !).

I am not in hurry, it's more of a fun side project so learning it to do it 
myself could be benefical in the long term if I want to use Tiddlywiki more 
^^ !

Le dimanche 5 décembre 2021 à 00:00:18 UTC+1, Álvaro a écrit :

>
> As they said, you have to think about how save the ingredients of the 
> recipe in the tiddler, you can use the index of a data tiddler for recipe 
> or simply the field of a tiddler for recipe. 
>
> Then you would need to use the filters  
> and their operators. You will need to retrieve the data for your grocery 
> list.
> El sábado, 4 de diciembre de 2021 a las 23:37:47 UTC+1, cj.v...@gmail.com 
> escribió:
>
>> Example of something to keep in mind: if a recipe calls for 100grams of 
>> onion, you'll want to convert that into something useful for grocery 
>> shopping.
>>
>> Probably good to instead talk about a measure of an onion for groceries.  
>> You won't be buying a 100 g onion, so you'll want to have 1 onion, 
>> regardless of size and know you'll have left-over onion for your omelette 
>> the next day.  Because you need about 1/4 of a small onion, or whatever  of 
>> a big onion.
>>
>> But if you need an amount of grams o' onion that requires a large onion, 
>> then you'll want a way to say a large onion.  Or two small onions.  Or 
>> whatever.  Knowing you'll be doing a little bit of rough math at the 
>> grocery store.
>>
>> Your grocery list will get messy if you have 1 small onion and 1 large 
>> onion when the onions are in a bag.
>>
>> All of that to say, don't be to quick to start building everything in TW 
>> until you can visualize (spreadsheet or whatever) get a somewhat reasonable 
>> amount of "stuff" for the big picture.
>>
>> This process will help you decide to what degree of complex you want, and 
>> how/what/where to simplify when you don't want to get that bogged down in 
>> complexity, yadda yadda.
>>
>> On Saturday, December 4, 2021 at 6:17:49 PM UTC-4 Télumire wrote:
>>
>>> 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 

[tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-04 Thread Álvaro

As they said, you have to think about how save the ingredients of the 
recipe in the tiddler, you can use the index of a data tiddler for recipe 
or simply the field of a tiddler for recipe. 

Then you would need to use the filters  
and their operators. You will need to retrieve the data for your grocery 
list.
El sábado, 4 de diciembre de 2021 a las 23:37:47 UTC+1, cj.v...@gmail.com 
escribió:

> Example of something to keep in mind: if a recipe calls for 100grams of 
> onion, you'll want to convert that into something useful for grocery 
> shopping.
>
> Probably good to instead talk about a measure of an onion for groceries.  
> You won't be buying a 100 g onion, so you'll want to have 1 onion, 
> regardless of size and know you'll have left-over onion for your omelette 
> the next day.  Because you need about 1/4 of a small onion, or whatever  of 
> a big onion.
>
> But if you need an amount of grams o' onion that requires a large onion, 
> then you'll want a way to say a large onion.  Or two small onions.  Or 
> whatever.  Knowing you'll be doing a little bit of rough math at the 
> grocery store.
>
> Your grocery list will get messy if you have 1 small onion and 1 large 
> onion when the onions are in a bag.
>
> All of that to say, don't be to quick to start building everything in TW 
> until you can visualize (spreadsheet or whatever) get a somewhat reasonable 
> amount of "stuff" for the big picture.
>
> This process will help you decide to what degree of complex you want, and 
> how/what/where to simplify when you don't want to get that bogged down in 
> complexity, yadda yadda.
>
> On Saturday, December 4, 2021 at 6:17:49 PM UTC-4 Télumire wrote:
>
>> 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, cassandr...@gmail.com 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/085e0f8b-f8e8-41dc-b5c5-b74a9c59ae5dn%40googlegroups.com.


[tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-04 Thread Charlie Veniot
Example of something to keep in mind: if a recipe calls for 100grams of 
onion, you'll want to convert that into something useful for grocery 
shopping.

Probably good to instead talk about a measure of an onion for groceries.  
You won't be buying a 100 g onion, so you'll want to have 1 onion, 
regardless of size and know you'll have left-over onion for your omelette 
the next day.  Because you need about 1/4 of a small onion, or whatever  of 
a big onion.

But if you need an amount of grams o' onion that requires a large onion, 
then you'll want a way to say a large onion.  Or two small onions.  Or 
whatever.  Knowing you'll be doing a little bit of rough math at the 
grocery store.

Your grocery list will get messy if you have 1 small onion and 1 large 
onion when the onions are in a bag.

All of that to say, don't be to quick to start building everything in TW 
until you can visualize (spreadsheet or whatever) get a somewhat reasonable 
amount of "stuff" for the big picture.

This process will help you decide to what degree of complex you want, and 
how/what/where to simplify when you don't want to get that bogged down in 
complexity, yadda yadda.

On Saturday, December 4, 2021 at 6:17:49 PM UTC-4 Télumire wrote:

> 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, cassandr...@gmail.com 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e488573a-36fa-45d4-aa39-79602ea5b0a1n%40googlegroups.com.


[tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-04 Thread Charlie Veniot
G'day,

Whatever you are thinking, start by forgetting about TiddlyWiki for now.  
Put on a "systems/business analyst" hat, and think "information modelling", 
what is the end-result you want, and then start going backwards, figuring 
out what information you need to get to the current stage you are looking 
at.  The current stage is information transformed somehow from some state 
in a previous stage.

And you keep going back and back and back, towards the raw data that 
however many stages back.

Consider using a spreadsheet, the first columns of which are the end result 
you would like.  Then it columns after that, the information as it probably 
needs to be before, and how it gets transformed to the current.

For example, say onions is in your grocery list for this week.  How do you 
figure out how many onions?  The number is based on how many onions you 
need for each recipe you are making this week.  But it is also based on how 
many servings of each recipe.  If some recipe normally calls for 1 onion to 
serve two people, but you are having two other people for supper, then you 
need twice the amount of onion.

But in the grocery list you print out, before going to the store, you might 
check your onion inventory in the fridge.  And you remember you picked up a 
whole bunch of onions last time because they were on sale.  So you realize 
you don't need as much onion, or maybe none at all.  So you will scratch 
some notes on your printed grocery list to adjust the numbers.

So mock-up a grocery list for some week, and figure out the steps to get 
from recipes and ingredients to a tidy grocery list.  What information do 
you need, and what are the transformations from A-Z.

Yeah, may not seem like fun, but I love that kind of stuff ...

On Saturday, December 4, 2021 at 5:50:32 PM UTC-4 cassandr...@gmail.com 
wrote:

> 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b198801a-0ce0-4a12-be3d-210f92e5e7c8n%40googlegroups.com.


[tw5] Re: Automatically generating grocery list by clicking on cooking recipes ?

2021-12-04 Thread Télumire
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, cassandr...@gmail.com 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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0243eabb-fb1f-4835-b209-eef7e749ee53n%40googlegroups.com.