[tw5] Coding Fun: My take on recipe ingredients

2021-09-29 Thread Charlie Veniot
Just my thoughts on the ingredients "framework" that I would start with.

I think.

Download the attached and drag into some TiddlyWiki (TiddlyWiki.com!)

*(It is a little bit crude.  The point being getting the basic framework 
going, to make pretty later.)*


-- 
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/51b962a2-a125-4d1f-8d29-dac590f6c73bn%40googlegroups.com.


HowToIngredientsByCharlie.json
Description: application/json


[tw5] Re: Just a Filtering Code Pattern

2021-09-29 Thread Álvaro
I think that deleted reply was mine. I will copy and paste from Tiddlytalk

---
@Télumire . It’s true. They works like an OR. {{{ [tag[Tag 1],[Tag 2],[Tag 
3],[Tag 4]] }}} also return different result. This behaviour would be 
documented. 

El martes, 28 de septiembre de 2021 a las 2:41:03 UTC+2, TW Tones escribió:

> JP,
>
> One way of handling all tags on the current tiddler is not to use the 
> various tag operators but address the tags field directly.
>
> [all[current]get[tags]] returns the content of the tags field which 
> includes all tags.
>
> Does this meet with your requirement?
>
> On Monday, 27 September 2021 at 22:08:07 UTC+10 jn.pierr...@gmail.com 
> wrote:
>
>> Just a thought: it would be fine if the tagging operator could have a 
>> "all" parameter which would select tiddlers tagging all of the tags in 
>> input (currently, that's "any tag is enough").
>>
>> Thus we would have a simple and readable solution as:
>>
>> {{{ [tag1 tag2 tag3 tag4 +[tagging:all[]]] }}}
>>
>> Le lundi 27 septembre 2021 à 10:58:01 UTC+2, Télumire a écrit :
>>
>>> Hello all ! 
>>> The filter syntax provided by @Álvaro  is very neat but doesnt match 
>>> the requirements of cj.v : counting the tiddlers with 4 specifics tags 
>>> and only those tiddlers.
>>>
>>> See this screenshot  :
>>>
>>> https://i.imgur.com/lVlsYZt.png
>>>
>>> I think it's because the commas imply an OR condition, but here we want 
>>> an AND :)
>>>
>>> So with a a tiny bit of tweaking the correct filter is : 
>>>
>>> {{{ [[Tag 1][Tag 2][Tag 3][Tag 4]tagging[]] 
>>> :filter[tags[]count[]compare:eq[4]] }}}
>>>
>>> Here's a live demo : 
>>>
>>>
>>> https://Telumire.github.io/TW-tips/index.html#:%5B%5B4%20tags%20and%20only%20those%204%5D%5D%5B%5B3%20tags%20+%201%20other%5D%5D%5B%5B4%20tags%20and%20one%20more%5D%5D%5B%5BMultiple%20parameters%20separated%20by%20a%20%20,%20%20character%5D%5D
>>> Le samedi 25 septembre 2021 à 18:00:37 UTC+2, Álvaro a écrit :
>>>
 - In the fields cases we have a workaround with `fields` operator. It 
 has suffixs (exclude, include)
 - I think that there in't any tiddler with those tags. The search is 
 the tiddler with all these tags (¿and any other?)

 In the case of titles, you find a issue, but I don't know its reason. I 
 was trying to find a workaround but i wasn't lucky. I also found that the 
 match operator doesn't support multiple parameters.

 El sábado, 25 de septiembre de 2021 a las 16:30:26 UTC+2, TW Tones 
 escribió:

> Of even this {{{ [tag[Common 
> Operators],[HelloThere],[TableOfContents]] }}}
>
> On Sunday, 26 September 2021 at 00:27:45 UTC+10 TW Tones wrote:
>
>> Very interesting. 
>>
>> I think he documentation should be expanded to detail this. Multiple 
>> parameters to operators are only documented in a few operators, but if I 
>> read this correctly they can work on operators in *general*?
>>
>> If general you may expect this to work ```{{{ 
>> [title[tid1],[tid2],[tid3]] }}}``` it does not.
>> or {{{ [all[current]get[caption],[description]] }}}``` it does not.
>> On Sunday, 26 September 2021 at 00:18:58 UTC+10 Eric Shulman wrote:
>>
>>> I just tested this on both 5.1.23 and 5.2.0pre. I created one 
>>> tiddler containing
>>> ```
>>> {{{ [tag[Tag 1],[Tag 2],[Tag 3],[Tag 4]] 
>>> :filter[tags[]count[]compare:eq[4]] }}}
>>> ```
>>>
>>> and another tiddler with the four tags (note capitalization and 
>>> spaces in the tag values).
>>>
>>> It *does* seem to work on both versions of TW
>>> -e
>>> On Saturday, September 25, 2021 at 7:02:19 AM UTC-7 TW Tones wrote:
>>>
 Alvaro;

 You suggested something like this
 {{{ [tag[Tag 1]**,**[Tag 2],[Tag 3],[Tag 4]] 
 :filter[tags[]count[]compare:eq[4]] }}}

 As far as I can see this does not work on the pre-release and the 
 t6ag format  [tag[Tag 1],[Tag 2],[Tag 3],[Tag 4]] (simplified)  is not 
 documented

 Does not work. So I asked if you tested this?


 On Saturday, 25 September 2021 at 22:11:48 UTC+10 Álvaro wrote:

> I don't know if I understand you.
>
>
> El sábado, 25 de septiembre de 2021 a las 5:31:18 UTC+2, TW Tones 
> escribió:
>
>> Alvaro;
>>
>> Have you tested this?
>>
>> {{{  [tag[Tag 1]*,*[Tag 2],[Tag 3],[Tag 4]]  
>> :filter[tags[]count[]compare:eq[4]]  }}}
>>
>> I cant see it working. Here 
>>  is says 
>>
>> * NEW IN: 5.1.23 Filter operators support multiple parameters 
>> which are separated by a  ,  character.*
>>
>> *For example: [param1],[param2] or ,{param2}*
>> However as far as I can see only if such multiple parameters are 
>> document

Re: [tw5] A question about Widgets

2021-09-29 Thread Jeremy Ruston
Hi Dhruv,

> I've recently discovered TiddlyWiki and it's excellent. I've always wanted 
> notes that are somewhat interactive-automatic reminders based on the data I 
> put in, managing tasks right inside notes etc.-and TW seems to be wonderful 
> for that sort of thing.

Thank you! It's good to hear TiddlyWiki discovery stories.

> to that effect, though, I needed some custom functionality. I'd like to have 
> timers, where I'd get an audio indication when the timer is done.

There may already be plugins that provide this functionality, I think Eric 
Shulman has some timer tools, and I hope he'll jump in.

> After reading around for a while, making a custom action widget seems my best 
> bet-I'd like to use webaudio, and from what I know JS macros don't allow me 
> access to the DOM.

It's correct that JS macros can't access the DOM.

However, here an action widget may not work either.

> What I want to know is...is there a way to have persistent data inside 
> widgets, such that an expensive computation only takes place once, perhaps 
> when the wiki starts?

No, instances of widgets are ephemeral: they are destroyed and rebuilt as the 
refresh process proceeds. Only the tiddler store can be used for storing state 
data by widgets.

> right now I'm planning to store sound files as base64-encoded data, either 
> inside the widget directly or as a tiddler (somewhat ugly, to be sure, but it 
> seems like the most portable solution) and decoding this data into an audio 
> buffer would take non-negligible time. I would prefer not having to create an 
> audio buffer each refresh cycle.

Not ugly at all: TiddlyWiki handles images the same way, and it works 
surprisingly well with modern browsers.

> More fundamentally...my question is-do widgets get recreated every refresh 
> cycle? or do they only get created once, perhaps when wikification happens, 
> and then they just have refresh called on them?

The lifecycle of a widget is that it gets created, refreshed zero or more 
times, and then destroyed. Many widgets do indeed cache information in the 
widget object instance, but... 

> (Maybe a startup plugin would work well for this, too. I'm not quite 
> sure-I've read quite too much in the past few days, without having enough 
> actual experience to turn all my knowledge into a working product.)

...Yes – anything more substantial is better handled via a "daemon": a long 
lived, global JavaScript object instance to which widgets send messages. In 
TiddlyWiki, daemons are packaged as startup modules.

Here, it sounds like a "tm-play-sound" message with a parameter indicating the 
tiddler containing the sound sample to play would be a reasonable starting 
point.

I don't know if there's any prior work on audio in TiddlyWiki, but I'd 
certainly be interested in improving core support. The blocker in the past was 
always that browsers could only capture audio in enormous WAV format, but by 
now perhaps they can capture straight to compressed MP3.

Best wishes

Jeremy

> 
> Thanks,
> Dhruv
> -- 
> 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/da4533d4-6e49-4205-8aec-bc585c6a89e1n%40googlegroups.com.

-- 
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/C0CE88B0-6239-4D5B-991D-BD5303DDFE12%40gmail.com.


[tw5] Re: Adding ' tabindex="-1" ' via template?

2021-09-29 Thread Petri M.
Upgraded to 5.1.23 but unfortunately the down arrow does not seem to work 
with ctrl+L. Tried changing the shortcut from control panel -> shortcuts 
but no luck. Also tried disabling CodeMirror plugin which I thought might 
be interfering but did not help. 

-Petri

On Monday, September 27, 2021 at 6:15:33 PM UTC+3 Petri M. wrote:

> Ah I did not know that. But it does not seem to work, probably because I 
> have 5.1.22. Maybe I'll have to look into upgrading if I can't figure this 
> out.
>
> Thanks!
>
> On Monday, September 27, 2021 at 3:43:24 PM UTC+3 Soren Bjornstad wrote:
>
>> Petri,
>>
>> Are you aware you can use the down arrow key to select items in that 
>> list? (You need 5.1.23 or higher I think.)
>>
>> On Monday, September 27, 2021 at 5:16:56 AM UTC-5 Petri M. wrote:
>>
>>> I am trying to remove some extra tabbing when I do ctrl+L and search for 
>>> a tiddler and try to link to it. Now it tabs through the search "tabs" 
>>> first and then goes to the list. I think I can just remove that with the 
>>> CSS attribute tabindex="-1" but I have no idea how to actually do it. I 
>>> tried to set buttonTemplate so transclude my own template which would then 
>>> have this command in it but I can't seem to get it to work. I don't think 
>>> the template adds the attribute to the button itself, just to the content 
>>> inside of the button.
>>>
>>> How can I achieve this?
>>>
>>> Thanks,
>>> Petri
>>>
>>

-- 
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/63bbccf6-81db-4cfa-a799-5dabc48ec4b4n%40googlegroups.com.


[tw5] Moving file

2021-09-29 Thread BobT
I have my T files stored on Dropbox and I want to move them elsewhere. Is 
there a straightforward way of doing that? Thx

-- 
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/0b9c5427-602f-4101-bb9a-949d811c5e84n%40googlegroups.com.