[tw5] Re: LeftBar plugin and node.js server crashes

2021-10-22 Thread Jean-Pierre Rivière
Yes, alas for me, I am left with both 5.1.23 and 5.2.0 failing my project:

* 5.1.23 because of this very bug (which is occurring eleswhere for my 
project);
* 5.2.0 because jsonmangler is not able to operate on it as of yet.

I have to stick to 5.1.23 because of json. I will try to adapt my code to 
adapt this bug (first create a non-typed tiddler then update it with a set 
type) until 5.2.0 become json friendly. So' thank you @Mat for spotting and 
reporting this bug report!

Le mardi 28 septembre 2021 à 16:05:20 UTC+2, Mat a écrit :

> I see it was reported and fixed by fellow @joshuafontany here 
> <https://github.com/Jermolene/TiddlyWiki5/issues/5366>.
> Mucho thanko!
> <:-)
>
> On Tuesday, September 28, 2021 at 2:45:22 PM UTC+2 Mat wrote:
>
>> Aha, thank you @joshuafontany and jn.pierr...
>> So, do I understand right that this is resolved in the upcoming 5.2?
>> Thanks
>> <:-)
>>
>> On Tuesday, September 28, 2021 at 7:50:44 AM UTC+2 jn.pierr...@gmail.com 
>> wrote:
>>
>>> The origin of the crash has ben found by @joshuafontany in an other 
>>> thread on tiddlytalk, that I paste here for any reader to know it:
>>>
>>> 
>>> You have run into a bug in 5.1.23 and earlier that would crash the 
>>> server trying to write a tiddler with no text field. This happens rarely, 
>>> but most often when an $action-setfield widget sets a NON-text field on a 
>>> non-existent tiddler (this creating it without a text field).
>>>
>>> The button in the plugin sets a temp tiddler’s NON-text fields, and that 
>>> is when the crash is happening. I would recommend using the pre-release on 
>>> node.
>>> 
>>>
>>> Le lundi 27 septembre 2021 à 19:37:45 UTC+2, Jean-Pierre Rivière a 
>>> écrit :
>>>
>>>> Hi Matt. Thank you for being there today!
>>>>
>>>> At last, I know there is no hidden javascript to look for. This will 
>>>> help me search after the culprit.
>>>>
>>>> Le lundi 27 septembre 2021 à 18:37:37 UTC+2, Mat a écrit :
>>>>
>>>>> Hi jn.pierr I am the author of LeftBar 
>>>>> <https://leftbar.tiddlyspot.com/>. You really timed your question 
>>>>> because I have barely passed by here for a few months now. Unfortunately 
>>>>> I 
>>>>> can't really answer your question. I only create wikitext plugins and in 
>>>>> vanilla TW and the link I gave is the actual source for the plugin. You 
>>>>> obviously use nodejs so I'm afraid I don't have any idea what might cause 
>>>>> the error or how to resolve it.
>>>>>
>>>>> With that said, it is not a very complicated construction. And it is 
>>>>> likely to be considered a hack because I'm not a real coder. You see the 
>>>>> plugin "files", really its shadow tiddlers, just like for any plugin - 
>>>>> i.e 
>>>>> in the TW Ctrlpanel, click the plugin and see its contents tab. To a 
>>>>> great 
>>>>> extent, the plugin functions by setting CSS values for the TW native page 
>>>>> layout values. The actual menu is a tiddler forced to sit up in the left 
>>>>> corner.
>>>>>
>>>>> <:-)
>>>>>
>>>>> On Monday, September 27, 2021 at 3:21:28 PM UTC+2 
>>>>> jn.pierr...@gmail.com wrote:
>>>>>
>>>>>> I’ve encountered a problem with the LeftBar plugin (v2.1.4). It 
>>>>>> happens on a brand new empty server edition on node.js (linux arm64, run 
>>>>>> through docker) where:
>>>>>>
>>>>>>- I create a $:/config/FileSystemPaths tiddler whose sole content 
>>>>>>is [!is[system]slugify[]] (not interesting but deliberately very 
>>>>>> reduced)
>>>>>>- I then quit the server and import my plugin with
>>>>>>
>>>>>> tiddlywiki mywiki --load plugin.json 
>>>>>>
>>>>>> Now’ I start again the server. This sandwich icon of LeftBar is or 
>>>>>> the upper left corner. 
>>>>>>
>>>>>> Then I click on that sandwich icon for LeftBar and the server 
>>>>>> crashes. See below:
>>>>>>
>>>>>> =
>>>>>> syncer-server-filesystem: Dispatching 'save' task: 
>>>>>> $:/plugins/TWaddle/LeftBar/temp node:internal/fs/utils:879 throw new 
>>>

Re: [tw5] Re: Final Call for Testing for TiddlyWiki v5.2.0

2021-10-05 Thread Jean-Pierre Rivière
Affected macros... diifcult to say. I don't use them directly, I use them 
via filters in my own macros. Here's a sample code of things I do:

===
<$list variable=campaign filter="[indexes[]sortsub]">
  <$log $$message="next campaign" $$filter=campaign/>
  <$set name=aim filter="[subfilter]" select=0>
  <$set name=url filter="[subfilter]" select=0>
  <$set name=pages filter="[addprefix[WEB_]addsuffix[-web]]">
  <$wikify name=start text="<>">
  <$wikify name=end text="<>">
  <$log $$message="start & end" $$filter="start end url"/>
  <$macrocall $name=_projectCampaignRow campaign=<> aim=<> 
url=<> start=<> end=<> pages=<>/>
  
  

===

I don't know what to look for.

Le mardi 5 octobre 2021 à 12:27:37 UTC+2, Jean-Pierre Rivière a écrit :

> Le vendredi 1 octobre 2021 à 22:57:18 UTC+2, jeremy...@gmail.com a écrit :
>
>> > My main project is impacted. Some of my macros dealing with json 
>> tiddlers are broken. They use the two plugins //modloader// and //json 
>> mangler//. 
>>
>> Thank you – any details here would be helpful. What versions of those 
>> plugins are you using? Which macros are affected? 
>>
>>
>  modloader 0.0.5
> json mangler 2.2.5
>
> > On the positive side, it seems that my tiddlers that were too large are 
>> now automatically corrected to fit in the current width of the main story. 
>>
>> Excellent – do you mean that the tiddler content previously overflowed 
>> its background? Perhaps you could share a screenshot?
>
>
> Yes, an overflow. See picture.
>
> [image: overlay.png]
>
>>
>>
>> Best wishes 
>>
>> Jeremy
>
>

-- 
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/22d56e69-c566-4d35-8fff-2642ac73ce1an%40googlegroups.com.


[tw5] Re: Final Call for Testing for TiddlyWiki v5.2.0

2021-10-01 Thread Jean-Pierre Rivière
My main project is impacted. Some of my macros dealing with json tiddlers 
are broken. They use the two plugins //modloader// and //json mangler//.

On the positive side, it seems that my tiddlers that were too large are now 
automatically corrected to fit in the current width of the main story.

Le vendredi 1 octobre 2021 à 22:33:51 UTC+2, Jean-Pierre Rivière a écrit :

> Is there a way to test the 5.20 final RC with server mode (simple way) 
> please?
>
> Le vendredi 1 octobre 2021 à 17:44:07 UTC+2, cj.v...@gmail.com a écrit :
>
>> Hey, posts to GG are no longer showing up in TiddlyTalk.
>>
>> On Friday, October 1, 2021 at 9:25:10 AM UTC-3 jeremy...@gmail.com wrote:
>>
>>> The upcoming TiddlyWiki v5.2.0 is now – finally – ready for release. I’m 
>>> hoping to get it out over the weekend so this is a final request for help 
>>> with last minute checks.
>>>
>>> It’s a huge release, with many very significant changes from a diverse 
>>> range of contributors. Please join me in thanking them all for working so 
>>> hard to make this release such an exciting one.
>>>
>>> It would be useful to have feedback on the release note, and whether the 
>>> descriptions of the changes make sense. Some of the changes are necessarily 
>>> technical things that won’t concern all users, but the aim is for the 
>>> writing to be clear enough that anyone can get the general drift.
>>>
>>> https://tiddlywiki.com/prerelease/#Release%205.2.0
>>>
>>> It would also be a great help if you could try an experimental upgrade 
>>> of your own wikis, and give them a once over to make sure everything still 
>>> works as expected.
>>>
>>> It is recommended to not actually switch over to the new version at this 
>>> point; just give it a try with your own data, but don’t upgrade fully until 
>>> the official release.
>>>
>>> The upgrader is at:
>>>
>>> https://tiddlywiki.com/prerelease/upgrade.html
>>>
>>> Any feedback or questions are welcome,
>>>
>>> Best wishes
>>>
>>> Jeremy.
>>>
>>

-- 
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/65828580-0f0b-4d92-92f3-a3b5612019b4n%40googlegroups.com.


[tw5] Re: Final Call for Testing for TiddlyWiki v5.2.0

2021-10-01 Thread Jean-Pierre Rivière
Is there a way to test the 5.20 final RC with server mode (simple way) 
please?

Le vendredi 1 octobre 2021 à 17:44:07 UTC+2, cj.v...@gmail.com a écrit :

> Hey, posts to GG are no longer showing up in TiddlyTalk.
>
> On Friday, October 1, 2021 at 9:25:10 AM UTC-3 jeremy...@gmail.com wrote:
>
>> The upcoming TiddlyWiki v5.2.0 is now – finally – ready for release. I’m 
>> hoping to get it out over the weekend so this is a final request for help 
>> with last minute checks.
>>
>> It’s a huge release, with many very significant changes from a diverse 
>> range of contributors. Please join me in thanking them all for working so 
>> hard to make this release such an exciting one.
>>
>> It would be useful to have feedback on the release note, and whether the 
>> descriptions of the changes make sense. Some of the changes are necessarily 
>> technical things that won’t concern all users, but the aim is for the 
>> writing to be clear enough that anyone can get the general drift.
>>
>> https://tiddlywiki.com/prerelease/#Release%205.2.0
>>
>> It would also be a great help if you could try an experimental upgrade of 
>> your own wikis, and give them a once over to make sure everything still 
>> works as expected.
>>
>> It is recommended to not actually switch over to the new version at this 
>> point; just give it a try with your own data, but don’t upgrade fully until 
>> the official release.
>>
>> The upgrader is at:
>>
>> https://tiddlywiki.com/prerelease/upgrade.html
>>
>> Any feedback or questions are welcome,
>>
>> Best wishes
>>
>> Jeremy.
>>
>

-- 
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/59e8da25-baf1-40f4-994c-a3b85cf6ef7dn%40googlegroups.com.


[tw5] Re: LeftBar plugin and node.js server crashes

2021-09-27 Thread Jean-Pierre Rivière
The origin of the crash has ben found by @joshuafontany in an other thread 
on tiddlytalk, that I paste here for any reader to know it:


You have run into a bug in 5.1.23 and earlier that would crash the server 
trying to write a tiddler with no text field. This happens rarely, but most 
often when an $action-setfield widget sets a NON-text field on a 
non-existent tiddler (this creating it without a text field).

The button in the plugin sets a temp tiddler’s NON-text fields, and that is 
when the crash is happening. I would recommend using the pre-release on 
node.


Le lundi 27 septembre 2021 à 19:37:45 UTC+2, Jean-Pierre Rivière a écrit :

> Hi Matt. Thank you for being there today!
>
> At last, I know there is no hidden javascript to look for. This will help 
> me search after the culprit.
>
> Le lundi 27 septembre 2021 à 18:37:37 UTC+2, Mat a écrit :
>
>> Hi jn.pierr I am the author of LeftBar <https://leftbar.tiddlyspot.com/>. 
>> You really timed your question because I have barely passed by here for a 
>> few months now. Unfortunately I can't really answer your question. I only 
>> create wikitext plugins and in vanilla TW and the link I gave is the actual 
>> source for the plugin. You obviously use nodejs so I'm afraid I don't have 
>> any idea what might cause the error or how to resolve it.
>>
>> With that said, it is not a very complicated construction. And it is 
>> likely to be considered a hack because I'm not a real coder. You see the 
>> plugin "files", really its shadow tiddlers, just like for any plugin - i.e 
>> in the TW Ctrlpanel, click the plugin and see its contents tab. To a great 
>> extent, the plugin functions by setting CSS values for the TW native page 
>> layout values. The actual menu is a tiddler forced to sit up in the left 
>> corner.
>>
>> <:-)
>>
>> On Monday, September 27, 2021 at 3:21:28 PM UTC+2 jn.pierr...@gmail.com 
>> wrote:
>>
>>> I’ve encountered a problem with the LeftBar plugin (v2.1.4). It happens 
>>> on a brand new empty server edition on node.js (linux arm64, run through 
>>> docker) where:
>>>
>>>- I create a $:/config/FileSystemPaths tiddler whose sole content 
>>>is [!is[system]slugify[]] (not interesting but deliberately very reduced)
>>>- I then quit the server and import my plugin with
>>>
>>> tiddlywiki mywiki --load plugin.json 
>>>
>>> Now’ I start again the server. This sandwich icon of LeftBar is or the 
>>> upper left corner. 
>>>
>>> Then I click on that sandwich icon for LeftBar and the server crashes. 
>>> See below:
>>>
>>> =
>>> syncer-server-filesystem: Dispatching 'save' task: 
>>> $:/plugins/TWaddle/LeftBar/temp node:internal/fs/utils:879 throw new 
>>> ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The "data" 
>>> argument must be of type string or an instance of Buffer, TypedArray, 
>>> or DataView. Received undefined at Object.writeFile (node:fs:2106:5) at 
>>> Object.exports.saveTiddlerToFile 
>>> ($:/core/modules/utils/filesystem.js:414:6) at 
>>> $:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:85:13 at 
>>> FileSystemAdaptor.getTiddlerFileInfo 
>>> ($:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:72:2) at 
>>> FileSystemAdaptor.saveTiddler 
>>> ($:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:81:7) at 
>>> SaveTiddlerTask.run ($:/core/modules/syncer.js:597:27) at 
>>> Syncer.processTaskQueue ($:/core/modules/syncer.js:503:9) at 
>>> Function. ($:/core/modules/syncer.js:90:9) at 
>>> $tw.Wiki.exports.dispatchEvent ($:/core/modules/wiki.js:133:13) at 
>>> $:/core/modules/wiki.js:166:10 { code: 'ERR_INVALID_ARG_TYPE' }
>>> =
>>>   
>>>
>>> I suppose my plugin is not correctly installed. So I was about to do it 
>>> the proper way with tiddlywiki --build index and after having set 
>>> the TIDDLYWIKI_PLUGIN_PATH environment variable. But there is a problem: I 
>>> don’t know how to get all the individual tiddlers of the plugin. The plugin 
>>> shows its shadow tiddlers, which I can export. But what for the core of the 
>>> plugin, actual code? I have not been able to get any source code repository 
>>> for LeftBar.
>>>
>>> My questions:
>>>
>>>- is my diagnostic of the crash correct (bad installation of the 
>>>plugin)?
>>>- how could I get all of the files of a plugin given its json file?
>>>
>>> Thank you for your help!
>>>
>>

-- 
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/b50fe94a-2de3-403b-ba06-433728e25047n%40googlegroups.com.


[tw5] Re: LeftBar plugin and node.js server crashes

2021-09-27 Thread Jean-Pierre Rivière
Hi Matt. Thank you for being there today!

At last, I know there is no hidden javascript to look for. This will help 
me search after the culprit.

Le lundi 27 septembre 2021 à 18:37:37 UTC+2, Mat a écrit :

> Hi jn.pierr I am the author of LeftBar . 
> You really timed your question because I have barely passed by here for a 
> few months now. Unfortunately I can't really answer your question. I only 
> create wikitext plugins and in vanilla TW and the link I gave is the actual 
> source for the plugin. You obviously use nodejs so I'm afraid I don't have 
> any idea what might cause the error or how to resolve it.
>
> With that said, it is not a very complicated construction. And it is 
> likely to be considered a hack because I'm not a real coder. You see the 
> plugin "files", really its shadow tiddlers, just like for any plugin - i.e 
> in the TW Ctrlpanel, click the plugin and see its contents tab. To a great 
> extent, the plugin functions by setting CSS values for the TW native page 
> layout values. The actual menu is a tiddler forced to sit up in the left 
> corner.
>
> <:-)
>
> On Monday, September 27, 2021 at 3:21:28 PM UTC+2 jn.pierr...@gmail.com 
> wrote:
>
>> I’ve encountered a problem with the LeftBar plugin (v2.1.4). It happens 
>> on a brand new empty server edition on node.js (linux arm64, run through 
>> docker) where:
>>
>>- I create a $:/config/FileSystemPaths tiddler whose sole content 
>>is [!is[system]slugify[]] (not interesting but deliberately very reduced)
>>- I then quit the server and import my plugin with
>>
>> tiddlywiki mywiki --load plugin.json 
>>
>> Now’ I start again the server. This sandwich icon of LeftBar is or the 
>> upper left corner. 
>>
>> Then I click on that sandwich icon for LeftBar and the server crashes. 
>> See below:
>>
>> =
>> syncer-server-filesystem: Dispatching 'save' task: 
>> $:/plugins/TWaddle/LeftBar/temp node:internal/fs/utils:879 throw new 
>> ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The "data" 
>> argument must be of type string or an instance of Buffer, TypedArray, or 
>> DataView. Received undefined at Object.writeFile (node:fs:2106:5) at 
>> Object.exports.saveTiddlerToFile 
>> ($:/core/modules/utils/filesystem.js:414:6) at 
>> $:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:85:13 at 
>> FileSystemAdaptor.getTiddlerFileInfo 
>> ($:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:72:2) at 
>> FileSystemAdaptor.saveTiddler 
>> ($:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:81:7) at 
>> SaveTiddlerTask.run ($:/core/modules/syncer.js:597:27) at 
>> Syncer.processTaskQueue ($:/core/modules/syncer.js:503:9) at 
>> Function. ($:/core/modules/syncer.js:90:9) at 
>> $tw.Wiki.exports.dispatchEvent ($:/core/modules/wiki.js:133:13) at 
>> $:/core/modules/wiki.js:166:10 { code: 'ERR_INVALID_ARG_TYPE' }
>> =
>>   
>>
>> I suppose my plugin is not correctly installed. So I was about to do it 
>> the proper way with tiddlywiki --build index and after having set 
>> the TIDDLYWIKI_PLUGIN_PATH environment variable. But there is a problem: I 
>> don’t know how to get all the individual tiddlers of the plugin. The plugin 
>> shows its shadow tiddlers, which I can export. But what for the core of the 
>> plugin, actual code? I have not been able to get any source code repository 
>> for LeftBar.
>>
>> My questions:
>>
>>- is my diagnostic of the crash correct (bad installation of the 
>>plugin)?
>>- how could I get all of the files of a plugin given its json file?
>>
>> Thank you for your help!
>>
>

-- 
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/c1a41559-ca67-4242-8641-e1cdbea50be9n%40googlegroups.com.


[tw5] LeftBar plugin and node.js server crashes

2021-09-27 Thread Jean-Pierre Rivière


I’ve encountered a problem with the LeftBar plugin (v2.1.4). It happens on 
a brand new empty server edition on node.js (linux arm64, run through 
docker) where:

   - I create a $:/config/FileSystemPaths tiddler whose sole content 
   is [!is[system]slugify[]] (not interesting but deliberately very reduced)
   - I then quit the server and import my plugin with

tiddlywiki mywiki --load plugin.json 

Now’ I start again the server. This sandwich icon of LeftBar is or the 
upper left corner. 

Then I click on that sandwich icon for LeftBar and the server crashes. See 
below:

=
syncer-server-filesystem: Dispatching 'save' task: 
$:/plugins/TWaddle/LeftBar/temp node:internal/fs/utils:879 throw new 
ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The "data" 
argument must be of type string or an instance of Buffer, TypedArray, or 
DataView. Received undefined at Object.writeFile (node:fs:2106:5) at 
Object.exports.saveTiddlerToFile 
($:/core/modules/utils/filesystem.js:414:6) at 
$:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:85:13 at 
FileSystemAdaptor.getTiddlerFileInfo 
($:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:72:2) at 
FileSystemAdaptor.saveTiddler 
($:/plugins/tiddlywiki/filesystem/filesystemadaptor.js:81:7) at 
SaveTiddlerTask.run ($:/core/modules/syncer.js:597:27) at 
Syncer.processTaskQueue ($:/core/modules/syncer.js:503:9) at 
Function. ($:/core/modules/syncer.js:90:9) at 
$tw.Wiki.exports.dispatchEvent ($:/core/modules/wiki.js:133:13) at 
$:/core/modules/wiki.js:166:10 { code: 'ERR_INVALID_ARG_TYPE' }
=
  

I suppose my plugin is not correctly installed. So I was about to do it the 
proper way with tiddlywiki --build index and after having set 
the TIDDLYWIKI_PLUGIN_PATH environment variable. But there is a problem: I 
don’t know how to get all the individual tiddlers of the plugin. The plugin 
shows its shadow tiddlers, which I can export. But what for the core of the 
plugin, actual code? I have not been able to get any source code repository 
for LeftBar.

My questions:

   - is my diagnostic of the crash correct (bad installation of the plugin)?
   - how could I get all of the files of a plugin given its json file?

Thank you for your help!

-- 
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/03256b3e-89c8-48e9-8205-bc21d335d263n%40googlegroups.com.


[tw5] Re: Just a Filtering Code Pattern

2021-09-27 Thread Jean-Pierre Rivière
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 
 documented in the operator in question.

 Tones
 On Saturday, 25 September 2021 at 01:39:53 UTC+10 Álvaro wrote:

> It works fine. I tried to find a alternative, but I wasn't lucky.
>
> When I resee your filter, I remember about the multiple parameters 
> in filter operator with commas (from last version, 5.1.23). And we 
> can add 
> a second filter run that it applies your filter to result of first 
> run. 
> Then you can rewrite your filter something like this (in filtering 
> transclusion)
> {{{  [tag[Tag 1]*,*[Tag 2],[Tag 3],[Tag 4]]  
> :filter[tags[]count[]compare:eq[4]]  }}}
>
> Although maybe it be less understandble for you.
>
>
> El viernes, 24 de septiembre de 2021 a las 10:59:50 UTC+2, 
> jn.pierr...@gmail.com escribió:

[tw5] Re: Just a Filtering Code Pattern

2021-09-24 Thread Jean-Pierre Rivière
For an easy reading, edit your tiddlers with a fixed font like courier or 
terminal.

Le vendredi 24 septembre 2021 à 19:15:47 UTC+2, Álvaro a écrit :

> I don't know if they are loving that or not. The commas aren't easy to see 
> between brackets (for me). If I begin on end of filter run, i also have 
> this problem. But any can build his/her mental shorcuts to avoid it. If 
> someone can't solve a problem, maybe he/she can create a "alternative way"
>
> Yes, I tried with the tagging operator and I see that behaviour.
>
> El viernes, 24 de septiembre de 2021 a las 18:52:36 UTC+2, 
> jn.pierr...@gmail.com escribió:
>
>> I was thinking that the tagging operator was the zay to get tiddlers that 
>> all share all of the tags in input. That's what the dec say: "output: the 
>> titles of any tiddlers that carry the input tags".
>>
>> So my function would be:
>>
>> \define fun(tags)
>> <$vars four="[tags[]count[]match[4]]">
>> <$set variable=occ filter="[[$tags$]tagging[] :filter]">Seen 
>> <> tiddlers with tags $tags$
>> 
>> \end
>>
>>  But in fact the effect of tagging is "output: the titles of any tiddlers 
>> that carry ANY OF the input tags". Too bad for the instance. But I think a 
>> correction in the doc would be welcome.
>>
>>
>> Le vendredi 24 septembre 2021 à 10:59:50 UTC+2, Jean-Pierre Rivière a 
>> écrit :
>>
>>> That's fine by me.
>>>
>>> And yes filters are fun even if sometimes a bit tricky.
>>>
>>> So for the fun of it, you could arrange your filter so that the input 
>>> would be the 4 tags you want.
>>>
>>> something like that:
>>>
>>> \define fun(tags)
>>> <$set variable=occ filter="[[$tags]put your filter code 
>>> here...count[]]">Seen <> tiddlers with tags $tags$
>>> \end
>>>
>>> Sometimes, this fun has you coding javascript filter operator. Would 
>>> this be the case here? I have not thought about it yet.
>>>
>>> cheers,
>>>
>>>
>>> Le vendredi 24 septembre 2021 à 03:54:34 UTC+2, cj.v...@gmail.com a 
>>> écrit :
>>>
>>>> Me and my interest in brain age games, I couldn't help but play around 
>>>> with a filter to find all tiddlers that have all four specified tags, but 
>>>> only those four tags.
>>>>
>>>> You'll find three tiddlers in the attached json.  Download the file, 
>>>> and drag into some TiddlyWiki instance (TiddlyWiki.com !) to take a gander.
>>>>
>>>> There are all kinds of ways to go about doing this sort of thing, with 
>>>> some filter operators maybe better suited, but I find the result a bit 
>>>> easier for me to understand (more logical to me, or maybe more 
>>>> self-explanatory, because of the way my brain works, I suppose.)  Maybe 
>>>> just a difference between top-down view vs bottom-up view or something ...
>>>>
>>>> Yeah, I find filters fun.
>>>>
>>>

-- 
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/90e82076-b3c0-4296-ab56-050b2398414dn%40googlegroups.com.


[tw5] Re: Just a Filtering Code Pattern

2021-09-24 Thread Jean-Pierre Rivière
I was thinking that the tagging operator was the zay to get tiddlers that 
all share all of the tags in input. That's what the dec say: "output: the 
titles of any tiddlers that carry the input tags".

So my function would be:

\define fun(tags)
<$vars four="[tags[]count[]match[4]]">
<$set variable=occ filter="[[$tags$]tagging[] :filter]">Seen <> 
tiddlers with tags $tags$

\end

 But in fact the effect of tagging is "output: the titles of any tiddlers 
that carry ANY OF the input tags". Too bad for the instance. But I think a 
correction in the doc would be welcome.


Le vendredi 24 septembre 2021 à 10:59:50 UTC+2, Jean-Pierre Rivière a 
écrit :

> That's fine by me.
>
> And yes filters are fun even if sometimes a bit tricky.
>
> So for the fun of it, you could arrange your filter so that the input 
> would be the 4 tags you want.
>
> something like that:
>
> \define fun(tags)
> <$set variable=occ filter="[[$tags]put your filter code 
> here...count[]]">Seen <> tiddlers with tags $tags$
> \end
>
> Sometimes, this fun has you coding javascript filter operator. Would this 
> be the case here? I have not thought about it yet.
>
> cheers,
>
>
> Le vendredi 24 septembre 2021 à 03:54:34 UTC+2, cj.v...@gmail.com a 
> écrit :
>
>> Me and my interest in brain age games, I couldn't help but play around 
>> with a filter to find all tiddlers that have all four specified tags, but 
>> only those four tags.
>>
>> You'll find three tiddlers in the attached json.  Download the file, and 
>> drag into some TiddlyWiki instance (TiddlyWiki.com !) to take a gander.
>>
>> There are all kinds of ways to go about doing this sort of thing, with 
>> some filter operators maybe better suited, but I find the result a bit 
>> easier for me to understand (more logical to me, or maybe more 
>> self-explanatory, because of the way my brain works, I suppose.)  Maybe 
>> just a difference between top-down view vs bottom-up view or something ...
>>
>> Yeah, I find filters fun.
>>
>

-- 
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/45d80329-bd90-4d7f-b981-c090c9cc64e5n%40googlegroups.com.


[tw5] Re: Cannot use a variable from a filter. Can someone help me ?

2021-09-24 Thread Jean-Pierre Rivière
Yes it does trigger a javascript exception.

The following code does the things you want, if I have well understood your 
goal.

<$vars target="<>">
<$wikify name=todayfilter text="
 [get[task_date]match[<>]]">
<> : <>



<$list filter="[regexp[db___]!sort[task_start_time]filter]">

<$link><$view field="task_date"/>
<$view field="tags"/>
<$view field="task_comment"/>
<$view field="task_start_time"/>
<$view field="task_end_time"/>





Le lundi 23 août 2021 à 14:37:20 UTC+2, vpl a écrit :

> You are obviously right ... thanks
> But even with that *I still get an Tiddly exception*
> FOr your convenience I've prepared a small tiddly with the code (tiddler 
> test) as an attachment
>
> Open the *test *tiddler and replace the 
> <$vars todayfilter="[get[task_date]match[2021-08-23]]">
> by
> <$vars todayfilter="[get[task_date]match]">
>
> You will get a javascript exception as I mentioned in the previous posts 
> of this conversation
>
> Is it a bug ?
>
> Thanks for your help
>
> Regards
>
> Le lundi 23 août 2021 à 14:25:36 UTC+2, Eric Shulman a écrit :
>
>> On Monday, August 23, 2021 at 5:13:22 AM UTC-7 vpl wrote:
>>
>>> Thanks a lot; I agree for 1), 3) and 4)
>>> But for point 2) in fact what I need to do is the following code 
>>> <$vars now_date=<>>
>>> <>
>>> <$vars todayfilter="[get[task_date]match]">
>>>
>> I use the *filter *operator into the list as I want to filter the 
>>> tiddlers based on the *task_date * field
>>> For each of the filtered tiddlers I display the fields in the table
>>>
>>
>> Ah, yes...I see now.  You *do* want to find *all* tiddlers that have a 
>> "task_date" field, not just check the current tiddler.
>>
>> More, When I try the below code I get a Tiddler exception (attached in my 
>>> previous post ...)
>>>
>> Is there a bug in the *filter *operator or something wrong I'm doing ?
>>>
>>
>> I think you missed a change on line 1.  Instead of:
>> <$vars now_date=<>>
>> you want:
>> <$vars target=<>> 
>>
>> -e
>>
>

-- 
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/3d7aceab-6219-427b-b033-0d769bb2db6an%40googlegroups.com.


[tw5] Re: Just a Filtering Code Pattern

2021-09-24 Thread Jean-Pierre Rivière
That's fine by me.

And yes filters are fun even if sometimes a bit tricky.

So for the fun of it, you could arrange your filter so that the input would 
be the 4 tags you want.

something like that:

\define fun(tags)
<$set variable=occ filter="[[$tags]put your filter code 
here...count[]]">Seen <> tiddlers with tags $tags$
\end

Sometimes, this fun has you coding javascript filter operator. Would this 
be the case here? I have not thought about it yet.

cheers,


Le vendredi 24 septembre 2021 à 03:54:34 UTC+2, cj.v...@gmail.com a écrit :

> Me and my interest in brain age games, I couldn't help but play around 
> with a filter to find all tiddlers that have all four specified tags, but 
> only those four tags.
>
> You'll find three tiddlers in the attached json.  Download the file, and 
> drag into some TiddlyWiki instance (TiddlyWiki.com !) to take a gander.
>
> There are all kinds of ways to go about doing this sort of thing, with 
> some filter operators maybe better suited, but I find the result a bit 
> easier for me to understand (more logical to me, or maybe more 
> self-explanatory, because of the way my brain works, I suppose.)  Maybe 
> just a difference between top-down view vs bottom-up view or something ...
>
> Yeah, I find filters fun.
>

-- 
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/097b783f-52c6-42f7-b0b5-9ed35c9198den%40googlegroups.com.


Re: [tw5] Counting specific words

2021-09-23 Thread Jean-Pierre Rivière
actually, https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText is 
very confusing! It took me a lot of time to make any sense out of it for 
the special case like using <<< and after my own tests, I have failed to 
see that as useful.

Your code is actual code and it would be good to use it rather than the 
current example.

I was sure you coded  instead of <__arg__> and I had copied it and 
executed. It was not functioning as it should. But I can no more remember 
why: was it the problem I told about why regexp was better or was it that 
it did nothing?

Anyway, thank you for your correction about what I told. I have yet again 
something about tiddlywiki today! And I could use it, definitely.





Le jeudi 23 septembre 2021 à 18:04:26 UTC+2, jeremy...@gmail.com a écrit :

> Hi Jean-Pierre
>
> You made an error in your macro, Jeremy. You should have used $arg$ 
> instead of .
>
>
> It's actually not an error: it's an alternative way to access the 
> parameters of macros. It avoids the problem that otherwise the code would 
> fail with a tiddler title containing a closing square bracket.
>
> There are docs here under "Parameters as Variables <<__...__>>":
>
> https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText
>
> But it is false nonetheless because it would, for example, cut word 
> "totem" if asked for word "to". My regular expression does not do that 
> thanks to the \b at both ends of the arguments.
>
>
> Yes, I did that quickly, but indeed I think that splitregexp would be 
> needed to make it practical, both to resolve the word boundary issue and 
> the case sensitivity issue.
>
> Best wishes
>
> Jeremy.
>
>
> Le jeudi 23 septembre 2021 à 16:45:46 UTC+2, jeremy...@gmail.com a écrit :
>
>> Another technique is to use the “split” operator to split the string by 
>> the word:
>>
>> \define count-words(title,word)
>> <$text text={{{ [<__title__>get[text]split<__word__>count[]subtract[1]] 
>> }}}/>
>> \end
>>
>> <>
>>
>> Using the splitregexp operator instead allows would allow splitting case 
>> insensitively, which might be more useful.
>>
>> Best wishes
>>
>> Jeremy.
>>
>> On 23 Sep 2021, at 15:37, Jean-Pierre Rivière  
>> wrote:
>>
>> Here it is.
>>
>> ```
>> \define count-word(word, tid)
>> {{{ 
>> [[$tid$]get[text]search-replace:gi:regexp[\b$word$\b],[þ]dump:v[first]search-replace:g:regexp,[]dump:v[final]length[]]
>>  
>> }}}
>> \end
>>
>> <>
>> ```
>>
>> I use a char that should never be within the tiddler, þ in my example. 
>> You can use another rare character is old English is concerned! I replace 
>> every occurrence of the word with it, then remove any other character then 
>> count the length of the result. If you want case sensitive search, just 
>> omit the `i` flag in the first `search-replace`.
>>
>> Le mercredi 22 septembre 2021 à 15:14:55 UTC+2, mohamed.e...@vodafone.com 
>> a écrit :
>>
>>> Hi ,
>>>
>>> is there a way to count the number of occurrences of a specific word in 
>>> a tiddler
>>>
>>> I have serached , but could only find a plugin that counts the total 
>>> number of words, or total number characters.
>>>
>>>  
>>>
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/a30f622a-627f-41a5-a532-4015e0f3faaen%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/a30f622a-627f-41a5-a532-4015e0f3faaen%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>>
>> -- 
> 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+...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/ab5296b2-f778-4334-9eef-1892487d6f19n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/ab5296b2-f778-4334-9eef-1892487d6f19n%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>

-- 
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/a16a8a5b-4dfa-45b2-ae80-c5efe4187477n%40googlegroups.com.


Re: [tw5] Counting specific words

2021-09-23 Thread Jean-Pierre Rivière
You made an error in your macro, Jeremy. You should have used $arg$ instead 
of .

Thus your code would be


\define count-words(title,word)
<$text text={{{ [[$title$]get[text]split[$word$]count[]subtract[1]] }}}/>
\end

But it is false nonetheless because it would, for example, cut word "totem" 
if asked for word "to". My regular expression does not do that thanks to 
the \b at both ends of the arguments.

Le jeudi 23 septembre 2021 à 16:45:46 UTC+2, jeremy...@gmail.com a écrit :

> Another technique is to use the “split” operator to split the string by 
> the word:
>
> \define count-words(title,word)
> <$text text={{{ [<__title__>get[text]split<__word__>count[]subtract[1]] 
> }}}/>
> \end
>
> <>
>
> Using the splitregexp operator instead allows would allow splitting case 
> insensitively, which might be more useful.
>
> Best wishes
>
> Jeremy.
>
> On 23 Sep 2021, at 15:37, Jean-Pierre Rivière  
> wrote:
>
> Here it is.
>
> ```
> \define count-word(word, tid)
> {{{ 
> [[$tid$]get[text]search-replace:gi:regexp[\b$word$\b],[þ]dump:v[first]search-replace:g:regexp,[]dump:v[final]length[]]
>  
> }}}
> \end
>
> <>
> ```
>
> I use a char that should never be within the tiddler, þ in my example. You 
> can use another rare character is old English is concerned! I replace every 
> occurrence of the word with it, then remove any other character then count 
> the length of the result. If you want case sensitive search, just omit the 
> `i` flag in the first `search-replace`.
>
> Le mercredi 22 septembre 2021 à 15:14:55 UTC+2, mohamed.e...@vodafone.com 
> a écrit :
>
>> Hi ,
>>
>> is there a way to count the number of occurrences of a specific word in a 
>> tiddler
>>
>> I have serached , but could only find a plugin that counts the total 
>> number of words, or total number characters.
>>
>>  
>>
>
> -- 
> 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+...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/a30f622a-627f-41a5-a532-4015e0f3faaen%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/a30f622a-627f-41a5-a532-4015e0f3faaen%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>
>

-- 
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/ab5296b2-f778-4334-9eef-1892487d6f19n%40googlegroups.com.


[tw5] Re: Counting specific words

2021-09-23 Thread Jean-Pierre Rivière
Here it is.

```
\define count-word(word, tid)
{{{ 
[[$tid$]get[text]search-replace:gi:regexp[\b$word$\b],[þ]dump:v[first]search-replace:g:regexp,[]dump:v[final]length[]]
 
}}}
\end

<>
```

I use a char that should never be within the tiddler, þ in my example. You 
can use another rare character is old English is concerned! I replace every 
occurrence of the word with it, then remove any other character then count 
the length of the result. If you want case sensitive search, just omit the 
`i` flag in the first `search-replace`.

Le mercredi 22 septembre 2021 à 15:14:55 UTC+2, mohamed.e...@vodafone.com a 
écrit :

> Hi ,
>
> is there a way to count the number of occurrences of a specific word in a 
> tiddler
>
> I have serached , but could only find a plugin that counts the total 
> number of words, or total number characters.
>
>  
>

-- 
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/a30f622a-627f-41a5-a532-4015e0f3faaen%40googlegroups.com.


Re: [tw5] "I moved to Discourse" - add your name too?

2021-09-23 Thread Jean-Pierre Rivière
Mee too. I've done the transition. The interface is much akin to the 
present groups than that of common forums, if only silgthly, but 
decisively. Plus the wiki syntax is (mostly?) kept, which is very nice!

Le mardi 31 août 2021 à 11:00:45 UTC+2, Werner a écrit :

> Same here, also notoriously late to the show. Also just created an account 
> on talk.tiddlywiki.org. Can only get better than GG.
>
> Kind regards
> Werner
>
> j.te...@gmail.com schrieb am Sonntag, 29. August 2021 um 22:58:07 UTC+2:
>
>> Hello all,
>>
>> As always, late to the party. Seems lots has happened while I was away.
>> Good to hear an alternative to Google Groups in underway.
>>
>> Just signed up in: talk.tiddlywiki.org
>>
>> Stay safe, stay healthy everyone.
>>
>> Regards,
>>
>> Julio
>>
>> On Thursday, August 26, 2021 at 3:35:23 AM UTC-4 TW Tones wrote:
>>
>>> Ed,
>>>
>>> It is truly amazing given what you have gone through that you are here 
>>> and keeping an interest and sharing your story. I believe strongly that 
>>> TiddlyWiki is a tool towards democratising software for every one with 
>>> different skills, ability, experience, capacities in different areas. If it 
>>> is what I believe it to be, it must be able to support all our needs small 
>>> or large. Everyone of our community members especially with different needs 
>>> are valuable participants, because without you all we cant be exposed to 
>>> the issues that arise, and our communities capacity diminishes.
>>>
>>> If we play our cards right tiddlywiki will enable far more than average 
>>> Joes.
>>>
>>> Best wishes
>>> Tony
>>>  
>>>
>>>
>>> On Thursday, 26 August 2021 at 16:18:17 UTC+10 eddi...@gmail.com wrote:
>>>
 Hi Tony,

 I honestly didn't read your reply as a complaint but thought mine may 
 have sounded that way or offended someone. Misunderstandings and confusion 
 are now a cloud that surrounds not only me but all those who dare try to 
 interpret what I am attempting to express as well LOL and a good reason to 
 keep that picture handy! Anyway, after looking at discourse (I hadn't even 
 peeked) and seeing I can go there and find out what is happening from time 
 to time without even setting up an account and knowing Jeremy is behind 
 this, I see nothing to worry about. I like sticking to the core and 
 avoiding addons as much as possible anyway. 

 Thanks Jeremy for letting me know what's happening and you are behind 
 this. I am so sorry to hear you had to deal with this bug! We do not want 
 you in my shape, get or stay well whichever best applies! 

 So, If it helps? I have been pretty much just lurking since 2014 when 
 all this stuff happened to me anyway and regretfully right in the middle 
 of 
 a group effort with many here to build an add on for TW5 that would 
 fulfill 
 a very specific need in education and I see has now been done ( a moodle 
 extension using scorm or whatever they are calling it now)! I am so happy 
 to see that but feel I had to let down many and regretfully it's of little 
 use to me now (no longer able to teach). The purpose I had was to use on 
 very limited tablets, in correctional (prison) systems, to get around the 
 fact that they had no internet access, only a browser for email, but with 
 TW5 would be able to pull and receive data from a learning 
 management server on site which I had already established, allowing 
 the teacher and student to track progress etc. I do appreciate and 
 apologize to all here that were in that group when this happened; it did 
 present capabilities far beyond my use in a greater educational role as 
 well and we were all very excited about it at the time. My stroke and 
 brain 
 tumor came out of nowhere (I can't even remember if I was able to let 
 anyone here know about it). My first surgery I came out OK but not right, 
 requiring a second that really did some damage but I am one of a very few 
 who have survived everything that happened to me I am told. I am still in 
 a 
 fight trying to recover memories, and some of the very basic abilities I 
 had before like simply playing my guitar for relaxation (I was a 
 professional musician for decades before teaching full time). 
 Administering 
 a network much less teaching others to do so is definitely never going to 
 be an option again (or working for that matter the cloud of confusion is 
 very real. Cognitive abilities tested and with everything else surrounding 
 this I am no longer able to work in any setting. I am now on 
 full disability just trying to write this is taking an eternity). We had 
 an 
 awesome team but it serves as a great example of why not to get married to 
 any platform including Goole. Perhaps if our GG here can be exported that 
 would be wise? We were using something I think G+ or Google+ but 

Re: [tw5] Re: tw editions and docker questions

2021-09-20 Thread Jean-Pierre Rivière
Thank you PMario, this is hugely appreciated.

As for manually selecting French, it can be automated as

tiddlywiki --load french.json

where french.json is


[{text:$:/languages/fr-FR,title:$:/language}]


There is no created field for this tiddler this way, though. I could forge 
one if is was really necessary.

Le lundi 20 septembre 2021 à 16:12:55 UTC+2, PMario a écrit :

> After the server is started, you need to switch the language setting to 
> French manually
> -m
>
> On Monday, September 20, 2021 at 4:11:16 PM UTC+2 PMario wrote:
>
>> On Sunday, September 19, 2021 at 2:40:17 PM UTC+2 xca...@immateriel.fr 
>> wrote:
>>
>> Embarrassingly, I'm not sure I still grasp the whole thing anymore. The 
>>> confusing thing is that the fr-FR server edition is not meant as an fr-FR 
>>> localisation of the server edition (nor any xx-YY-server editions by the 
>>> way). As far as I know, they are mostly useful when one wants to edit the 
>>> source of their xx-XX edition counterpart *in-place* (typically in a 
>>> dedicated git branch). 
>>>
>>
>> That's right. It's there for users, who want to translate the content of 
>> tiddlywiki.com to the French language. 
>> fr-FR-server includes the fr-FR wiki content, which is the translated 
>> content
>> fr-FR includes ../tw5.com as readOnly ... As I wrote. This 
>> is for development only!
>>  
>>
>>> With the help of 
>>> https://tiddlywiki.com/prerelease/#tiddlywiki.info%20Files, it must be 
>>> possible to combine these editions in order to create a NodeJS wiki that is 
>>> bootstrapped with the payload tiddlers contained in these editions, but I 
>>> didn't succeed to write down a straightforward description of the process. 
>>> Maybe @pmario has a better understanding of these mechanisms?
>>>
>>
>> If you want to "spawn" a french server you have to do this:
>>
>> tiddlywiki myWiki --init server
>>
>> add this to your tiddlywiki.info file the was created in myWiki folder
>>
>> "languages": [
>> "fr-FR"
>> ],
>>
>> So the whole file will look like this: 
>>
>> {
>> "description": "Basic client-server edition",
>> "plugins": [
>> "tiddlywiki/tiddlyweb",
>> "tiddlywiki/filesystem",
>> "tiddlywiki/highlight"
>> ],
>> "themes": [
>> "tiddlywiki/vanilla",
>> "tiddlywiki/snowwhite"
>> ],
>> "languages": [
>> "fr-FR"
>> ],
>> "build": {
>> "index": [
>> 
>> "--rendertiddler","$:/plugins/tiddlywiki/tiddlyweb/save/offline","index.html","text/plain"
>> ],
>> "static": [
>> 
>> "--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
>> 
>> "--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
>> 
>> "--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
>> 
>> "--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"
>> ]
>> }
>> }
>>
>> Start your server: 
>>
>> tiddlywiki sWiki --listen
>>
>> -mario
>>
>

-- 
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/7905c830-1e44-402e-8433-27a2fff982ccn%40googlegroups.com.


[tw5] Re: What are editor options for TiddlyWiki syntax highlighting?

2021-09-20 Thread Jean-Pierre Rivière
There is also a plugin for vim: https://github.com/sukima/vim-tiddlywiki/
(you just have to gti clone it wthin your .vim directory).

Le lundi 20 septembre 2021 à 11:15:14 UTC+2, PMario a écrit :

> On Monday, September 20, 2021 at 10:53:43 AM UTC+2 TiddlyTweeter wrote:
>  
>
>>2 - *But, *I *do *sometimes wonder about whether we could use the 
>> live *Preview Pane* in the Editor better. 
>> Like get it to *co-scroll with the edits? *
>> Since preview is live in TW I do wonder if we could do better harmonizing 
>> its showing with the typing, broheem? 
>>
>
> Yea, That would be a nice feature. ... The main problem is that the 
> rendered output doesn't have any knowledge about the wikitext that created 
> it. eg: A {{transclusion}} doesn't produce a wrapper around the transcluded 
> content, because it would add a lot of redundant elements to the TW UI and 
> slow it down. 
>
> A list widget wikitext may only be 4 or 5 lines, but it's output may be 50 
> lines. .. We would need to add additional line info to the "parsetree" 
> which would need to produce some meta data in the preview, where we can 
> scroll to. 
>
> As I was writing this, I did have a very hacky idea. .. But I need to 
> think about it. .. I'll create an issue at github. 
>
> -mario
>
>

-- 
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/c4ba4412-bad2-4721-a45f-4af4f456bf17n%40googlegroups.com.


Re: [tw5] Re: tw editions and docker questions

2021-09-19 Thread Jean-Pierre Rivière
Thank you Xavier.

I'm closing this topic and will start another one on Talk about having 
localized server edition for the sake of it and not that of translating 
another edition.

Le dimanche 19 septembre 2021 à 14:40:17 UTC+2, xca...@immateriel.fr a 
écrit :

> Hi Jean-Pierre,
>
> Embarrassingly, I'm not sure I still grasp the whole thing anymore. The 
> confusing thing is that the fr-FR server edition is not meant as an fr-FR 
> localisation of the server edition (nor any xx-YY-server editions by the 
> way). As far as I know, they are mostly useful when one wants to edit the 
> source of their xx-XX edition counterpart *in-place* (typically in a 
> dedicated git branch). 
>
> With the help of 
> https://tiddlywiki.com/prerelease/#tiddlywiki.info%20Files, it must be 
> possible to combine these editions in order to create a NodeJS wiki that is 
> bootstrapped with the payload tiddlers contained in these editions, but I 
> didn't succeed to write down a straightforward description of the process. 
> Maybe @pmario has a better understanding of these mechanisms?
>
> -- Xavier.
>
>
> On Sat, Sep 18, 2021 at 10:23 PM Jean-Pierre Rivière <
> jn.pierr...@gmail.com> wrote:
>
>> I'm sorry Xavier, but I've been unable to create any edition to see what 
>> you suggest would do. I haven't understood how to do it. Could you help me 
>> please?
>>
>> cheers,
>>
>> Le mercredi 15 septembre 2021 à 15:20:35 UTC+2, xca...@immateriel.fr a 
>> écrit :
>>
>>> Hi Jean-Pierre,
>>>
>>> Historically, the fr-FR and fr-FR-server editions were aimed at 
>>> providing a translated version of tw5.com. I had wanted to gather a 
>>> team of translators in order to achieve this, but I eventually gave up as 
>>> the task seemed too daunting. I focused instead on the fr-FR language 
>>> plugin. 
>>>
>>> What you experience — tiddlers are saved in the fr-FR sub-directory 
>>> instead of the served wiki — is probably due to the 
>>> "default-tiddler-location": "../fr-FR/tiddlers" in the config of the 
>>> fr-FR-server edition. If you remove that before you --init a new wiki, you 
>>> will get a more natural behaviour. If you confirm that it solves the 
>>> problem, I'll propose a removal from the official edition.
>>>
>>> Cheers,
>>> -- Xavier Cazin.
>>>
>>> On Wed, Sep 15, 2021 at 12:43 PM Jean-Pierre Rivière <
>>> jn.pierr...@gmail.com> wrote:
>>>
>>>> Hi @PMario and mauloop!
>>>>
>>>> I(ve taken my time but I can now bring some valuable new input. But 
>>>> before that, let me thank you for your answers. I've dipped deeper in 
>>>> docker and nodejs tiddlywiki as a result. And I can tell you that I've 
>>>> finally come to a successful setup but some problems are still there. But 
>>>> I 
>>>> can create an OK docker image and use it to launch it a suceesfull 
>>>> tiddlywiki and load stuff inside before really launching it as a server (I 
>>>> have not yet seen how to use apache as a proxy).
>>>>
>>>> So for the sake of answering my question, here is my Dockerfile:
>>>> -
>>>> # Dockerfile pour lancer le tiddlywiki proteva
>>>> # copiée et adaptée du modèle elasticdog/tiddlywiki disponible sur le 
>>>> docker hub
>>>> from node:16.9.0-alpine3.11
>>>>
>>>> LABEL author="Jean-Pierre RIVIÈRE"
>>>> LABEL content="instance de nodejs avec le tiddliwki proteva"
>>>>
>>>> env TIDDLYWIKI_VERSION=5.1.23
>>>> env PROTEVA_FEED=proteva-data.json
>>>> env WORKDIR=/usr/share/tiddlywiki/proteva-wiki
>>>>
>>>> EXPOSE 8080
>>>>
>>>> WORKDIR $WORKDIR
>>>> VOLUME $WORKDIR
>>>>
>>>> run apk update && apk add --no-cache tini
>>>> run npm install -g tiddlywiki@$TIDDLYWIKI_VERSION && npm install clean 
>>>> --force
>>>>
>>>> #ENTRYPOINT ["tiddlywiki", "proteva"]
>>>> #CMD ["--listen", "host=0.0.0.0"]
>>>> ENTRYPOINT ["/sbin/tini", "--"]
>>>> CMD ["tiddlywiki", "proteva", "--listen", "host=0.0.0.0"]
>>>> --
>>>>
>>>> and here is my proteva.sh script that I use to manage the wiki with 
>>>> ./proteva.sh init  && ./proteva.sh start
>>>> 
>>>> #!

Re: [tw5] Re: tw editions and docker questions

2021-09-18 Thread Jean-Pierre Rivière
I'm sorry Xavier, but I've been unable to create any edition to see what 
you suggest would do. I haven't understood how to do it. Could you help me 
please?

cheers,

Le mercredi 15 septembre 2021 à 15:20:35 UTC+2, xca...@immateriel.fr a 
écrit :

> Hi Jean-Pierre,
>
> Historically, the fr-FR and fr-FR-server editions were aimed at providing 
> a translated version of tw5.com. I had wanted to gather a team of 
> translators in order to achieve this, but I eventually gave up as the task 
> seemed too daunting. I focused instead on the fr-FR language plugin. 
>
> What you experience — tiddlers are saved in the fr-FR sub-directory 
> instead of the served wiki — is probably due to the 
> "default-tiddler-location": "../fr-FR/tiddlers" in the config of the 
> fr-FR-server edition. If you remove that before you --init a new wiki, you 
> will get a more natural behaviour. If you confirm that it solves the 
> problem, I'll propose a removal from the official edition.
>
> Cheers,
> -- Xavier Cazin.
>
> On Wed, Sep 15, 2021 at 12:43 PM Jean-Pierre Rivière <
> jn.pierr...@gmail.com> wrote:
>
>> Hi @PMario and mauloop!
>>
>> I(ve taken my time but I can now bring some valuable new input. But 
>> before that, let me thank you for your answers. I've dipped deeper in 
>> docker and nodejs tiddlywiki as a result. And I can tell you that I've 
>> finally come to a successful setup but some problems are still there. But I 
>> can create an OK docker image and use it to launch it a suceesfull 
>> tiddlywiki and load stuff inside before really launching it as a server (I 
>> have not yet seen how to use apache as a proxy).
>>
>> So for the sake of answering my question, here is my Dockerfile:
>> -
>> # Dockerfile pour lancer le tiddlywiki proteva
>> # copiée et adaptée du modèle elasticdog/tiddlywiki disponible sur le 
>> docker hub
>> from node:16.9.0-alpine3.11
>>
>> LABEL author="Jean-Pierre RIVIÈRE"
>> LABEL content="instance de nodejs avec le tiddliwki proteva"
>>
>> env TIDDLYWIKI_VERSION=5.1.23
>> env PROTEVA_FEED=proteva-data.json
>> env WORKDIR=/usr/share/tiddlywiki/proteva-wiki
>>
>> EXPOSE 8080
>>
>> WORKDIR $WORKDIR
>> VOLUME $WORKDIR
>>
>> run apk update && apk add --no-cache tini
>> run npm install -g tiddlywiki@$TIDDLYWIKI_VERSION && npm install clean 
>> --force
>>
>> #ENTRYPOINT ["tiddlywiki", "proteva"]
>> #CMD ["--listen", "host=0.0.0.0"]
>> ENTRYPOINT ["/sbin/tini", "--"]
>> CMD ["tiddlywiki", "proteva", "--listen", "host=0.0.0.0"]
>> --
>>
>> and here is my proteva.sh script that I use to manage the wiki with 
>> ./proteva.sh init  && ./proteva.sh start
>> 
>> #!/bin/sh
>> # shell pour initialiser ou lancer proteva via docker
>>
>> IMAGE=proteva
>> WIKI=$IMAGE
>> PROTEVA_FEED=proteva-data.json
>> PROTEVA_DIR=$PWD/proteva-data
>> WORKDIR=/usr/share/tiddlywiki/proteva-wiki
>> EDITION=rerver
>>
>> case $1 in
>>   init)
>> echo wiping $PROTEVA_DIR
>> [ -d $PROTEVA_DIR ] && sudo rm -rf $PROTEVA_DIR
>> mkdir $PROTEVA_DIR
>> echo building $IMAGE docker image
>> sudo docker build . -t $IMAGE
>> echo built
>> sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki $WIKI 
>> --init $EDITION
>> echo initialized
>> cp $PROTEVA_FEED $PROTEVA_DIR
>> sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki $WIKI 
>> --load $PROTEVA_FEED
>> rm $PROTEVA_DIR/$PROTEVA_FEED
>> echo import done
>> ;;
>>   start)
>> [ -d $PROTEVA_DIR ] || mkdir $PROTEVA_DIR
>> sudo docker run --rm -it -p 8080:8080 -v $PROTEVA_DIR:$WORKDIR --name 
>> $WIKI $IMAGE tiddlywiki $WIKI --listen host=0.0.0.0
>> ;;
>>   *) echo "usage : ${0##/} ORDER"
>>  echo '  where ORDER is either "init" or "start"'
>>  echo '  to initialize or launch proteva tiddlywiki nodejs via 
>> docker.'
>>  ;;
>> esac
>> 
>>
>> Now for the remaining problem: the fr-FR-server edition seems at fault. 
>> If I use iti instead of server (as value of the EDITION variable in the 
>> script)' the --init and --listen part is OK (launching the "proteva" wiki), 
>> the --load part is wrong for the data are copied in the fr-FR sub-directory 
>> (instead of the proteva sub

Re: [tw5] Re: tw editions and docker questions

2021-09-16 Thread Jean-Pierre Rivière
thank you Xavier. got it.

As for fr-FR-server, I think it should only have these tiddlers for its 
tiddlers (no more, no less):

├── $__Acknowledgements.tid
├── $__ContributionBanner.tid
├── $__core_ui_DefaultSearchResultList.tid
├── $__core_ui_ListItemTemplate.tid
├── $__core_ui_SideBar_Open.tid
├── $__core_ui_TagTemplate.tid
├── $__core_ui_ViewTemplate_title.tid
├── $__CurvedText.tid
├── $__DefaultTiddlers.tid
├── $__editions_fr-FR_CSS stylesheets_latex.tid
├── $__editions_fr-FR_CSS Stylesheets_mesStyles.tid
├── $__editions_fr-FR_CSS Stylesheets_utils.tid
├── $__editions_fr-FR_Macros_list.tid
├── $__editions_fr-FR_Macros_timeline-title.tid
├── $__editions_fr-FR_Macros_toc-caption.tid
├── $__editions_fr-FR_Macros_wikitexte-exemple.tid
├── $__editions_fr-FR_util-macros.tid
├── $__SiteSubtitle.tid

Now, the question I need to ask: how would I proceed to build tw from my 
own modified tw repository in order to check if that is the case or not 
that modifying of tiddlywiki.info is doing what we want to achieve?
Le jeudi 16 septembre 2021 à 12:56:22 UTC+2, xca...@immateriel.fr a écrit :

> Hi Jean-Pierre,
>
> Per the tree of the TW5 source:
>
> src/
> └── TiddlyWiki5
> (...)
> ├── editions
> │   ├── fr-FR
> │   │   ├── tiddlers
> │   │   │   ├── (a few translated tiddlers from tw5.com)
> │   │   └── tiddlywiki.info
> │   ├── fr-FR-server
> │   │   ├── tiddlers
> │   │   │   ├── config-Navigation-UpdateAddressBar.tid
> │   │   │   ├── config-more-button.tid
> │   │   │   └── system
> │   │   │   ├── favicon.ico
> │   │   │   └── favicon.ico.meta
> │   │   └── tiddlywiki.info
> │  (...)
> └── tiddlywiki.js
>
> you may want to study the *config* parameter in the *tiddlywiki.info 
> <http://tiddlywiki.info>* files.
>
> Cheers,
> -- Xavier Cazin.
>
> On Wed, Sep 15, 2021 at 8:55 PM Jean-Pierre Rivière  
> wrote:
>
>> Hi Xavier,
>>
>> Thanks for your telling. I found only one occurence 
>> of default-tiddler-location and that's in $:/boot/boot.js 
>> <http://localhost:8080/#%24%3A%2Fboot%2Fboot.js> :
>>
>> if ($tw.boot.wikiPath == wikiPath) { $tw.boot.wikiTiddlersPath = 
>> path.resolve($tw.boot.wikiPath,config["default-tiddler-location"] || 
>> $tw.config.wikiTiddlersSubDir); }
>>
>> Well... so what? Where is the change I should made? Is that a 
>> modification within $:/core/modules/config.js ? I have not found any 
>> reference to fr-FR so I assume it was deducted from the name of the 
>> file/plugin.
>>
>> Where are the sources for fr-FR and fr-FR-server?
>>
>> I have found the same problem with es-ES-server and ko-KR-server which 
>> are the two only other translated server editions.
>>
>> Regards,
>>
>>
>>
>> Le mercredi 15 septembre 2021 à 15:20:35 UTC+2, xca...@immateriel.fr a 
>> écrit :
>>
>>> Hi Jean-Pierre,
>>>
>>> Historically, the fr-FR and fr-FR-server editions were aimed at 
>>> providing a translated version of tw5.com. I had wanted to gather a 
>>> team of translators in order to achieve this, but I eventually gave up as 
>>> the task seemed too daunting. I focused instead on the fr-FR language 
>>> plugin. 
>>>
>>> What you experience — tiddlers are saved in the fr-FR sub-directory 
>>> instead of the served wiki — is probably due to the 
>>> "default-tiddler-location": "../fr-FR/tiddlers" in the config of the 
>>> fr-FR-server edition. If you remove that before you --init a new wiki, you 
>>> will get a more natural behaviour. If you confirm that it solves the 
>>> problem, I'll propose a removal from the official edition.
>>>
>>> Cheers,
>>> -- Xavier Cazin.
>>>
>>> On Wed, Sep 15, 2021 at 12:43 PM Jean-Pierre Rivière <
>>> jn.pierr...@gmail.com> wrote:
>>>
>>>> Hi @PMario and mauloop!
>>>>
>>>> I(ve taken my time but I can now bring some valuable new input. But 
>>>> before that, let me thank you for your answers. I've dipped deeper in 
>>>> docker and nodejs tiddlywiki as a result. And I can tell you that I've 
>>>> finally come to a successful setup but some problems are still there. But 
>>>> I 
>>>> can create an OK docker image and use it to launch it a suceesfull 
>>>> tiddlywiki and load stuff inside before really launching it as a server (I 
>>>> have not yet seen how to use apache as a proxy).
>>>>
>>>> So for the sake of answering my question, here is my Dockerfile:
>>

[tw5] Re: If possible, can GG continue to co-exist with TiddlyTalk?

2021-09-15 Thread Jean-Pierre Rivière
Thanks to this thread, I've just discovered that there was an other tw 
forum! It could be a regular announce here, for GG is a logical step to 
look out for tw user list, isn't it?

So I can't compare the two services yet.

Le lundi 13 septembre 2021 à 09:44:16 UTC+2, strikke...@gmail.com a écrit :

> Kosmo,
>
> Agreed, for all its faults, I find GG easier to use, and would like the 
>> group here to remain active. TT is just fussy and annoying.
>>
>
> I do not think it is just fussy and annoying. More material will be 
> collected in one place over time and be easier to find. Example the *How 
> to* and the *Showcase *categories - and more.
>
> It is worth testing Talk tiddlywiki out for some time - if at all 
> possible. Some of us have not used Discourse before and need some time to 
> find out how it really works.
>
> GG active or not  does not help much if most of the activity has moved. 
>
>
>
>

-- 
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/76836f46-4881-40d7-9d65-ccaecc2cf0bcn%40googlegroups.com.


Re: [tw5] Re: tw editions and docker questions

2021-09-15 Thread Jean-Pierre Rivière
Hi Xavier,

Thanks for your telling. I found only one occurence 
of default-tiddler-location and that's in $:/boot/boot.js 
<http://localhost:8080/#%24%3A%2Fboot%2Fboot.js> :

if ($tw.boot.wikiPath == wikiPath) { $tw.boot.wikiTiddlersPath = 
path.resolve($tw.boot.wikiPath,config["default-tiddler-location"] || 
$tw.config.wikiTiddlersSubDir); }

Well... so what? Where is the change I should made? Is that a modification 
within $:/core/modules/config.js ? I have not found any reference to fr-FR 
so I assume it was deducted from the name of the file/plugin.

Where are the sources for fr-FR and fr-FR-server?

I have found the same problem with es-ES-server and ko-KR-server which are 
the two only other translated server editions.

Regards,



Le mercredi 15 septembre 2021 à 15:20:35 UTC+2, xca...@immateriel.fr a 
écrit :

> Hi Jean-Pierre,
>
> Historically, the fr-FR and fr-FR-server editions were aimed at providing 
> a translated version of tw5.com. I had wanted to gather a team of 
> translators in order to achieve this, but I eventually gave up as the task 
> seemed too daunting. I focused instead on the fr-FR language plugin. 
>
> What you experience — tiddlers are saved in the fr-FR sub-directory 
> instead of the served wiki — is probably due to the 
> "default-tiddler-location": "../fr-FR/tiddlers" in the config of the 
> fr-FR-server edition. If you remove that before you --init a new wiki, you 
> will get a more natural behaviour. If you confirm that it solves the 
> problem, I'll propose a removal from the official edition.
>
> Cheers,
> -- Xavier Cazin.
>
> On Wed, Sep 15, 2021 at 12:43 PM Jean-Pierre Rivière <
> jn.pierr...@gmail.com> wrote:
>
>> Hi @PMario and mauloop!
>>
>> I(ve taken my time but I can now bring some valuable new input. But 
>> before that, let me thank you for your answers. I've dipped deeper in 
>> docker and nodejs tiddlywiki as a result. And I can tell you that I've 
>> finally come to a successful setup but some problems are still there. But I 
>> can create an OK docker image and use it to launch it a suceesfull 
>> tiddlywiki and load stuff inside before really launching it as a server (I 
>> have not yet seen how to use apache as a proxy).
>>
>> So for the sake of answering my question, here is my Dockerfile:
>> -
>> # Dockerfile pour lancer le tiddlywiki proteva
>> # copiée et adaptée du modèle elasticdog/tiddlywiki disponible sur le 
>> docker hub
>> from node:16.9.0-alpine3.11
>>
>> LABEL author="Jean-Pierre RIVIÈRE"
>> LABEL content="instance de nodejs avec le tiddliwki proteva"
>>
>> env TIDDLYWIKI_VERSION=5.1.23
>> env PROTEVA_FEED=proteva-data.json
>> env WORKDIR=/usr/share/tiddlywiki/proteva-wiki
>>
>> EXPOSE 8080
>>
>> WORKDIR $WORKDIR
>> VOLUME $WORKDIR
>>
>> run apk update && apk add --no-cache tini
>> run npm install -g tiddlywiki@$TIDDLYWIKI_VERSION && npm install clean 
>> --force
>>
>> #ENTRYPOINT ["tiddlywiki", "proteva"]
>> #CMD ["--listen", "host=0.0.0.0"]
>> ENTRYPOINT ["/sbin/tini", "--"]
>> CMD ["tiddlywiki", "proteva", "--listen", "host=0.0.0.0"]
>> --
>>
>> and here is my proteva.sh script that I use to manage the wiki with 
>> ./proteva.sh init  && ./proteva.sh start
>> 
>> #!/bin/sh
>> # shell pour initialiser ou lancer proteva via docker
>>
>> IMAGE=proteva
>> WIKI=$IMAGE
>> PROTEVA_FEED=proteva-data.json
>> PROTEVA_DIR=$PWD/proteva-data
>> WORKDIR=/usr/share/tiddlywiki/proteva-wiki
>> EDITION=rerver
>>
>> case $1 in
>>   init)
>> echo wiping $PROTEVA_DIR
>> [ -d $PROTEVA_DIR ] && sudo rm -rf $PROTEVA_DIR
>> mkdir $PROTEVA_DIR
>> echo building $IMAGE docker image
>> sudo docker build . -t $IMAGE
>> echo built
>> sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki $WIKI 
>> --init $EDITION
>> echo initialized
>> cp $PROTEVA_FEED $PROTEVA_DIR
>> sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki $WIKI 
>> --load $PROTEVA_FEED
>> rm $PROTEVA_DIR/$PROTEVA_FEED
>> echo import done
>> ;;
>>   start)
>> [ -d $PROTEVA_DIR ] || mkdir $PROTEVA_DIR
>> sudo docker run --rm -it -p 8080:8080 -v $PROTEVA_DIR:$WORKDIR --name 
>> $WIKI $IMAGE tiddlywiki $WIKI --listen host=0.0.0.0
>> ;;
>>   *) echo "usage : ${0##/} ORDER"
>>  echo '  where O

[tw5] Re: Automatically generate static website in Node

2021-09-15 Thread Jean-Pierre Rivière
Hi! Just go to tiddlywiki.com and look out for the "Generating Static Sites 
with TiddlyWiki" tiddler for full explanation.

in very short: use the --rendertiddlers command of tiddlywiki with the list 
of all wanted tiddlers as subsequent arguments of the command line. The 
problem is, this is done in an other process than the one serving as a web 
server currently run.

Now, if you had the control of the server, you could launch a daemon to 
just do that on each new or updated file within the tiddlers directory. As 
for deleted and renamed tiddlers, it would require a simple rm command also 
launched by a similar mechanism. But of course, this is not possible for 
any hosting service like github. You would need an other server on your 
control that would just do that on a copy of the tiddlers files it would 
keep in sync. I would think that manually launching the update of the 
static site would be wiser and less energy-hungry.

Regards,

Le mardi 14 septembre 2021 à 19:35:59 UTC+2, rikagol...@gmail.com a écrit :

> Hi All!
>
> I am using NodeJS right now to auto save Tiddlers. I love it!
>
> I expected that a static website (index.html) would get built 
> automatically on save, but that's not happening. What's an easy way to 
> automatically build a static website on each autosave? (I'm thinking ahead 
> to when I will host my site on Github). 
>
> Thanks!
>
>
>

-- 
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/a22e777a-93e9-43ca-9c26-0132be9a407an%40googlegroups.com.


[tw5] Re: tw editions and docker questions

2021-09-15 Thread Jean-Pierre Rivière
Hi @PMario and mauloop!

I(ve taken my time but I can now bring some valuable new input. But before 
that, let me thank you for your answers. I've dipped deeper in docker and 
nodejs tiddlywiki as a result. And I can tell you that I've finally come to 
a successful setup but some problems are still there. But I can create an 
OK docker image and use it to launch it a suceesfull tiddlywiki and load 
stuff inside before really launching it as a server (I have not yet seen 
how to use apache as a proxy).

So for the sake of answering my question, here is my Dockerfile:
-
# Dockerfile pour lancer le tiddlywiki proteva
# copiée et adaptée du modèle elasticdog/tiddlywiki disponible sur le 
docker hub
from node:16.9.0-alpine3.11

LABEL author="Jean-Pierre RIVIÈRE"
LABEL content="instance de nodejs avec le tiddliwki proteva"

env TIDDLYWIKI_VERSION=5.1.23
env PROTEVA_FEED=proteva-data.json
env WORKDIR=/usr/share/tiddlywiki/proteva-wiki

EXPOSE 8080

WORKDIR $WORKDIR
VOLUME $WORKDIR

run apk update && apk add --no-cache tini
run npm install -g tiddlywiki@$TIDDLYWIKI_VERSION && npm install clean 
--force

#ENTRYPOINT ["tiddlywiki", "proteva"]
#CMD ["--listen", "host=0.0.0.0"]
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["tiddlywiki", "proteva", "--listen", "host=0.0.0.0"]
--

and here is my proteva.sh script that I use to manage the wiki with 
./proteva.sh init  && ./proteva.sh start

#!/bin/sh
# shell pour initialiser ou lancer proteva via docker

IMAGE=proteva
WIKI=$IMAGE
PROTEVA_FEED=proteva-data.json
PROTEVA_DIR=$PWD/proteva-data
WORKDIR=/usr/share/tiddlywiki/proteva-wiki
EDITION=rerver

case $1 in
  init)
echo wiping $PROTEVA_DIR
[ -d $PROTEVA_DIR ] && sudo rm -rf $PROTEVA_DIR
mkdir $PROTEVA_DIR
echo building $IMAGE docker image
sudo docker build . -t $IMAGE
echo built
sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki $WIKI 
--init $EDITION
echo initialized
cp $PROTEVA_FEED $PROTEVA_DIR
sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki $WIKI 
--load $PROTEVA_FEED
rm $PROTEVA_DIR/$PROTEVA_FEED
echo import done
;;
  start)
[ -d $PROTEVA_DIR ] || mkdir $PROTEVA_DIR
sudo docker run --rm -it -p 8080:8080 -v $PROTEVA_DIR:$WORKDIR --name 
$WIKI $IMAGE tiddlywiki $WIKI --listen host=0.0.0.0
;;
  *) echo "usage : ${0##/} ORDER"
 echo '  where ORDER is either "init" or "start"'
 echo '  to initialize or launch proteva tiddlywiki nodejs via docker.'
 ;;
esac


Now for the remaining problem: the fr-FR-server edition seems at fault. If 
I use iti instead of server (as value of the EDITION variable in the 
script)' the --init and --listen part is OK (launching the "proteva" wiki), 
the --load part is wrong for the data are copied in the fr-FR sub-directory 
(instead of the proteva sub-directory). Besides, I can't see any French 
with that edition.

the real command I use is:

sudo docker run --rm -v 
/home/jnpr/big/workspace/accessibilite/dockerized/proteva-data:/usr/share/tiddlywiki/proteva-wiki
 
proteva tiddlywiki proteva --load proteva-data.json

This commands create this strucure all of its own:

proteva-data
├── fr-FR
│   └── tiddlers
│   ├── $__StoryList.tid
│   └── TODO.tid

(proteva-data is created previously along proteva-data/proteva by --init)

Where can I get the fr-FR sources/fellows of this project to help sort out 
this mystery?

Le dimanche 12 septembre 2021 à 00:59:09 UTC+2, mauloop a écrit :

> I published on Github a little project to run Tiddlyserver with Docker. 
> You can find it at https://github.com/mauloop/tiddlyserver-docker.
> It allows multiple wikis within a single server instance and custom 
> editions path.
>
> I made it for my own use,  so it does not provide very rich documentation, 
> but just a quick and dirty readme with minimum commands needed to get 
> started. However it could fit some of your requirements.
>
> Finally here is good example about how to set up Apache to proxy a Nodejs 
> TW5 <https://nicolaw.uk/#:TiddlyWikiApacheProxy%20Hello>. I think it 
> could work with TiddlyServer too with very little changes, but I never 
> experienced this.
>
> Hope this could help. Have fun, )+(auloop
>
> Il giorno giovedì 9 settembre 2021 alle 23:23:54 UTC+2 
> jn.pierr...@gmail.com ha scritto:
>
>> Hi everybody!
>>
>> I need to have some of my tiddlywiki being onto nodejs to gain some 
>> functionality. For this, I have selected docker to have iti as easy as I 
>> can. Besides docker, I need some shell script to setup the wiki (docker 
>> images) ready to launch (listen command). Good point: this was an occasion 
>> for me to invest into docker.
>>
&g

[tw5] tw editions and docker questions

2021-09-09 Thread Jean-Pierre Rivière
Hi everybody!

I need to have some of my tiddlywiki being onto nodejs to gain some 
functionality. For this, I have selected docker to have iti as easy as I 
can. Besides docker, I need some shell script to setup the wiki (docker 
images) ready to launch (listen command). Good point: this was an occasion 
for me to invest into docker.

But there remains a problem, which is that of the tiddlywiki edition. the 
"editions" command list the available options with a quick summary. But 
some options would gain a little more explanations, like the 
server-external-js which seems to mean that the js is not mangled inside 
the js. That could be useful to serve several wikis from the same server.

But in fact, I need a localized edition. Alas, editions are not cumulative 
(but the server-external-js really should be an option and not a proper 
edition because that's not an editorial difference at all and it could be 
useful for many editions).

By localized, I mean that I want the content in French, but without all the 
fuss of fr-FR editions which I would need to get rid of but for a few 
tiddlers (and this would be a burden to implement and maintain). As for the 
fr-FR-server, the interface has not been translated (I wonder what has been 
translated and where I could find this information?)

docker code used (without the volume and port stuff) on my tiddlywiki 
docker image tiddock:

docker run -d --rm tiddock wiki --init fr-FR-server
docker run -d --rm tiddock server host=0.0.0.0

(I used elasticdog Dockerfile and shells to see what was needed to do. 
Thanks elasticdog!)

Also, if I understand what is said here, I must not directly use tiddlywiki 
for a production wiki but use a proxy liki nginx can provide. I have no 
knowledge of nginx so far. Where could I find some useful docs or sources 
of a tiddlywiki with this kind of setup?

Thanks in advance for your help.

-- 
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/557ebd2a-a02c-41e1-a9d2-de28ac1a0495n%40googlegroups.com.


[tw5] Re: protected macros

2021-06-29 Thread Jean-Pierre Rivière


Le mardi 29 juin 2021 à 02:47:35 UTC+2, PMario a écrit :

>
> > A suggestion: could we say that any macro whose name starts by _ or even 
> __ for compatibility's sake, is not exported even within a macro tiddler? 
>
> *No*, because this would be not backwards compatible. But you can use 
> this convention if you like, but the system won't enforce it. 
>
> The way it is designed is consistent but not always obvious.
>
>
Today, global macros are tagged $:/tags/Macro but let's say I add an other 
tag $:/tags/NewMacro which is similar to the previous one, would it not be 
OK to have for NewMacro only that macros starting by _ are not global? That 
would not destroy any old code.

Whatever, now that I know that my locally defined macros are *always* 
prioritary, the need is lesser.

Many thanks for all your valuable help Mario!

-- 
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/98acd1fb-16e9-422f-a909-cc4d14fe7de3n%40googlegroups.com.


[tw5] protected macros

2021-06-28 Thread Jean-Pierre Rivière
In a tiddlers tagged as #:/tags/Macro there is a public macro. It requires 
other macros to achieve its goals, but these macros have no business being 
used elsewhere.

If I declare these macros in the same tiddler, they are exported. Bad :-( 
To mitigate that, I have their name beginning with an underscore, meaning 
to me not to use them elsewhere.

But if two differentss macros tiddler both define their own _subMacro, what 
_subMacro would be called? the one in the same tiddler or maybe yes, maybe 
not, we can't say. This is the real problem.

same question if my macro tiddler has _myStuff macro and a non macro 
tiddler define a macro also called _myStuff and use it: which one would be 
called? That's a variation from the previous question.

I know I can have _mySuff macro into a separate non macro tiddler, and 
\import it within my macro tiddler. That way my macro tiddler is 100% 
functionaal and _myStuff is not exported but creating another tiddler is a 
problem in itself: it's yet another tiddler, it's not that a good idea 
because it's only there for a single tiddler, and I would need to have a 
name for it. It would complexify my naming convention which is already a 
lengthy paper... and I would have to decide which idea is the one I shall 
get. to be honest, my macro fubar for the foo matter is in 
$:/user/foo/macros/fubar. So where should _sub4fubar be ? 
$:/user/foo/macros/fubar/private would do but then $:/user/foo/macros/fubar 
would both be a file and a directory, whis is a no go. So no way to store 
anything below the macro name. $:/user/foo/privateMacros/fubar perhaps? 
or  $:/user/foo/private/macros/fubar ? I could have some macro for a bar 
filter in $:/user/foo/private/filters/fubar but then I don't have the same 
meaning for macros there than in the $:/user/foo/macros/fubar where 
"macros" tells that here are macros but in $:/user/foo/private/macros/fubar 
"macros" tells that this concerns a macro tiddler  named fubar but could be 
whatever, not especially macros (altgough very likely macros). And when the 
macro has no sub macros, the naming convention shouuld be the same: do not 
complexify 100% for the 10%. This rules out a scheme like 
$:/user/foo/macros/fubar/fubar and $:/user/foo/macros/fubar/_sub4fubar 
which would otherwise answer the question (but being a very ugly beast).

A suggestion: could we say that any macro whose name starts by _ or even __ 
for compatibility's sake, is not exported even within a macro tiddler?

-- 
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/fd8f1a78-196c-4508-837e-7c53580563e0n%40googlegroups.com.


[tw5] Re: template: where is the widget???

2021-06-28 Thread Jean-Pierre Rivière
Thank you to both of you for your explanation. The information on the 
system tag was very helpful.

@Soren: you write tgis in your textbook:

Here are some things that *change the current tiddler*:

   - Transcluding another tiddler with the {{curly braces}} syntax.
   - Using a $list widget to enumerate the outputs of a filter.
   - Directly setting currentTiddler with a $set or $vars widget.

Does it mean that you can change the content of a var or that you stack up 
vars, getting only the values from the top var?

Could it be used to have some kind of recursion in a safe way? I was 
thinking of vars as immutable stuff because of the syntax that declare them 
but no syntax to alter them otherwise.

And finnally, in a number of my templates, the template content is only 
<>. It seems a bit out of touch with what your telling me with 
what template are. In effect, myMacro is only used there. Would it b a 
better idea to ditch the macro and have the macro body directly into the 
template text? (yes, myMacro has no params.)

regards,

-- 
Jean-Pierre
Le lundi 28 juin 2021 à 16:18:20 UTC+2, Soren Bjornstad a écrit :

> I've read in the doc that widgets are the fundamental part of tiddlywiki 
>> and that all wiki syntax sugar is finally resolved as a number of widgets.
>>
>> Use of template is only described with transclusion as {{||template}} 
>> (with tiddler or field or index before ||).
>>
>> the transclude widget has no template attribute.
>>
>> How then is done the transclusion? Shouldn't the transclude widget have a 
>> template attribute?
>>
>
> Actually, the *template *is what's being transcluded during a 
> transclusion, not the tiddler. When you transclude a tiddler through a 
> template, the current tiddler is set to that tiddler and then the template 
> is transcluded.
>
> {{Tiddler||Template}} evaluates to:
>
> <$tiddler tiddler=Tiddler>
>   <$transclude tiddler=Template/>
> 
>
> {{||Template}} doesn't change the current tiddler and so evaluates to 
> simply:
>
> <$transclude tiddler=Template/>
>
> {{Tiddler1}} is shorthand for {{Tiddler1||Tiddler1}}, and evaluates to:
>
> <$tiddler tiddler=Tiddler1>
>   <$transclude tiddler=Tiddler1/>
> 
>
> More on templates and current tiddlers 
>  
> from 
> my TiddlyWiki textbook.
>  
>
>> Also, I've come across $:/tags/ViewTemplate which is only described as: 
>> "The system tag  
>> $:/tags/ViewTemplate marks the view template." which is not very telling.
>>
> I've done tenplates tgat work fine. They are not 
>> tagged $:/tags/ViewTemplate. If I tag them as scuch, they act aout as if 
>> their content was twice included. What does $:/tags/ViewTemplate really do? 
>> How should it be used?
>>
>
> Haha, some of those tag explanations could use some work. TiddlyWiki just 
> transcludes all the tiddlers with that tag in sequence when it is rendering 
> each tiddler:
>
> <$list
>  filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" 
> variable="listItem">
>   <$transclude tiddler=<>/>
> 
>
> So the view template is essentially a list of templates that get 
> *automatically* transcluded for every tiddler without mentioning them in 
> your wikitext. This includes things like the title, the tags bar, and so on.
>
> More on the view template 
> .
>

-- 
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/dec36e17-504d-4b05-9e10-c7884c13b836n%40googlegroups.com.


[tw5] Re: details tag and wiki interpretation

2021-06-28 Thread Jean-Pierre Rivière
Thank you Eric. And ... does work too. Nice trick!

Le lundi 28 juin 2021 à 14:20:53 UTC+2, David Gifford a écrit :

> A span works just as well. Blessings.
>
> On Monday, June 28, 2021 at 7:02:21 AM UTC-5 Eric Shulman wrote:
>
>> On Monday, June 28, 2021 at 4:49:46 AM UTC-7 jn.pierr...@gmail.com wrote:
>>
>>> I've got a perfectly all right tiddler content with something like an 
>>> ordered list in wiki syntax.
>>> Then I've decided to have that part within a html details markup. The 
>>> problem is, the wiki syntax is no more producing a list.
>>>
>>
>> The  element seems to be "eating" the newline that is required 
>> to precede the wikitext ordered list syntax.
>> To work around this, wrap your ordered list within a ... 
>> element, like this:
>>
>> 
>> fubaring
>> 
>>
>> # foo
>> # bar
>> 
>>  
>>
>> Note that the newline preceding the first # item is necessary to ensure 
>> "block mode" parsing of the ordered list.
>>
>> enjoy,
>> -e
>>
>

-- 
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/74dfc343-e1fe-4436-8096-8c9edf03cf44n%40googlegroups.com.


[tw5] details tag and wiki interpretation

2021-06-28 Thread Jean-Pierre Rivière
Hi!

I've got a perfectly all right tiddler content with something like an 
ordered list in wiki syntax.

Then I've decided to have that part within a html details markup. The 
problem is, the wiki syntax is no more producing a list.

for instane my wiki code would be


fubaring

# foo
# bar



see image

[image: details-bug.png]

-- 
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/9d94e874-2ba3-4af3-bb56-1abbbc336cc6n%40googlegroups.com.


[tw5] template: where is the widget???

2021-06-28 Thread Jean-Pierre Rivière
Hi!

I've read in the doc that widgets are the fundamental part of tiddlywiki 
and that all wiki syntax sugar is finally resolved as a number of widgets.

Use of template is only described with transclusion as {{||template}} (with 
tiddler or field or index before ||).

the transclude widget has no template attribute.

How then is done the transclusion? Shouldn't the transclude widget have a 
template attribute?

Also, I've come across $:/tags/ViewTemplate which is only described as: 
"The system tag  $:/tags/ViewTemplate 
marks the view template." which is not very telling.

I've done tenplates tgat work fine. They are not 
tagged $:/tags/ViewTemplate. If I tag them as scuch, they act aout as if 
their content was twice included. What does $:/tags/ViewTemplate really do? 
How should it be used?

Regards,

-- 
Jean-Pierre





-- 
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/bfe6e25c-149f-4fdb-aa9a-fdd383877f05n%40googlegroups.com.


[tw5] logical AND for filter runs

2021-06-16 Thread Jean-Pierre Rivière
I've been into toying with run prefixes for my filters, to see what I can 
now do with them.

I've been able to have an equivalent of "if not A then B" but I've not been 
able to get "if A then B". the + or :and prefix is not a logical AND at all 
but just a way to replace all currents stuff in the pipe with new contents.

Part of the problem is I can't produce NOT A. I mean, see this example:

{{{
cobalt great gaz :filter[split[]match[r]] 
+[!is[blank]then[]else["great" void]]
~Expected
}}}

{{{
cobalt fox gaz :filter[split[]match[r]] 
+[!is[blank]then[]else["fox" void]]
~Unexpected
}}}

The only output is "fox" void. I expected that the first filter output be 
Expected.

As a kind of check with

{{{
cobalt great gaz :filter[split[]match[r]] 
~Expected
}}}

{{{
cobalt fox gaz :filter[split[]match[r]] 
~Unexpected
}}}

the output is
great
Unexpected
which is totally what we thought we should have.

The same also happens with

cobalt great gaz :filter[split[]match[r]]
+[!is[blank]]
~Expected
}}}

{{{
cobalt fox gaz :filter[split[]match[r]]
+[!is[blank]]
~Unexpected
}}}

Again, that's OK. Maybe that's because [] is not a blank input? But 


{{{ [[]] +[!is[blank]then[Full]else[Empty]] }}}

does indeed output Empty as expected so I'm really confused now...

BTW, in real life, in "if A then B" my B is not a constant, in which case I 
would have used [A]!is[blank]then[B] but a complex run. I know I can have a 
function or variable as my B to get around the difficulty, but that is not 
what I want to do here.

-- 
Jean-Pierre


-- 
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/e0f75d55-b7bb-4478-bc5c-8b38b56baea8n%40googlegroups.com.


[tw5] tiddler recognizes self as transcluded or not

2021-05-21 Thread Jean-Pierre Rivière
I have built a lengthy article by transcluding tiddlers.

when I'm going directly to such a sub-tiddler (not in the sense of a plugin 
subtiddler), there is no way that I know for this sub-tiddler to know it is 
shown directly or as included.

In both case, the transclusion variable is she same, and the tiddler is the 
current tiddler.

Yet, <> is different for both. So there is a mean to differentiate 
it.

That would be good enough if I knew what should be the <> result 
for a tiddler appearing directly in the main part.

So any help would be appreciated.

regards,

-- 
Jean-Pierre

-- 
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/78f5e358-d97e-4b14-b9c2-f91da1e1ca4en%40googlegroups.com.


[tw5] Re: chaining jobs

2021-05-07 Thread Jean-Pierre Rivière
Thank You Eric, my job chaining is now working!

And I know what to do next (hum... first :-) as a payback for the 
community: propose a change in the official doc that tells this feature you 
wrote. Because this is not tge case currently. At one point, it evens 
states that "Embedding the actions within the triggering widget (an older 
technique that is now deprecated)".

Just to be really true about this order thing, is it really true that 
nothing more can be warranted for the order of execution : no third batch, 
no order within each batch.

especially:

<$button>
<>
<>


one cannot say anything about the order of execution of the <$action-XXX> 
within macro-for-action-01 AND macro-for-action-02 **relatively to one lot 
relative to the other  BUT ALSO within each lot? Maybe that defiance can be 
restricted to some features only?

Surely I should avoid being too precise: these (precious) details have to 
be written by experts.

Le jeudi 6 mai 2021 à 20:35:56 UTC+2, Eric Shulman a écrit :

> On Thursday, May 6, 2021 at 5:24:11 AM UTC-7 jn.pierr...@gmail.com wrote:
>
>> In my project I need to first create a new project with an identifier (an 
>> input data) then to offer a complete input of the project to the user.
>> I have crafted this macro invoked when the identifier is ready to be used.
>>
>
> Assuming that your macro is triggered by a button press, you can split the 
> actions into two separate parts.  The first part is specified in the body 
> of the $button widget, and the second part  is specified using the 
> actions=... parameter of the $button widget.  When the button is pressed, 
> the "body" actions are performed (and *completed*) first, followed by the 
> "parameter" actions.   For example:
>
> \define target() TargetTiddler
> \define button_actions() <$action-setfield $tiddler=<> 
> timestamp2=<> />
> <$button actions=<>> click me
><$action-setfield $tiddler=<> timestamp1=< "0hh0mm0ss0XXX">> />
> 
>
> When the $button is clicked, the "timestamp1" field is written first and 
> then the actions=... is triggered, writing the "timestamp2" field.
>
> Also, as a side note, the $set widgets in your code could be written more 
> simply using $vars and "transcluded filter" syntax, like this:
> <$vars project={{##project}} autoref={{{ [{##project}addsuffix[/project]] 
> }}}>
>
> Hopefully, the above code examples should get you pointed in the right 
> direction.
>
> enjoy,
> -e
>

-- 
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/e19d8e4f-6e87-4f5d-80bb-82bc5cf1bfd4n%40googlegroups.com.


[tw5] Re: chaining jobs

2021-05-06 Thread Jean-Pierre Rivière
True but it's not that.

I acn this of a kludge though. Since editProject is called but too uoon 
(immediatly), I could instead called a new macro callEditProjectASAP which 
would basically see if the new item is there until it is, with a sleep 
inbeween. and then call editProject. Not so simple IRL surely, for sleeping 
is not so simple in JS, needs a bit of things to do but tgen the problem 
is...

how can I code a javascript macro in TW5? Is it possible?

even more murky: make it call js through a filter. just as a way to call js 
if nothing else.or as regular html launched js 

[tw5] chaining jobs

2021-05-06 Thread Jean-Pierre Rivière
In my project I need to first create a new project with an identifier (an 
input data) then to offer a complete input of the project to the user.

I have crafted this macro invoked when the identifier is ready to be used.

\define insertProject(proto)
<$set name=project select=0 filter="[all[current]getindex[project]]">
  <$action-setfield $tiddler=<> $index=<> $value=""/>
  <$set name=autoref select=0 filter="[addsuffix[/project]]">
  <$action-setfield $tiddler=<> $index=<> 
$value=<>/>
  <$macrocall $name=editProject proto="$proto$" target=<> 
id=<>/>

\end

this does indeed create an index within the data tiddler with the desired 
value. Then it prepares the data for the further input. So far so good. But 
the second input does nothing. With additional logging, it is shown that in 
fact this last part is called first! (this is the call to editProject).

I wonder wether that is but an illustration that in TW the order of the 
treatments cannot be guaranteed?

Anyway. can I achieve my goal? And how?

In the meantime, I'll just setup a message to do the edit by hand.

Could we dream of callbacks for action, that would be called after the 
action is done?

something like <$macrocall $name=insertProject $chaining=editProject/>

surely it would use variable instead of parameters as a way not to have too 
cumbersome a syntax in the macrocall. And it may very well not be on offer 
for a direct call like <>.

Regards.

-- 
Jean-Pierre

-- 
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/4f0c3abf-a515-4b5a-861a-1241b6e01e31n%40googlegroups.com.


[tw5] Re: bug? getindex failing retrieve json with $:/temp/... named tiddlers

2021-05-06 Thread Jean-Pierre Rivière
Thank you Josh!

You're right. I've just made my test on a new wiki and I can't replicate 
it. I apologize for the inconvenience. I was pretty sure it was of the 
correct type but surely I've not been able to spot that.

Le jeudi 6 mai 2021 à 00:14:34 UTC+2, joshua@gmail.com a écrit :

> I could not recreate this in my JsonMangler demo wiki. If  
> `$:/temp/project` is being created with an action/programatcially, then 
> most likely the `type` field is not being set to `application/json`.
>
> Best,
> Joshua Fontany
> On Wednesday, May 5, 2021 at 1:41:21 AM UTC-7 jn.pierr...@gmail.com wrote:
>
>> Be a tiddler of json type whose content is
>>
>> { "pleiade": { "name": "Pléiade v2", "project": "pleiade", "url": "
>> https://pleiade.test.acmeserver.com; } }
>>
>> and now put it in two tiddlers. one is "project" and the othes is 
>> "$:/temp/project".
>>
>> create a tw5 tiddler with this code:
>>
>> $:/temp/project: {{{ [[$:/temp/project]getindex[/pleiade]] }}}
>>
>> project: {{{ [[project]getindex[/pleiade]] }}}
>>
>> and see its outupt:
>> -
>> $:/temp/project:
>>
>> project: { "name": "Pléiade v2", "project": "pleiade", "url": 
>> "https://pleiade.test.acmeserver.com; }
>>
>> --
>>
>> The same void output happpens witg a name like "$:/temp/project".
>>
>

-- 
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/d2831e6e-4755-492a-b189-27477ccc8882n%40googlegroups.com.


[tw5] Re: "Filter Expression" doc

2021-05-05 Thread Jean-Pierre Rivière
Thank You Josh. I still have a question re

"Fork the TW5 repository to your own GitHub user account, and then clone it 
locally."

I thought I only had to clone the TW5 repository directly onto my system 
and have done my work here, and then present a pull request from here? I 
have to say, that I never used git other than locally for a single user 
setup (me). So it just may very well be my ignoring the proper ways.

Do you mean that under my github account I need to have a lidicated project 
(my-tw5%fork or such) and when at home I feel it's worth it, commit my 
local change to it and from it create a pull request to the main project?

regards,

-- 
Jean-Pierre

Le mercredi 5 mai 2021 à 01:13:42 UTC+2, joshua@gmail.com a écrit :

> Fork the TW5 repository to your own GitHub user account, and then clone it 
> locally. 
>
> Then checkout the "tiddlywiki-com" branch via git command line. (This 
> branch can live push updates to the website, and not wait until the next 
> Version release).
>
> Then, run the node command given in the `bin` scripts folder:
> `./path/to/TiddlyWiki5/bin.serve.sh`
>
> This launches the "tiddlywiki-com-server" Edition (from the 
> 'TiddlyWiki5/editions' folder) as a node process.
>
> Navigate a browser to 127.0.0.1:8080. Make changes to documentation 
> tiddlers. Push your changes back to your fork.
>
> From GitHub, create a Pull Request from your fork of the "tiddlywiki-com" 
> branch to the official repository's "tiddlywiki-com" branch. Describe your 
> changes in your PR.
>
> The community can then review those changes, and Jeremy can merge if it 
> all looks good.
>
> Best,
> Joshua Fontany
>
>
>
> On Tuesday, May 4, 2021 at 1:50:32 PM UTC-7 jn.pierr...@gmail.com wrote:
>
>> Fine. How may I help then? It's also that bit that I find lacking in the 
>> doc (just poke at it but got no interesting stuff for this).
>>
>> Le mardi 4 mai 2021 à 21:59:46 UTC+2, saq.i...@gmail.com a écrit :
>>
>>> I don't disagree. Contributions to the documentation are very welcome.
>>>
>>> On Tuesday, May 4, 2021 at 9:46:02 PM UTC+2 jn.pierr...@gmail.com wrote:
>>>
 right. not very user friendly. could be noted earlier at ~

 the same for the others. when there is so much to read, being kind on 
 the reader is not undue.

 Le mardi 4 mai 2021 à 21:30:54 UTC+2, saq.i...@gmail.com a écrit :

> As the table indicates, :else is equivalent to the ~ filter run prefix 
> which is explained earlier in the same tiddler.
>
> On Tuesday, May 4, 2021 at 9:09:23 PM UTC+2 jn.pierr...@gmail.com 
> wrote:
>
>> In the "Filter Expression" tiddler the :enter prefix is not listed in 
>> the first part, only given in a subsequent table.
>>
>> As such, :else lacks a proper explanation of what it does.
>>
>

-- 
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/efeccf52-71fa-4a16-969a-4b48ada4929an%40googlegroups.com.


[tw5] Re: bug? getindex failing retrieve json with $:/temp/... named tiddlers

2021-05-05 Thread Jean-Pierre Rivière
further investigation has lead to finding the problem is not with the name.

My original tiddler was created by a filter + action widget process.

If I craft by hand a #:/temp/project tiddler with tho contents given and 
the json type, then there is no bug. This problem lays with the metadata of 
the offensive tiddler.

If I rename the offensive tiddler as "other" the problems remains. This is 
clearly not in the text or title that lays the problem.

I have not yet found the culprits.

I attached the json of a working tiddler and that of the failing tiddler in 
case someone else would like to see what's wrong.

Le mercredi 5 mai 2021 à 10:41:21 UTC+2, Jean-Pierre Rivière a écrit :

> Be a tiddler of json type whose content is
>
> { "pleiade": { "name": "Pléiade v2", "project": "pleiade", "url": "
> https://pleiade.test.acmeserver.com; } }
>
> and now put it in two tiddlers. one is "project" and the othes is 
> "$:/temp/project".
>
> create a tw5 tiddler with this code:
>
> $:/temp/project: {{{ [[$:/temp/project]getindex[/pleiade]] }}}
>
> project: {{{ [[project]getindex[/pleiade]] }}}
>
> and see its outupt:
> -
> $:/temp/project:
>
> project: { "name": "Pléiade v2", "project": "pleiade", "url": 
> "https://pleiade.test.acmeserver.com; }
>
> --
>
> The same void output happpens witg a name like "$:/temp/project".
>

-- 
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/8882a847-022f-4954-a470-ff88a87b3549n%40googlegroups.com.


_a_project.json
Description: application/json


_temp_project.json
Description: application/json


[tw5] bug? getindex failing retrieve json with $:/temp/... named tiddlers

2021-05-05 Thread Jean-Pierre Rivière
Be a tiddler of json type whose content is

{ "pleiade": { "name": "Pléiade v2", "project": "pleiade", "url": 
"https://pleiade.test.acmeserver.com; } }

and now put it in two tiddlers. one is "project" and the othes is 
"$:/temp/project".

create a tw5 tiddler with this code:

$:/temp/project: {{{ [[$:/temp/project]getindex[/pleiade]] }}}

project: {{{ [[project]getindex[/pleiade]] }}}

and see its outupt:
-
$:/temp/project:

project: { "name": "Pléiade v2", "project": "pleiade", "url": 
"https://pleiade.test.acmeserver.com; }

--

The same void output happpens witg a name like "$:/temp/project".

-- 
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/b9f7d660-fc3b-4898-ab77-6e614d9a360an%40googlegroups.com.


[tw5] Re: "Filter Expression" doc

2021-05-04 Thread Jean-Pierre Rivière
Fine. How may I help then? It's also that bit that I find lacking in the 
doc (just poke at it but got no interesting stuff for this).

Le mardi 4 mai 2021 à 21:59:46 UTC+2, saq.i...@gmail.com a écrit :

> I don't disagree. Contributions to the documentation are very welcome.
>
> On Tuesday, May 4, 2021 at 9:46:02 PM UTC+2 jn.pierr...@gmail.com wrote:
>
>> right. not very user friendly. could be noted earlier at ~
>>
>> the same for the others. when there is so much to read, being kind on the 
>> reader is not undue.
>>
>> Le mardi 4 mai 2021 à 21:30:54 UTC+2, saq.i...@gmail.com a écrit :
>>
>>> As the table indicates, :else is equivalent to the ~ filter run prefix 
>>> which is explained earlier in the same tiddler.
>>>
>>> On Tuesday, May 4, 2021 at 9:09:23 PM UTC+2 jn.pierr...@gmail.com wrote:
>>>
 In the "Filter Expression" tiddler the :enter prefix is not listed in 
 the first part, only given in a subsequent table.

 As such, :else lacks a proper explanation of what it does.

>>>

-- 
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/3f9535f6-738d-452b-b780-44a6abe8ae60n%40googlegroups.com.


[tw5] Re: "Filter Expression" doc

2021-05-04 Thread Jean-Pierre Rivière
right. not very user friendly. could be noted earlier at ~

the same for the others. when there is so much to read, being kind on the 
reader is not undue.

Le mardi 4 mai 2021 à 21:30:54 UTC+2, saq.i...@gmail.com a écrit :

> As the table indicates, :else is equivalent to the ~ filter run prefix 
> which is explained earlier in the same tiddler.
>
> On Tuesday, May 4, 2021 at 9:09:23 PM UTC+2 jn.pierr...@gmail.com wrote:
>
>> In the "Filter Expression" tiddler the :enter prefix is not listed in the 
>> first part, only given in a subsequent table.
>>
>> As such, :else lacks a proper explanation of what it does.
>>
>

-- 
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/587b747d-1109-400a-9fcd-ac7a8f5a5069n%40googlegroups.com.


[tw5] "Filter Expression" doc

2021-05-04 Thread Jean-Pierre Rivière
In the "Filter Expression" tiddler the :enter prefix is not listed in the 
first part, only given in a subsequent table.

As such, :else lacks a proper explanation of what it does.

-- 
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/b3894440-0af0-45ab-92ad-49bdf41cbb51n%40googlegroups.com.


[tw5] Re: improving smart resarch for in-situ macros for filter

2021-05-04 Thread Jean-Pierre Rivière

Saq, your example should be added to the "Filter Run Prefix (Examples)" 
tiddler of the doc.

Jeremy's is the best answer, but clearly both are convincing enough that 
the UI is about right today. And yes I was aware I could have a pablic 
macro help me, but that would not be very neat or a bit of hassle to setup 
and get rid of after use.
Le mardi 4 mai 2021 à 09:56:30 UTC+2, saq.i...@gmail.com a écrit :

> [all[tiddlers]] :filter[get[type]match[application/javascript]]
>
>
> On Tuesday, May 4, 2021 at 9:42:30 AM UTC+2 jn.pierr...@gmail.com wrote:
>
>> Today I wanted to see which tiddlers I have that are javascript.
>>
>> In advanced research i can execute something like
>>
>> [get[type]match[application/javascript]]
>>
>> but it would only bring "application/javascript"
>>
>> I can't have [filter[get[type]match[application/javascript]]]
>>
>> because this is gross syntax error.
>>
>> But if I had access to another input ext for a macro to be called extra I 
>> could do
>>
>> extra : [get[type]match[application/javascript]]
>> research : filtersortan[]
>>
>> and the job would be done.
>>
>> BTW, I think a standard "nop" macro doing nothing would be useful. I'm 
>> using it many times when I have to decide for an eventual treatment, for 
>> (actual real) instance:
>>
>> \define deleteProjectNewAltjson(target id)
>> <$action-log $$message="delete project «$target$##$id$»"/>
>> <$action-deletefield $tiddler="$target$" $field="$id$"/>
>> <$set name=next-step 
>> filter="[getindex]then[_kludge4deleteProjectNewAltjson]else[nop]]">
>> <>
>> 
>> <$action-log $$message="deleted project «$target$##$id$»"/>
>> \end
>>
>> (this concerns a potential bug for impossibility to delete a property of 
>> first level within a json object tiddler -- there is a separate thread I 
>> fielded yesterday for that)
>>
>> I have not seen any other way to have a conditional call to a macro.
>>
>> regards,
>>
>> -- 
>> Jean-Pierre
>>
>

-- 
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/2e7fc87c-f13b-4a6a-ae50-32104d810078n%40googlegroups.com.


[tw5] Re: action-delefield et json

2021-05-04 Thread Jean-Pierre Rivière
well, the current way of deljeting an index is not very satisfying from the 
readability point of view. so yes, an $action-deleteindex is as justified 
as $action-deletefield. and if not, then $action-deletefield should get an 
$index parameter.

BTW, I think it would be good to allow for a "getfield" homonym for "get" 
filter operator, for a naming consistency.

Le mardi 4 mai 2021 à 14:52:40 UTC+2, PMario a écrit :

> On Tuesday, May 4, 2021 at 2:02:06 PM UTC+2 jn.pierr...@gmail.com wrote:
> ...
>
>> and why is there not any $acion-deleteindex?
>>
>
> IMO because, if users know how to do it, they use the existing 
> functionality.
>
> -m
>

-- 
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/7edc52ef-e1fc-4ce3-a613-3631c1b73c69n%40googlegroups.com.


[tw5] Re: action-delefield et json

2021-05-04 Thread Jean-Pierre Rivière
Resolved my problem.

to delete a fied or an index, you can (and in json that's an index, so it's 
"you must") use $action/setfield without specifying any $value.

thus to get rid of "foo" in my previous example all I have to do is:

<$action-setfield $tiddler="data" $index="foo"/>

this possibility should be recalled in the doc of $action-deletefield.

and why is there not any $acion-deleteindex?

Le lundi 3 mai 2021 à 22:45:29 UTC+2, Jean-Pierre Rivière a écrit :

> I have  tiddler "data" of json data like 
>
> {
>   "foo": { ... },
>   "bar": { ... }
> }
>
> I want to get rid of "foo".
>
> so I have setup a $button where the action is
>
> <$action-deletefield $tiddler="data" $field="foo"/>
>
> the action does nothing (if I set an action-deletefield instead, it works 
> so the problem is just the deletefield widget).
>
> any idea?
>
>

-- 
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/9b08558c-6dff-4e7c-a6fc-25d0fa018a2an%40googlegroups.com.


[tw5] Re: [Discussion] Field Related or subFields

2021-05-04 Thread Jean-Pierre Rivière
oups. forgot that restriction. I mostly work with indexes (greater liberty 
for names)

what about main. and main._.sub ? ._. is seen nowhere else and is rather 
cute and evoke a SUBtil smile.

Le mardi 4 mai 2021 à 13:45:46 UTC+2, TW Tones a écrit :

> jean-Pierre
>
> Field Names are quite limited
>
> *TiddlerFields are name:value pairs that make up a [[tiddler|Tiddlers]]. 
> Field names must be lowercase letters, digits or the characters `-` (dash), 
> `_` (underscore) and `.` (period).*
> https://tiddlywiki.com/#TiddlerFields
>
> The .. considered as continuation actually works from my perspective eg 
> url.. is continued elsewhere in url..name.
>
> In answer to your question, yes they should be regular fields you can use 
> in every other way if possible. The question is what is the defacto 
> standard and how do we best implement support for such fields. Can we 
> provide a generic solution?
>
> Tones
>
>
> On Tuesday, 4 May 2021 at 20:26:30 UTC+10 jn.pierr...@gmail.com wrote:
>
>> ".." is commonly used in describing a continuation, for instance 3..7 is 
>> for 3, 4, 5, 6, 7.
>>
>> IMO the proposed use of .. is then counter-intuitive.
>>
>> I prefer a simple dot.
>>
>> We could use an arrow but -> is awkward in an html oriented language so 
>> it's a no-starter.
>>
>> We could use ^ but it may interfer in regexp. it would probably be no big 
>> deal though.
>>
>> We could have a mix. for instance:
>>
>> main field is "date."
>> sub-fields are "date.^value" or "date.^format" or "date.^units".
>>
>> the other way around:
>>
>> main field is "date^"
>> sub-fields are "date^.value" or "date^.format" or "date^.units".
>>
>> question: are sub-fields regular fields in the end, just being taken in 
>> charge by a set of ad-hoc macros and filters and templates? there would be 
>> a lot to tinker depending of the choces being made. or are sub-field a 
>> brand new mechanism of 1st-class core components?
>>
>> just suggestions...
>>
>> -- 
>> Jean-Pierre
>> Le mardi 4 mai 2021 à 11:32:04 UTC+2, PMario a écrit :
>>
>>> On Tuesday, May 4, 2021 at 11:27:49 AM UTC+2 PMario wrote:
>>>
>>> I still want to have  sec-expanded-years 
  as in 
 https://groups.google.com/g/tiddlywiki/c/YaFzHXfjnFc/m/jpQJrSi8BwAJ
 and: SI prefix multipliers 
 
  
 as in: 
 https://groups.google.com/g/tiddlywiki/c/YaFzHXfjnFc/m/l5S9-TnaBwAJ 
 from the same thread. 

>>>
>>> And I want, that TW-fields can handle this. eg: long-ago..from, 
>>> long-ago..to   
>>>
>>> just an idea ;)
>>> -mario
>>>
>>

-- 
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/87975951-64d7-4fa5-873d-e9d52b565ba6n%40googlegroups.com.


[tw5] Re: [Discussion] Field Related or subFields

2021-05-04 Thread Jean-Pierre Rivière
".." is commonly used in describing a continuation, for instance 3..7 is 
for 3, 4, 5, 6, 7.

IMO the proposed use of .. is then counter-intuitive.

I prefer a simple dot.

We could use an arrow but -> is awkward in an html oriented language so 
it's a no-starter.

We could use ^ but it may interfer in regexp. it would probably be no big 
deal though.

We could have a mix. for instance:

main field is "date."
sub-fields are "date.^value" or "date.^format" or "date.^units".

the other way around:

main field is "date^"
sub-fields are "date^.value" or "date^.format" or "date^.units".

question: are sub-fields regular fields in the end, just being taken in 
charge by a set of ad-hoc macros and filters and templates? there would be 
a lot to tinker depending of the choces being made. or are sub-field a 
brand new mechanism of 1st-class core components?

just suggestions...

-- 
Jean-Pierre
Le mardi 4 mai 2021 à 11:32:04 UTC+2, PMario a écrit :

> On Tuesday, May 4, 2021 at 11:27:49 AM UTC+2 PMario wrote:
>
> I still want to have  sec-expanded-years 
>>  as in 
>> https://groups.google.com/g/tiddlywiki/c/YaFzHXfjnFc/m/jpQJrSi8BwAJ
>> and: SI prefix multipliers 
>> 
>>  
>> as in: 
>> https://groups.google.com/g/tiddlywiki/c/YaFzHXfjnFc/m/l5S9-TnaBwAJ from 
>> the same thread. 
>>
>
> And I want, that TW-fields can handle this. eg: long-ago..from, 
> long-ago..to   
>
> just an idea ;)
> -mario
>

-- 
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/39d164b7-cbaa-418e-8987-959bee5c7c77n%40googlegroups.com.


[tw5] improving smart resarch for in-situ macros for filter

2021-05-04 Thread Jean-Pierre Rivière
Today I wanted to see which tiddlers I have that are javascript.

In advanced research i can execute something like

[get[type]match[application/javascript]]

but it would only bring "application/javascript"

I can't have [filter[get[type]match[application/javascript]]]

because this is gross syntax error.

But if I had access to another input ext for a macro to be called extra I 
could do

extra : [get[type]match[application/javascript]]
research : filtersortan[]

and the job would be done.

BTW, I think a standard "nop" macro doing nothing would be useful. I'm 
using it many times when I have to decide for an eventual treatment, for 
(actual real) instance:

\define deleteProjectNewAltjson(target id)
<$action-log $$message="delete project «$target$##$id$»"/>
<$action-deletefield $tiddler="$target$" $field="$id$"/>
<$set name=next-step 
filter="[getindex]then[_kludge4deleteProjectNewAltjson]else[nop]]">
<>

<$action-log $$message="deleted project «$target$##$id$»"/>
\end

(this concerns a potential bug for impossibility to delete a property of 
first level within a json object tiddler -- there is a separate thread I 
fielded yesterday for that)

I have not seen any other way to have a conditional call to a macro.

regards,

-- 
Jean-Pierre

-- 
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/a5a970de-75ce-427d-b655-62c8e27301e4n%40googlegroups.com.


[tw5] Re: [Discussion] Field Related or subFields

2021-05-04 Thread Jean-Pierre Rivière
A while back', I had a field having structured data like 
"Potter^14^sorcery" but it was up to my macros to handle them. Say that 
field was called "identity". If I understand your proposal correctly, under 
your scheme, it would be called "identity." and its 3 sub-fields known as 
"identity.name"', "identity.age" and identity.business". But how would they 
be stored? And retrived? Anything that could streamline the handling of 
such things would be cool.

I fail to see what you concretely wish to get.

It seems to me that these smart fields would lesser the need to have json 
data. Or maybe we could just have fields store json data and get methods 
for accessing json au part of the core? Thus, we would be able to handle 
them but also json in the text field, which is only a field like other.

regards,

-- 
Jean-Pierre
Le mardi 4 mai 2021 à 02:48:55 UTC+2, TW Tones a écrit :

> Charlie,
>
> Good idea. If I wanted to reduce the clashes I could use ".." unlike 
> double __ or -- .. is clearer. and the chance others are using ".." is 
> lower. then we can safely search for all "Related fields" ie; and field 
> name containing ".." eg discussion..name supports the field discussion with 
> a name. Disambiguation from other fields using _ - or . which are 
> permissible.
>
> Now I need to automate in some way the identification of related fields 
> and there use in code/wikitext.
>
> Tones
>
> On Tuesday, 4 May 2021 at 10:21:51 UTC+10 cj.v...@gmail.com wrote:
>
>> Underscores and dashes are pretty similar looking.  If that matters any 
>> (i.e. if you already use either one in field names), then how about a 
>> period?
>>
>> So "url.", looks nice to me.  Then you could have url.name, url.target, 
>> etc.
>>
>> That becomes just a matter of personal preference.  I think they are all 
>> fine for what you're thinking.
>>
>> On Monday, May 3, 2021 at 3:35:10 AM UTC-3 TW Tones wrote:
>>
>>> Folks,
>>>
>>> I have come across a "problem" for which I am investigating a solution, 
>>> and keen to hear any ideas. ultimately I hope this to provide a generic 
>>> solution for advanced field handling I would share back into the community.
>>>
>>> *Problem:*
>>>
>>> Consider we may like to have a field in one or more tiddlers to store a 
>>> url to an external resource for that tiddler.
>>>
>>> Field: url, Value: https://tiddlywiki.com/#cycle%20Operator
>>>
>>> The thing is what if we wanted to store a simplified name such as "Cycle 
>>> Operator" or a target for links such as _blank or "operators" there is no 
>>> where to specify the url/name and url/target. when we construct a link to 
>>> this URL it would be nice to find the name/target for this url 
>>> field/tiddler combination.
>>>
>>> In future I also want to have a discussion-link tiddler with matching 
>>> name and target, with even more similar fields.
>>>
>>> *Possible approach*
>>> We could use the "_" underscore to delimit such "subFields" and create 
>>> additional fieldnames such as url_name and url_target. Then when I have 
>>> code dealing with "url" it can look for fields beginning url_ to find its 
>>> "subfields". I wonder if this compromises the available fieldnames or 
>>> others plugins and solutions that make use of the "_" underscore more often 
>>> than I do?
>>>
>>> Perhaps such fields that may have subfields could end with "_" eg; 
>>> "url_" meaning subfields exist for this fieldname.
>>>
>>> *More complex systematic approach*
>>> I could store in a data tiddler (For each tiddler) these additional 
>>> subfields, or even in a new special text field inside each tiddler.
>>>
>>> *A not so desirable approach*
>>> Build all the handling to allow the url field (in this case) actually be 
>>> the full http link or html  tag. The problem being one may need to code 
>>> and decode the content of the url field for every add or change, also if 
>>> one had dozens of different link fields it could get messy.
>>>
>>> Your Thoughts?
>>> Tones
>>>
>>

-- 
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/d6e6c090-0e56-4367-beaa-e2d31c690df0n%40googlegroups.com.


[tw5] Re: action-delefield et json

2021-05-03 Thread Jean-Pierre Rivière
of course, I have installed json mangler and its necessary plugins as well. 
they work.

Le lundi 3 mai 2021 à 22:45:29 UTC+2, Jean-Pierre Rivière a écrit :

> I have  tiddler "data" of json data like 
>
> {
>   "foo": { ... },
>   "bar": { ... }
> }
>
> I want to get rid of "foo".
>
> so I have setup a $button where the action is
>
> <$action-deletefield $tiddler="data" $field="foo"/>
>
> the action does nothing (if I set an action-deletefield instead, it works 
> so the problem is just the deletefield widget).
>
> any idea?
>
>

-- 
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/4f74711d-8666-458d-8b08-2770ef64ccacn%40googlegroups.com.


[tw5] $action-create tiddler not overwriting tiddlers

2021-05-03 Thread Jean-Pierre Rivière
I have a tiddler $:/temp/project which exsts with its data, including some 
extra field.

I am asking a new $:/temp/project with less fields and do:

<$action-createtiddler $basetitle="$proto$" $overwrite=yes  fiel01=foo 
field02=bar/>

well' tge tiddler sill holds the old fields. the new fields are there with 
their new values.

have I set something wrong?

-- 
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/a23bbe2e-0ee1-4f5b-8359-b119c36585bdn%40googlegroups.com.


[tw5] action-delefield et json

2021-05-03 Thread Jean-Pierre Rivière
I have  tiddler "data" of json data like 

{
  "foo": { ... },
  "bar": { ... }
}

I want to get rid of "foo".

so I have setup a $button where the action is

<$action-deletefield $tiddler="data" $field="foo"/>

the action does nothing (if I set an action-deletefield instead, it works 
so the problem is just the deletefield widget).

any idea?

-- 
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/f0802b3e-0783-4320-8b3f-547b75a40558n%40googlegroups.com.


[tw5] Re: filter not called???

2021-04-30 Thread Jean-Pierre Rivière
This is a subtility that you inform me there. So good, let's go along the 
variable for filter way. The same passage has become:

<$vars xf="[indexingmatch]">
<$set name=x filter="[indexes[]addsuffix[/project]filter]">
x = <>



and now I have a red error message from the browser: unknown widget.

Well, this is enough, let's have a week-end indeed. Thank you for your 
patience Saq!


Le vendredi 30 avril 2021 à 21:01:30 UTC+2, saq.i...@gmail.com a écrit :

> Let's look at the highlighted portion of  
> [indexes[]addsuffix[/project]filter[indexingmatch]]
>
> The first and last square brackets in the highlighted text are for the 
> operand to the filter operator. The square brackets tells us that you are 
> passing a literal operand, not a text reference or a variable.
>
> The actual operand, i.e. the filter, that you pass to the filter operator 
> is therefore:
> indexingmatch
> This is not a valid filter, it is missing opening and closing square 
> brackets.
>
> A valid filter would look like [indexingmatch] and this would 
> need to be defined as a variable and then passed as an operand to the 
> filter operator because of the square brackets.
>
> Hope that helps. Have a nice weekend.
>
> Saq
>
> On Friday, April 30, 2021 at 8:21:19 PM UTC+2 jn.pierr...@gmail.com wrote:
>
>> I beg your pardon' Saq, but each of my filter were well written as far as 
>> I can see.
>>
>> quoting myself:
>>
>>
>>
 {{{
 [indexes[]addsuffix[/project]filter[indexingmatch]]
 }}}


>> and
>>  
>>
>>> <$set name=x 
 filter="[indexes[]addsuffix[/project]filter[indexingmatch]]">
 x = <>
 


>> and finally
>>  
>>
>>> <$set name=y 
 filter="[indexes[]addsuffix[/project]filter[match]]">
 y(<>) = «<>»
 


>> there is no square bracket within them. 
>>
>> In fact if I try these form of writing I get nothing but an ugly error 
>> message from the browser (internal javascript error : "TypeError: widget is 
>> undefined")
>>
>> <$vars ppp="[match]">
>> <$list variable=ref filter="[indexes[]addsuffix[/project]]">
>>   <$set name=chk filter="[getindexmatchthen]">
>> @<>@
>> <$set name=y filter="[indexes[]addsuffix[/project]filter]">
>> y(<>) = «<>»
>> 
>> 
>>
>> which is very puzzling too.
>>
>> I also tried the :filter[stuff here] syntax but it was not better either.
>>
>> -- 
>> Jean-Pierre
>>
>>

-- 
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/b1eb25d8-53e5-4edc-ae12-189971ad4c07n%40googlegroups.com.


[tw5] Re: filter not called???

2021-04-30 Thread Jean-Pierre Rivière
I beg your pardon' Saq, but each of my filter were well written as far as I 
can see.

quoting myself:



>> {{{
>> [indexes[]addsuffix[/project]filter[indexingmatch]]
>> }}}
>>
>>
and
 

> <$set name=x 
>> filter="[indexes[]addsuffix[/project]filter[indexingmatch]]">
>> x = <>
>> 
>>
>>
and finally
 

> <$set name=y 
>> filter="[indexes[]addsuffix[/project]filter[match]]">
>> y(<>) = «<>»
>> 
>>
>>
there is no square bracket within them. 

In fact if I try these form of writing I get nothing but an ugly error 
message from the browser (internal javascript error : "TypeError: widget is 
undefined")

<$vars ppp="[match]">
<$list variable=ref filter="[indexes[]addsuffix[/project]]">
  <$set name=chk filter="[getindexmatchthen]">
@<>@
<$set name=y filter="[indexes[]addsuffix[/project]filter]">
y(<>) = «<>»



which is very puzzling too.

I also tried the :filter[stuff here] syntax but it was not better either.

-- 
Jean-Pierre

-- 
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/a11b2d42-99c6-4eeb-b27d-a637b3d89193n%40googlegroups.com.


[tw5] filter not called???

2021-04-30 Thread Jean-Pierre Rivière
I have a json array of objets. the following code display something like 
"2/project" indicating that the name I am looking (variable "ref") for is 
at index 2.

<$list variable=ref filter="[indexes[]addsuffix[/project]]">
  <$set name=chk filter="[getindexmatchthen]">
<>
  


The following code just display the project value I want, but it has got it 
by inspecting the /project references.

{{{
[indexes[]addsuffix[/project]filter[indexingmatch]]
}}}

(I am not looking to use it as a {{{ filter }}}, this is just for testing.)

indexing is a filter operator of mine such that [a]indexing[b] is the same 
as [b]getindex[a]

(for instance, {{{ [indexes[]indexing }}} will display 
(individually) all the indexed objects of the  tiddler)

it's very useful, because I often build my index, but can't use it within 
my filter if it was not for this very operator! And remaining in the filter 
is a way to keep things simple (no need for boilerplate <$list>)

with this code so far so good, here is the next step: use the "filter" 
operator to select the good combination but instead display the reference 
like 2/project.

Here it is (the variable "pid" contains the project code name I am looking 
for):


<$set name=x 
filter="[indexes[]addsuffix[/project]filter[indexingmatch]]">
x = <>


but the result is

x = 0/project 1/project 2/project

"filter" has not selected anything.

I have developed a "dump" filter operator showing the titles waiting for 
the next operator in the javascript console. Nothing is shown there, 
indicating that the subfilter has never been called.

What's going on?

Just to be sure it's not something with my "indexing" operator, I have 
tested the following similar code (which would not do what I want but 
that's not the point here):

<$set name=y 
filter="[indexes[]addsuffix[/project]filter[match]]">
y(<>) = «<>»


the output is

y(2/project) = «0/project 1/project 2/project»

instead of

y(2/project) = «2/project»

So this is the very same thing which is happening.

-- 
Jean-Pierre


-- 
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/c8693d6f-52df-4719-aa67-61d9f57984edn%40googlegroups.com.


[tw5] json for single objects

2021-04-30 Thread Jean-Pierre Rivière
I have installed json mangler. very nice indeed.

but there's something I still fail to achieve with filter

Say my title within the filter is in fact a json object, having a "foo" 
field. I'm not able to access it with get or getindex. I'd like to do 
something like:

{{{ [[json-data]getindex[1]getindex[name]] }}}

just like I can do

{{{ [[json-data]getindex[1/name]] }}}

Because, sometimes, what I have is the json object, not the array of 
oblects. And then I'm stocked (and don't want to mess with regexp to get my 
data - I already have done that but that's too ugly).

Maybe the solution would be for json mangler to either allor for /name like 
:

{{{ [[json-data]getindex[1]getindex[/name]] }}}

or to have //also// a new filter operator getjson to have:

{{{ [[json-data]getindex[1]getjson[name]] }}}

but also

{{{ [[json-data]getjson[1/name]] }}}

which would be much better as far as I'm concerned.


-- 
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/d9a31d95-9b6e-47d7-9293-c70713a8fb6bn%40googlegroups.com.


Re: [tw5] Re: Default Tiddler Configuration

2021-04-30 Thread Jean-Pierre Rivière
Search for NewHere button. An old thread contains a lot of information for 
a similar quest.
Le vendredi 30 avril 2021 à 17:10:04 UTC+2, isd196...@gmail.com a écrit :

> Thanks Jean-Pierre, but I don't want to change the 
> standard functionality to do this, in fact I'd much rather edit the default 
> template that you mention, but I just don't know the name of it! Now if you 
> can tell me the name of that default template I might well have the 
> answer!  
>
> On Fri, 30 Apr 2021 at 10:14, Jean-Pierre Rivière  
> wrote:
>
>> I have a kind of a solution for journal tiddler. Journal because you can 
>> simply define default text for new journal. For common tiddlers, you'd have 
>> to mess with the default template.
>>
>> first, I define a macro called autotext. For instance:
>>
>> \define autotext(clever)
>> <$set name=hail value="Hi! I'n a new tiddler.
>>
>> !! $clever$
>> ">
>> <$action-setfield $field=text $value=<>/>
>> 
>> \end
>>
>> An then I add this as default text for new journal tiddler:
>>
>> << autotext "This is great!">>
>>
>> And when I create a new journal, it appears with the default text above. 
>> Just validate it. You see a "do it" button. Just click it. And presto! your 
>> text is now set as the hail variable was computed (along your need).
>>
>> The trick is to be in action mode to be able to change the fields of the 
>> tiddler. Which you are not when the initial text is inserted as this 
>> experiment do show you (although it could have been the case since in the 
>> creation of a new journal, you begin by clicking on a button).
>> Le jeudi 29 avril 2021 à 19:12:46 UTC+2, isd196...@gmail.com a écrit :
>>
>>> Hello.
>>>
>>> Thanks to posts in this group I have been able to create new buttons 
>>> that are used to create various custom Tiddlers. These are simple and work 
>>> very well, however I would like to take this one stage further.
>>>
>>> The vast majority of my new Tiddlers are created via standard square 
>>> bracket links in text that are added on the fly and then clicked to create 
>>> the new Tiddler.
>>>
>>> What I want is for those new Tiddlers that are created by clicking on 
>>> links in text, to be created with some text already in them. I'm not 
>>> worried about adding tags at this stage.
>>>
>>> Is there a system default Tiddler (or some other mechanism) that I can 
>>> edit or create so that ALL Tiddlers created when clicking on a text link 
>>> will have my default text in them?
>>>
>>> Many thanks for your time
>>>
>>> Jax
>>>
>>>
>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "TiddlyWiki" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/tiddlywiki/tf-7T3zxEo0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> tiddlywiki+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/5c301311-9a8d-4ba7-be08-7cabce896fecn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/5c301311-9a8d-4ba7-be08-7cabce896fecn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/9f53952d-5ab2-42a2-9531-8081270fec3en%40googlegroups.com.


[tw5] Re: split agglomerates

2021-04-30 Thread Jean-Pierre Rivière
Thank you. The doc, at subfilter, does clearly states what filter does. 

The examples fail to make clear of this distinction for subfilter. In fact, 
they are rather not too much helping.

The first one is 

[subfilter[one two three]addsuffix[!]]

producing 

   - one!  
   - two!  
   - three!  


and we can achieve the very same results with

[enlist[one two three]addsuffix[!]]

This is not very demonstrative.

I suggest these ones:

\define two-wanted() [compare:string:eq[two]addsuffix[*]]

<<.operator-example 1 "[subfilter[one two three]addsuffix[!]]">>
<<.operator-example 1.1 "[enlist[one two three]addsuffix[!]]">>
<<.operator-example 1.2 "[enlist[one two three]subfilter]">>
<<.operator-example 1.3 "[enlist[one two 
three]compare:string:eq[two]addsuffix[*]]">>
<<.operator-example 1.4 "[enlist[one two three]filter]">>

showing that subfilter, finally, is just a nice way to put a name on a 
sequence of filter operations, for better clarity. 1.2 and 1.3 have the 
same output: "two*" whereas that of 1.4 is "two"k

In general, the operator of similar effect would gain from comparison like 
such.


Le vendredi 30 avril 2021 à 11:59:38 UTC+2, saq.i...@gmail.com a écrit :

> Sortsub applies a filter in turn to each input title separately. The docs 
> do mention this I believe. So the input to the filter each time is a single 
> title.
>
> Subfilter applies a filter once with the input being a title list of all 
> input titles.
>
> On Friday, April 30, 2021 at 10:53:52 AM UTC+2 jn.pierr...@gmail.com 
> wrote:
>
>> Nestling, in such a way anyway, is something I had not thought about.
>>
>> In fact, this is only a part of the pipeline. Can I get back a united 
>> output afterwards? I'll experiment and if I'm at loss, I'll post again.
>>
>> A question remains for me: Why is "split + last" apparently working on so 
>> different data when called by sortsub or subfilter? Aren't they just 
>> calling a filter? What is causing the diffirence? I think it would be wise 
>> and good for me to understand what cause the difference in behavior of such 
>> similar patterns.
>>
>> regards,
>>
>> -- 
>> Jean-Pierre
>> Le vendredi 30 avril 2021 à 07:15:37 UTC+2, TW Tones a écrit :
>>
>>> Jean-Pierre;
>>>
>>> I am not sure about your requirement, but try these
>>>
>>> <$list filter="[enlist[a1^a2 b1^b2 c1^c2]]">
>>>{{{ [split[^]first[]] }}}
>>> 
>>> 
>>> <$list filter="[enlist[a1^a2 b1^b2 c1^c2]]">
>>><$list filter="[split[^]first[]]">
>>>
>>>
>>> 
>>> 
>>> <$list filter="[enlist[a1^a2 b1^b2 c1^c3]split[^]]">
>>>
>>> 
>>> 
>>> <$list filter="[[a1^a2 b1^b2 c1^c3]split[ ]split[^]]">
>>>
>>> 
>>>
>>> I was recently considering a similar problem, when someone was 
>>> questioning nesting list widgets, when I realised the $list with filters 
>>> can act as gosub, while, do until etc... so nesting them is by definition 
>>> sometimes a logical requirement depending what you are trying to achieve 
>>> with your filters. Nesting is not easy or possible in many cases with 
>>> triple curly braces.
>>>
>>> Regards
>>> Tones
>>>
>>> On Friday, 30 April 2021 at 07:15:04 UTC+10 jn.pierr...@gmail.com wrote:
>>>
 Toying with filters, I discovered that the split operator agglomerates 
 its results when ist operates on successive titles.

 for instance : {{{ [enlist[a1^a2 b1^b2 c1^c2]split[^][]first[]] }}}
 results in a1 not in a1, b1, c1

 a sufilter dos not change anything:

 <$vars sf="[split[^]dump[]first[]]">
 {{{ [enlist[a1^a2 b1^b2 c1^c2]subfilter] }}}
 

 In fact, in each case, after split, the filter values are a1, a2, b1, 
 b2, c1, c2.

 could there be a way to have [a1, a2], [b1, b2], [c1, c2] 
 from enlist[a1^a2 b1^b2 c1^c2] ?

 let's use sortsub and a little input set to see that what I am asking 
 for may not be that impossible.

 <$vars sf="[split[^]dump[]last[]]">
 {{{ [enlist[a1^22 b1^28 c1^14]sortsub] }}}
 

 reults in c1^14, a1^22, b1^28

 which demonstrate that here split produces things like c1, 14 on which 
 split act upon. exactly what I wanted to achieve with subfilter.

 -- 
 Jean-Pierre



-- 
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/395d8ee0-b056-4c48-b682-6d371bd9d34en%40googlegroups.com.


[tw5] Re: Default Tiddler Configuration

2021-04-30 Thread Jean-Pierre Rivière
I have a kind of a solution for journal tiddler. Journal because you can 
simply define default text for new journal. For common tiddlers, you'd have 
to mess with the default template.

first, I define a macro called autotext. For instance:

\define autotext(clever)
<$set name=hail value="Hi! I'n a new tiddler.

!! $clever$
">
<$action-setfield $field=text $value=<>/>

\end

An then I add this as default text for new journal tiddler:

<< autotext "This is great!">>

And when I create a new journal, it appears with the default text above. 
Just validate it. You see a "do it" button. Just click it. And presto! your 
text is now set as the hail variable was computed (along your need).

The trick is to be in action mode to be able to change the fields of the 
tiddler. Which you are not when the initial text is inserted as this 
experiment do show you (although it could have been the case since in the 
creation of a new journal, you begin by clicking on a button).
Le jeudi 29 avril 2021 à 19:12:46 UTC+2, isd196...@gmail.com a écrit :

> Hello.
>
> Thanks to posts in this group I have been able to create new buttons that 
> are used to create various custom Tiddlers. These are simple and work very 
> well, however I would like to take this one stage further.
>
> The vast majority of my new Tiddlers are created via standard square 
> bracket links in text that are added on the fly and then clicked to create 
> the new Tiddler.
>
> What I want is for those new Tiddlers that are created by clicking on 
> links in text, to be created with some text already in them. I'm not 
> worried about adding tags at this stage.
>
> Is there a system default Tiddler (or some other mechanism) that I can 
> edit or create so that ALL Tiddlers created when clicking on a text link 
> will have my default text in them?
>
> Many thanks for your time
>
> Jax
>
>
>

-- 
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/5c301311-9a8d-4ba7-be08-7cabce896fecn%40googlegroups.com.


[tw5] Re: split agglomerates

2021-04-30 Thread Jean-Pierre Rivière
Nestling, in such a way anyway, is something I had not thought about.

In fact, this is only a part of the pipeline. Can I get back a united 
output afterwards? I'll experiment and if I'm at loss, I'll post again.

A question remains for me: Why is "split + last" apparently working on so 
different data when called by sortsub or subfilter? Aren't they just 
calling a filter? What is causing the diffirence? I think it would be wise 
and good for me to understand what cause the difference in behavior of such 
similar patterns.

regards,

-- 
Jean-Pierre
Le vendredi 30 avril 2021 à 07:15:37 UTC+2, TW Tones a écrit :

> Jean-Pierre;
>
> I am not sure about your requirement, but try these
>
> <$list filter="[enlist[a1^a2 b1^b2 c1^c2]]">
>{{{ [split[^]first[]] }}}
> 
> 
> <$list filter="[enlist[a1^a2 b1^b2 c1^c2]]">
><$list filter="[split[^]first[]]">
>
>
> 
> 
> <$list filter="[enlist[a1^a2 b1^b2 c1^c3]split[^]]">
>
> 
> 
> <$list filter="[[a1^a2 b1^b2 c1^c3]split[ ]split[^]]">
>
> 
>
> I was recently considering a similar problem, when someone was questioning 
> nesting list widgets, when I realised the $list with filters can act as 
> gosub, while, do until etc... so nesting them is by definition sometimes a 
> logical requirement depending what you are trying to achieve with your 
> filters. Nesting is not easy or possible in many cases with triple curly 
> braces.
>
> Regards
> Tones
>
> On Friday, 30 April 2021 at 07:15:04 UTC+10 jn.pierr...@gmail.com wrote:
>
>> Toying with filters, I discovered that the split operator agglomerates 
>> its results when ist operates on successive titles.
>>
>> for instance : {{{ [enlist[a1^a2 b1^b2 c1^c2]split[^][]first[]] }}}
>> results in a1 not in a1, b1, c1
>>
>> a sufilter dos not change anything:
>>
>> <$vars sf="[split[^]dump[]first[]]">
>> {{{ [enlist[a1^a2 b1^b2 c1^c2]subfilter] }}}
>> 
>>
>> In fact, in each case, after split, the filter values are a1, a2, b1, b2, 
>> c1, c2.
>>
>> could there be a way to have [a1, a2], [b1, b2], [c1, c2] 
>> from enlist[a1^a2 b1^b2 c1^c2] ?
>>
>> let's use sortsub and a little input set to see that what I am asking for 
>> may not be that impossible.
>>
>> <$vars sf="[split[^]dump[]last[]]">
>> {{{ [enlist[a1^22 b1^28 c1^14]sortsub] }}}
>> 
>>
>> reults in c1^14, a1^22, b1^28
>>
>> which demonstrate that here split produces things like c1, 14 on which 
>> split act upon. exactly what I wanted to achieve with subfilter.
>>
>> -- 
>> Jean-Pierre
>>
>>

-- 
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/6e757ebd-4513-4dbd-849c-b314d54f7cfen%40googlegroups.com.


[tw5] Re: split agglomerates

2021-04-30 Thread Jean-Pierre Rivière
Thank you Mark! This is a clever trick. Definitely worth remembering.

Le jeudi 29 avril 2021 à 23:51:53 UTC+2, Mark S. a écrit :

> It's often the case that we need two nested listwidgets to break down the 
> results the way we want. In your example, everything is split by ^, but 
> then it picks the first item from the resulting list (a1).  You could 
> instead split by space, send the result to an inner loop, and then split by 
> ^ .
>
> But in this case, you could use splitregexp :
>
> {{{ [enlist[a1^a2 b1^b2 c1^c2]splitregexp[\^\w\w]] }}}
>
> a1,  b1, c1
>
> On Thursday, April 29, 2021 at 2:15:04 PM UTC-7 jn.pierr...@gmail.com 
> wrote:
>
>> Toying with filters, I discovered that the split operator agglomerates 
>> its results when ist operates on successive titles.
>>
>> for instance : {{{ [enlist[a1^a2 b1^b2 c1^c2]split[^][]first[]] }}}
>> results in a1 not in a1, b1, c1
>>
>> a sufilter dos not change anything:
>>
>> <$vars sf="[split[^]dump[]first[]]">
>> {{{ [enlist[a1^a2 b1^b2 c1^c2]subfilter] }}}
>> 
>>
>> In fact, in each case, after split, the filter values are a1, a2, b1, b2, 
>> c1, c2.
>>
>> could there be a way to have [a1, a2], [b1, b2], [c1, c2] 
>> from enlist[a1^a2 b1^b2 c1^c2] ?
>>
>> let's use sortsub and a little input set to see that what I am asking for 
>> may not be that impossible.
>>
>> <$vars sf="[split[^]dump[]last[]]">
>> {{{ [enlist[a1^22 b1^28 c1^14]sortsub] }}}
>> 
>>
>> reults in c1^14, a1^22, b1^28
>>
>> which demonstrate that here split produces things like c1, 14 on which 
>> split act upon. exactly what I wanted to achieve with subfilter.
>>
>> -- 
>> Jean-Pierre
>>
>>

-- 
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/eb956ad4-d0ae-4274-872e-772da48aa4c9n%40googlegroups.com.


[tw5] split agglomerates

2021-04-29 Thread Jean-Pierre Rivière
Toying with filters, I discovered that the split operator agglomerates its 
results when ist operates on successive titles.

for instance : {{{ [enlist[a1^a2 b1^b2 c1^c2]split[^][]first[]] }}}
results in a1 not in a1, b1, c1

a sufilter dos not change anything:

<$vars sf="[split[^]dump[]first[]]">
{{{ [enlist[a1^a2 b1^b2 c1^c2]subfilter] }}}


In fact, in each case, after split, the filter values are a1, a2, b1, b2, 
c1, c2.

could there be a way to have [a1, a2], [b1, b2], [c1, c2] from enlist[a1^a2 
b1^b2 c1^c2] ?

let's use sortsub and a little input set to see that what I am asking for 
may not be that impossible.

<$vars sf="[split[^]dump[]last[]]">
{{{ [enlist[a1^22 b1^28 c1^14]sortsub] }}}


reults in c1^14, a1^22, b1^28

which demonstrate that here split produces things like c1, 14 on which 
split act upon. exactly what I wanted to achieve with subfilter.

-- 
Jean-Pierre

-- 
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/a38fca8e-e3ac-4540-b3fe-32a478273711n%40googlegroups.com.


[tw5] Re: subfilter within filter, subfilter end sortsub

2021-04-29 Thread Jean-Pierre Rivière
I have developed a dumping filter operator to check what is the tubes 
inside a filter.

This has shown me that I was just wrong about what the operators were doing.

So, I'm killing this thread here. Don't bother about it!

Le jeudi 29 avril 2021 à 13:25:39 UTC+2, Jean-Pierre Rivière a écrit :

> I have some problem with subfilters. I will directly give a simple context 
> where my problem arise.
>
> I have dictionary tiddler named "dico" with 3 indexed value:
> a: a1^bazaar
> b: b1^advance
> c: c1^alert
>
> now comes a testing code within another tiddler:
> =
> <$vars partafter="[indexing[dico]split[^]last[]]"
> es="[indexing[dico]split[^]search[e]]"
> nocs="[indexing[dico]split[^]!search[c]]"
> effect="[indexing[dico]]"
> >
>
> for the effect of indexing:
>
> * single value : {{{ [[a]indexing[dico]] }}}
> * list of values: <$list 
> filter="[[dico]indexes[]subfilteraddprefix[ * ]]"/>
>
> first task: getting the indexes listed according to the part after "^". 
> (b,c,a wanted)
>
> <$list filter="[[dico]indexes[]sortsub]"/>
>
> second task: get rid of indexes whose part after the "^" contains any "e" 
> (b,c wanted)
>
> <$list filter="[[dico]indexes[]filter]"/>
>
> third task: get rid of indexes whose part after the "^" doesn't contain 
> any "c" (a,c wanted)
>
> <$list filter="[[dico]indexes[]filter]"/>
>
> fourth task: just display the part after the "^" for each entry : 
> (bazaar,advance,alert wanted)
>
> <$list filter="[[dico]indexes[]subfilter]"/>
>
> 
> =
>
> I have included the json export of my indexing.js tiddelr providing thi 
> "indexing" filter (which is a must-have for me).
>
> to sum up: sortsub works as you understand it should.
>
> filter seems problematic with regards to the third objective going wrong. 
> is that an effect of negation?
>
> subfilter seems broken as the "last" filter op operate on the whole not on 
> every sequences.
>
> So my question is: what are my errors? what did I do wrong?
>
> TIA!
>
> -- 
> Jean-Pierre
>

-- 
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/2e08fe7e-13c5-4d0f-9266-4072ed147a96n%40googlegroups.com.


Re: [tw5] Re: The best practice for newline char in Tiddlywiki filter

2021-04-29 Thread Jean-Pierre Rivière
Mohammad: I am speaking of really very old MacOS from circa 1990.

Mac from BSD era on are decent OS with \n end-of-lines as all unixes.

Le jeudi 29 avril 2021 à 15:16:33 UTC+2, Mohammad a écrit :

> Thank you all for your reply!
>
> @PMario 
> I actually want to use the filter in real cases! Text is created in 
> Tiddlywiki itself or important from the net. For example Fortran code 
> downloaded from the net and imported into the wiki!
> Most of these I think were created in the Unix system! So I like to make 
> sure the filter works in all cases.
>
> @Jean-Pierre
> Thank for the suggestion! I will test it! I do not have a Mac computer but 
> I think I should download text files created in Mac or use Notepad++ to use 
> such newline chars.
>
>
>
> Best wishes
> Mohammad
>
>
> On Thu, Apr 29, 2021 at 4:38 PM Jean-Pierre Rivière  
> wrote:
>
>> just to be pedantic, but in old Mac'OS the end of line was only \r. so 
>> your code would not work there
>>
>> $list filter="[splitregexp[(\r?\n|\r)]"
>>
>> will do that (not tested yet). we obviously cannot use [\r?\n?]
>>
>>
>> Le jeudi 29 avril 2021 à 13:48:01 UTC+2, PMario a écrit :
>>
>>> On Thursday, April 29, 2021 at 12:26:23 PM UTC+2 Mohammad wrote:
>>>
>>>> It is known that the newline character is different for different OS 
>>>> (see Wikipedia <https://en.wikipedia.org/wiki/Newline>). I am not sure 
>>>> if this is also true for the browsers or not!
>>>>
>>>
>>> 1) If you save a multiline tiddler in TW to the internal store `\n` will 
>>> be used.
>>> 2) If you copy paste content from a file to TW it will use \n
>>>
>>> 3) If you import eg: test.txt from windows there will be "\r\n" in the 
>>> tiddler. 
>>> The next time you edit the tiddler and save there will be  "\n" only. 
>>>
>>>  
>>>
>>>> Having that said, what is the best practice to treat a newline 
>>>> character in a Tiddlywiki filter to work everywhere!
>>>>
>>>> *Case i*
>>>>
>>>> <$list filter="[splitregexp[\n]]" ...
>>>>
>>>
>>> So for case 3 it will look like, if it works, but it will keep the \r in 
>>> memory. 
>>> If you want to remove it use: 
>>>
>>> <$list filter="[splitregexp[\r?\n]]" ... this will always work 
>>> for all OSes. 
>>>
>>> \r? .. means check for \r  optional ... only if it exists 
>>>
>>>  
>>>
>>>> *Case ii*
>>>> <$vars newline="
>>>> " >
>>>> <$list filter="[splitregexp]" ...
>>>>
>>>
>>> hmm. This won't help since internally we only use \n
>>>
>>> hope that helps
>>> mario
>>>
>>>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/2ea136f8-0151-48dc-bf9a-f4a75b7865d4n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/2ea136f8-0151-48dc-bf9a-f4a75b7865d4n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/5ed0e0a6-2ea2-45dc-847f-3372e83ce243n%40googlegroups.com.


[tw5] Re: The best practice for newline char in Tiddlywiki filter

2021-04-29 Thread Jean-Pierre Rivière
just to be pedantic, but in old Mac'OS the end of line was only \r. so your 
code would not work there

$list filter="[splitregexp[(\r?\n|\r)]"

will do that (not tested yet). we obviously cannot use [\r?\n?]


Le jeudi 29 avril 2021 à 13:48:01 UTC+2, PMario a écrit :

> On Thursday, April 29, 2021 at 12:26:23 PM UTC+2 Mohammad wrote:
>
>> It is known that the newline character is different for different OS (see 
>> Wikipedia ). I am not sure if 
>> this is also true for the browsers or not!
>>
>
> 1) If you save a multiline tiddler in TW to the internal store `\n` will 
> be used.
> 2) If you copy paste content from a file to TW it will use \n
>
> 3) If you import eg: test.txt from windows there will be "\r\n" in the 
> tiddler. 
> The next time you edit the tiddler and save there will be  "\n" only. 
>
>  
>
>> Having that said, what is the best practice to treat a newline character 
>> in a Tiddlywiki filter to work everywhere!
>>
>> *Case i*
>>
>> <$list filter="[splitregexp[\n]]" ...
>>
>
> So for case 3 it will look like, if it works, but it will keep the \r in 
> memory. 
> If you want to remove it use: 
>
> <$list filter="[splitregexp[\r?\n]]" ... this will always work 
> for all OSes. 
>
> \r? .. means check for \r  optional ... only if it exists 
>
>  
>
>> *Case ii*
>> <$vars newline="
>> " >
>> <$list filter="[splitregexp]" ...
>>
>
> hmm. This won't help since internally we only use \n
>
> hope that helps
> mario
>
>>

-- 
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/2ea136f8-0151-48dc-bf9a-f4a75b7865d4n%40googlegroups.com.


[tw5] Re: json access when not in action mode?

2021-04-29 Thread Jean-Pierre Rivière

I had already looked at it... It doesn't help me so much as I wished.

Just take at example. one of the first interesting see we can see on the 
default tiddler is tsort. Not much told' no link provided. So I type 
"tsort" in the search query, and can have to 3 tiddlers incorporating tsort 
in their names. The examples provided don't tell much, and not any 
indication of the purpose.

I would gladly like to help make for a better documentation if you agree... 
This is time consuming, but this would reduce my own time trying to figure 
out things (or giving up altogether and being back to nowhere).

cheers.

-- 
Jean-Pierre
Le jeudi 29 avril 2021 à 00:44:00 UTC+2, joshua@gmail.com a écrit :

> Yes. This is exactly why I wrote JsonMangler (the "Manger" part came from 
> one of the core features that has been downplayed, the ability to compress 
> multi-level Json into a 1 level deep object with "path":"value" pairs. The 
> path syntax is "/" to be consistent with the "system tiddler" naming 
> convention in TW.
>
> The current demo wiki/docs are located here: 
> https://chronicles.wiki/TW5-JsonMangler/
>
> You can use "index-path syntax" in any existing filter or widget. (Note: 
> Stable on 5.1.23, I have not tested against the recent pre-release).
>
> Mahalo (thanks) for trying my plugin!
>
> Best,
> Joshua Fontany
> On Wednesday, April 28, 2021 at 8:42:01 AM UTC-7 Mark S. wrote:
>
>> <$list filter="[[mydata]getindex[0/age]]"/>
>>
>> (assuming JSON mangler)
>>
>> On Wednesday, April 28, 2021 at 8:02:14 AM UTC-7 jn.pierr...@gmail.com 
>> wrote:
>>
>>> How can I access json data in a smart way when my code is not in the 
>>> context of a button-started action (which I call action mode)?
>>>
>>> say this simple text of my "data" tiddler:
>>> -
>>> [
>>>   { "captain": "Hook", "age": "42" },
>>>   { "captain": "Planet", "age": "37" }
>>> ]
>>>
>>> the indexes filter returns 0 and 1.
>>>
>>> with get[0] I would get { "captain": "Hook", "age": "42" }
>>>
>>> I can't get[0/name] to get "Hook".
>>>
>>> IS there a plugin or any other mean to get:
>>> - the names of the fileds within any json objects?
>>> - getting any values from json with a syntax like that I give, or even a 
>>> more ambitious xpath query?
>>>
>>> I have installed json mangler. but I have no docs about it, not even 
>>> knowing what it really does besides providing a bar for json tiddlers?
>>>
>>> regards.
>>>
>>> -- 
>>> Jean-Pierre
>>>
>>

-- 
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/6603b10a-6b5f-4d9f-a3e0-0b7112dd213an%40googlegroups.com.


Re: [tw5] html id and transclusion

2021-04-29 Thread Jean-Pierre Rivière

Since Dragon is now owned by Microsoft which has dumped IE for edge, maybe 
one of these days Dragon will understand the nested construct. Maybe... 
this discussion was from 2019 when Microsoft was already the new owner of 
Dragon.

Waiting can be the best solution for us. :-)

as for your counsel about looking for "looking at the infrastructure we 
have for dealing with qualified state tiddler titles", can you be a little 
bit more specific please? It's not evident to see what you mean.

Le jeudi 29 avril 2021 à 09:19:03 UTC+2, jeremy...@gmail.com a écrit :

> Last night I came across a post that explains the history of the situation:
>
>
> https://adrianroselli.com/2020/01/my-priority-of-methods-for-labeling-a-control.html
>
> Thus, if I'm understanding correctly, the WCAG standard requires the "for" 
> attribute because neither Internet Explorer 11 nor Dragon Dictate supports 
> nested labels. That makes a lot of sense.
>
> Best wishes
>
> Jeremy
>
> --
> Jeremy Ruston
> jer...@jermolene.com
> https://jermolene.com
>
> On 28 Apr 2021, at 20:09, Jeremy Ruston  wrote:
>
> Hi Jean-Pierre
>
>
> I think you’re asking why the IDs can’t be handled automatically, without 
> the author having to worry about them. I think that that may be possible in 
> simple cases, but not in general. Typically one needs the same ID in 
> multiple places, which won’t happen just by using the qualify macro. It’s 
> only the simple cases where the two elements are adjacent within the same 
> transclusion that one can get away with using the qualify macro without 
> needing to think about what is actually going on.
>
> So, to summarise:
>
> * Yes, we can use IDs in TiddlyWiki, and we have extensive infrastructure 
> that can be used to simplify the job, but using those features requires an 
> understanding of what is going on. One may be able to package simple cases 
> like a label/input pair into a reusable macro, but it’s not possible to 
> encapsulate the complexity in general
> * If you want to explore using IDs, it would be worth looking at the 
> infrastructure we have for dealing with qualified state tiddler titles
>
> Meanwhile, the frustrating thing remains that all of this is only 
> necessary because the WCAG spec ignores the underlying HTML spec (and the 
> implementations of browsers and screen readers).
>
> Best wishes
>
> Jeremy.
>
>
>
> On 28 Apr 2021, at 19:50, Jean-Pierre Rivière  
> wrote:
>
> >>This is the label
> >/>
>
> This is hand-made html code. how would I be able to get the input behave 
> in tiddlywiki as if it was done by the button widget?
>
> could a pragma like \useIdInButtons be used to allow a code like <$button 
> actions=<> id=auto/> which would construct an input with an 
> id=<>? No other value than "auto" would be allowed for "id", 
> making uniformed use of it fail and force coders to look at the doc?
>
> Le mercredi 28 avril 2021 à 17:34:14 UTC+2, jeremy...@gmail.com a écrit :
>
>> Hi Jean-Pierre
>>
>> On 28 Apr 2021, at 15:48, Jean-Pierre Rivière  
>> wrote:
>>
>> Thank you for the clarification. I understand your point of view.
>>
>> Now if I want to have a go at it, for instance so that my input buttons 
>> can get an id from a parameter, how should I proceed? From where should I 
>> start? I'm sure this is not trivial but I'm eager to try.
>>
>>
>> It’s essentially the same problem as we encounter when generating unique 
>> state tiddler titles. Thus you could use the <> macro like so:
>>
>> >>This is the label
>> >/>
>>
>> The qualify macro returns its argument with a string of numbers appended 
>> that is derived from the ancestor transclusions, making an ID that will be 
>> unique within a transclusion.
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>> regards.
>>
>> Le mercredi 28 avril 2021 à 12:32:33 UTC+2, jeremy...@gmail.com a écrit :
>>
>>> In a recent thread, Jeremy told me that having id elements is a bit of 
>>> a problem because each tiddler can be transcluded more than once into any 
>>> given tiddler' which would result into a broken html with a repeated id 
>>> value.
>>>
>>>
>>> This is true.
>>>
>>> But if id are required, shouldn't it be up to the programmer to make 
>>> sure there is no problem? Of course, the doc would tell that specifying id 
>>> is a tricky things to be done with great precaution. But this is IMHO 
>>> better that forbidding id specification altogether.
>>>
>>&g

Re: [tw5] html id and transclusion

2021-04-28 Thread Jean-Pierre Rivière
>>This is the label
>/>

This is hand-made html code. how would I be able to get the input behave in 
tiddlywiki as if it was done by the button widget?

could a pragma like \useIdInButtons be used to allow a code like <$button 
actions=<> id=auto/> which would construct an input with an 
id=<>? No other value than "auto" would be allowed for "id", 
making uniformed use of it fail and force coders to look at the doc?

Le mercredi 28 avril 2021 à 17:34:14 UTC+2, jeremy...@gmail.com a écrit :

> Hi Jean-Pierre
>
> On 28 Apr 2021, at 15:48, Jean-Pierre Rivière  
> wrote:
>
> Thank you for the clarification. I understand your point of view.
>
> Now if I want to have a go at it, for instance so that my input buttons 
> can get an id from a parameter, how should I proceed? From where should I 
> start? I'm sure this is not trivial but I'm eager to try.
>
>
> It’s essentially the same problem as we encounter when generating unique 
> state tiddler titles. Thus you could use the <> macro like so:
>
> >>This is the label
> >/>
>
> The qualify macro returns its argument with a string of numbers appended 
> that is derived from the ancestor transclusions, making an ID that will be 
> unique within a transclusion.
>
> Best wishes
>
> Jeremy
>
>
> regards.
>
> Le mercredi 28 avril 2021 à 12:32:33 UTC+2, jeremy...@gmail.com a écrit :
>
>> In a recent thread, Jeremy told me that having id elements is a bit of a 
>> problem because each tiddler can be transcluded more than once into any 
>> given tiddler' which would result into a broken html with a repeated id 
>> value.
>>
>>
>> This is true.
>>
>> But if id are required, shouldn't it be up to the programmer to make sure 
>> there is no problem? Of course, the doc would tell that specifying id is a 
>> tricky things to be done with great precaution. But this is IMHO better 
>> that forbidding id specification altogether.
>>
>> As was the exposed, this has to do with WCAG requirements ignoring the 
>> CORRECT HTML (stated as accessible on official docs) 
>>  are requiring  as 
>> the only validating way of accessible code. (with some variations for 
>> WAI-ARIA)
>>
>>
>> Just to be clear, the core doesn't forbid using "id" attributes, it's 
>> perfectly possible to use them as long as care is taken. The thing that's 
>> particularly hard is to use IDs within a reusable component without the 
>> user of that component being aware of the mechanism. So, the core avoids 
>> the complexity of these techniques.
>>
>> Best wishes
>>
>> Jeremy.
>>
>>
>>
>>
>>
>> -- 
>> Jean-Pierre
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/d739e00f-ba01-4425-b0d0-9730d6524986n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/d739e00f-ba01-4425-b0d0-9730d6524986n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>>
> -- 
> 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+...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/0805f885-ed1b-441a-9552-50758afe0b1fn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/0805f885-ed1b-441a-9552-50758afe0b1fn%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>
>

-- 
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/4531f079-cb8d-40e3-a7a3-7817cb5568a3n%40googlegroups.com.


Re: [tw5] Re: alphanumerical sort for sortsub

2021-04-28 Thread Jean-Pierre Rivière
Thank you for the nsort tip. but it's not what I wanted here: it puts 
beta12 between beta1 and beta3.

Le mercredi 28 avril 2021 à 18:55:12 UTC+2, taale...@gmail.com a écrit :

> Ack!! 
>
> nsort, not north
>
> On Wed., Apr. 28, 2021, 9:05 a.m. Jean-Pierre Rivière, <
> jn.pierr...@gmail.com> wrote:
>
>> very fine!!! eager to see what other functionality will be given too.
>>
>> Le mercredi 28 avril 2021 à 17:02:12 UTC+2, saq.i...@gmail.com a écrit :
>>
>>> I have a PR almost ready that includes this as well as other sorting 
>>> functionality.
>>>
>>>
>>> On Wednesday, April 28, 2021 at 4:54:02 PM UTC+2 jn.pierr...@gmail.com 
>>> wrote:
>>>
>>>> I've just taken the time to understand how to use sortsub. I should 
>>>> have done it before, et really does what I was trying to get with a lot of 
>>>> efforts and far too much code!
>>>>
>>>> But there's a kind of  sort that sortsub lack, which is alphanumeric. 
>>>> Just like there is sortan and sort filter.
>>>>
>>>> If my sortsub subfilter reference technical names like foo123, bar32 
>>>> and foo34, I'd like that foo34 be before foo123 and only alphanumerical 
>>>> sorting can do that.
>>>>
>>>> regards.
>>>>
>>>> -- 
>>>> Jean-Pierre
>>>>
>>> -- 
>>
> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/0b99c5bc-957d-4cd1-be01-ec3e9dee8fd1n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/0b99c5bc-957d-4cd1-be01-ec3e9dee8fd1n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/6777a304-b9b8-4552-9c12-e98b6a6332b8n%40googlegroups.com.


[tw5] Re: alphanumerical sort for sortsub

2021-04-28 Thread Jean-Pierre Rivière
very fine!!! eager to see what other functionality will be given too.

Le mercredi 28 avril 2021 à 17:02:12 UTC+2, saq.i...@gmail.com a écrit :

> I have a PR almost ready that includes this as well as other sorting 
> functionality.
>
>
> On Wednesday, April 28, 2021 at 4:54:02 PM UTC+2 jn.pierr...@gmail.com 
> wrote:
>
>> I've just taken the time to understand how to use sortsub. I should have 
>> done it before, et really does what I was trying to get with a lot of 
>> efforts and far too much code!
>>
>> But there's a kind of  sort that sortsub lack, which is alphanumeric. 
>> Just like there is sortan and sort filter.
>>
>> If my sortsub subfilter reference technical names like foo123, bar32 and 
>> foo34, I'd like that foo34 be before foo123 and only alphanumerical sorting 
>> can do that.
>>
>> regards.
>>
>> -- 
>> Jean-Pierre
>>
>

-- 
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/0b99c5bc-957d-4cd1-be01-ec3e9dee8fd1n%40googlegroups.com.


[tw5] json access when not in action mode?

2021-04-28 Thread Jean-Pierre Rivière
How can I access json data in a smart way when my code is not in the 
context of a button-started action (which I call action mode)?

say this simple text of my "data" tiddler:
-
[
  { "captain": "Hook", "age": "42" },
  { "captain": "Planet", "age": "37" }
]

the indexes filter returns 0 and 1.

with get[0] I would get { "captain": "Hook", "age": "42" }

I can't get[0/name] to get "Hook".

IS there a plugin or any other mean to get:
- the names of the fileds within any json objects?
- getting any values from json with a syntax like that I give, or even a 
more ambitious xpath query?

I have installed json mangler. but I have no docs about it, not even 
knowing what it really does besides providing a bar for json tiddlers?

regards.

-- 
Jean-Pierre

-- 
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/234cbae9-e66c-4bb8-a7e3-44184f6cdc05n%40googlegroups.com.


[tw5] alphanumerical sort for sortsub

2021-04-28 Thread Jean-Pierre Rivière
I've just taken the time to understand how to use sortsub. I should have 
done it before, et really does what I was trying to get with a lot of 
efforts and far too much code!

But there's a kind of  sort that sortsub lack, which is alphanumeric. Just 
like there is sortan and sort filter.

If my sortsub subfilter reference technical names like foo123, bar32 and 
foo34, I'd like that foo34 be before foo123 and only alphanumerical sorting 
can do that.

regards.

-- 
Jean-Pierre

-- 
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/2ede765e-1199-45c3-a5cd-a1ed5fff203fn%40googlegroups.com.


Re: [tw5] html id and transclusion

2021-04-28 Thread Jean-Pierre Rivière
Thank you for the clarification. I understand your point of view.

Now if I want to have a go at it, for instance so that my input buttons can 
get an id from a parameter, how should I proceed? From where should I 
start? I'm sure this is not trivial but I'm eager to try.

regards.

Le mercredi 28 avril 2021 à 12:32:33 UTC+2, jeremy...@gmail.com a écrit :

> In a recent thread, Jeremy told me that having id elements is a bit of a 
> problem because each tiddler can be transcluded more than once into any 
> given tiddler' which would result into a broken html with a repeated id 
> value.
>
>
> This is true.
>
> But if id are required, shouldn't it be up to the programmer to make sure 
> there is no problem? Of course, the doc would tell that specifying id is a 
> tricky things to be done with great precaution. But this is IMHO better 
> that forbidding id specification altogether.
>
> As was the exposed, this has to do with WCAG requirements ignoring the 
> CORRECT HTML (stated as accessible on official docs) 
>  are requiring  as 
> the only validating way of accessible code. (with some variations for 
> WAI-ARIA)
>
>
> Just to be clear, the core doesn't forbid using "id" attributes, it's 
> perfectly possible to use them as long as care is taken. The thing that's 
> particularly hard is to use IDs within a reusable component without the 
> user of that component being aware of the mechanism. So, the core avoids 
> the complexity of these techniques.
>
> Best wishes
>
> Jeremy.
>
>
>
>
>
> -- 
> Jean-Pierre
>
> -- 
> 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+...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/d739e00f-ba01-4425-b0d0-9730d6524986n%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/0805f885-ed1b-441a-9552-50758afe0b1fn%40googlegroups.com.


[tw5] html id and transclusion

2021-04-28 Thread Jean-Pierre Rivière
In a recent thread, Jeremy told me that having id elements is a bit of a 
problem because each tiddler can be transcluded more than once into any 
given tiddler' which would result into a broken html with a repeated id 
value.

This is true.

But if id are required, shouldn't it be up to the programmer to make sure 
there is no problem? Of course, the doc would tell that specifying id is a 
tricky things to be done with great precaution. But this is IMHO better 
that forbidding id specification altogether.

As was the exposed, this has to do with WCAG requirements ignoring the 
CORRECT HTML (stated as accessible on official docs) 
 are requiring  as 
the only validating way of accessible code. (with some variations for 
WAI-ARIA)

-- 
Jean-Pierre

-- 
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/d739e00f-ba01-4425-b0d0-9730d6524986n%40googlegroups.com.


[tw5] Re: transclusion and parameterized template

2021-04-28 Thread Jean-Pierre Rivière
Than you Saq!

I had read the «transclusion with templates" doc several times. The hint 
you've just gave me was not evident from my reading. Although I was 
skeptical about not finding the widget equivalent of {{tiddler||template}} 
because I know that each wiki syntax is translated into widgets.

Here is the code if the tiddler used as a form holds two fields 
"datasource" and "template". The block mode is needed for full wiki syntax 
support (like a !!title)

<$vars temp={{!!template}}>
<$tiddler tiddler={{!!datasource}}><$transclude tiddler=<> 
mode=block/>


Le mardi 27 avril 2021 à 17:45:35 UTC+2, saq.i...@gmail.com a écrit :

> Two things that might be helpful:
>
> 1) {{tiddlerName||templateName}}
>
> 2) the above is a shortcut syntax for
> <$tiddler tiddler="tiddlerName">
> <$translude tiddler="templateName">
> 
>
> See https://tiddlywiki.com/#Transclusion%20with%20Templates
>
> On Tuesday, April 27, 2021 at 5:24:01 PM UTC+2 jn.pierr...@gmail.com 
> wrote:
>
>> The transclude widget dos not offer any template use option.
>>
>> the wiki syntax for transclusion requires a fixed template although it 
>> allows for a computed source tiddler.
>>
>> That is:
>>
>> we can have {{<>!!temp}}
>>
>> but not {{<>!!<>}}
>>
>> and it would be fine to get <$transclude tiddler=<> 
>> template=<>/>
>>
>> I also tried to have a tiddler where the "datasource" and "template" 
>> field where valorized at my target values and whose text was
>>
>> {{<$transclude field=datasource>>!!<$transclude field=template/>}}
>> {{<$transclude field=datasource>>!!my-real-template}}
>>
>> the second form does work.
>>
>> I tried some tricks with text and wikify widgets, but I've never been 
>> able to parametize the template tiddler name on way or another.
>>
>> -- 
>> Jean-Pierre
>>
>>

-- 
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/24cf6f35-efc8-4b39-a072-945b32d015f0n%40googlegroups.com.


[tw5] transclusion and parameterized template

2021-04-27 Thread Jean-Pierre Rivière
The transclude widget dos not offer any template use option.

the wiki syntax for transclusion requires a fixed template although it 
allows for a computed source tiddler.

That is:

we can have {{<>!!temp}}

but not {{<>!!<>}}

and it would be fine to get <$transclude tiddler=<> template=<>/>

I also tried to have a tiddler where the "datasource" and "template" field 
where valorized at my target values and whose text was

{{<$transclude field=datasource>>!!<$transclude field=template/>}}
{{<$transclude field=datasource>>!!my-real-template}}

the second form does work.

I tried some tricks with text and wikify widgets, but I've never been able 
to parametize the template tiddler name on way or another.

-- 
Jean-Pierre

-- 
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/ec2c0be8-d9fb-454b-9ecf-2a84e878c88en%40googlegroups.com.


Re: [tw5] action setfield surprise

2021-04-23 Thread Jean-Pierre Rivière
I had tested my stuff in the upcoming 5.1.24 online as the screen capture 
show.

With the latest pieces of information you gave, I can see that there can be 
a reason of my code failure. This is relief.

I have the decided to have a go at variables updating themselves, to see 
what it can do. Here is my test code:

\define just-count()
<$set name=z value="42">
<$action-log $$message="1." $$filter=z/>
<$set name=z1 value="z1=<>">
<$set name=z filter="[add[3]]">
<$action-log $$message="2." $$filter=z/>
<$set name=z2 value="z2=<>">
<$set name=z filter="[add[12]]">
<$action-log $$message="3." $$filter=z/>
<$set name=z3 value="<> ; <> ; z3=<>"/>
<>
<$action-log $$message=<>/>

\end

\define only-count()
<$set name=z value="42">
<$set name=z1 value="z1=<>">
<$set name=z filter="[add[3]]">
<$set name=z2 value="z2=<>">
<$set name=z filter="[add[12]]">
<$set name=z3 value="<> ; <> ; z3=<>">
only-count: <>

\end

\define wiki-count()
<$set name=z value=42>
<$wikify name=z1 text="z1=<>">
<$set name=z filter="[add[3]]">
<$wikify name=z2 text="z2=<>">
<$set name=z filter="[add[12]]">
<$wikify name=z3 text="<> ; <> ; z3=<>">
wiki-count: <>

\end

<$button actions=<>>
just count (see console)!
<>
<>
==

output in tiddler:
only-count: z1=57 ; z2=57 ; z3=57 
wiki-count: z1=42 ; z2=45 ; z3=57

summarized output in console if button pressed:
1. z=42
2. z=45
3. z=57

with the button, it's fine but is there a problem with the number of 
closing  or is a single one just fine? (not in the context of my 
code, but it could be the case if I was not defining z1, z2 and z3 in 
just-count macro)

without the button, we can see that the transitional values of z must be 
captured, hence my using the wikify widdget. Otherwisi all occurrence of z 
have the final value. I'm pretty sure this is a feature, not a bug, isn't 
it?

This being said, I will have a try at recursion and report here.

Le vendredi 23 avril 2021 à 21:39:20 UTC+2, saq.i...@gmail.com a écrit :

> The sequence of execution of action widgets within a single block/string 
> is not guaranteed. Therefore you cannot reliably set a value in  an 
> action-widget and read it in a subsequent one if they are part of the same 
> block of action widgets which have the same trigger. This is a known design 
> limitation of the action-widget implementation.
>
> You can work around this in limited situations with the Button widget by 
> executing some actions in the body of the button and others in the actions 
> attribute. Otherwise for things like having a counter, recursive macros are 
> an option.
>
>
>


-- 
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/37fc25b7-0c55-432e-8daa-a69b07e9227cn%40googlegroups.com.


Re: [tw5] action setfield surprise

2021-04-23 Thread Jean-Pierre Rivière

I simplified my test.

Definitely, the update is postponed. And also, the updating mechanism is 
nos broken in 5.1.23, it was a mistake of mine because of what I report 
here below.

demo code:

\define just-do-it()
<$set name=seen filter="[get]">
<$action-log $$message="before update" $$filter="target dest seen"/>

<$action-setfield $tiddler=<> $field=<> $value=<>/>
<$set name=seen filter="[get]">
<$action-log $$message="after update" $$filter="target dest seen"/>

\end

<$vars target="Community" dest=ndx>
<$set name=foo value=1848>
<$button actions=<>>
set <> into <>!!<>


<$set name=foo value=1789>
<$button actions=<>>
set <> into <>!!<>


current value: <$transclude tiddler=<> field=<>/>
See <$link to=<>/>



see screen capture showing the console output!

[image: update-field.png]
Le vendredi 23 avril 2021 à 19:03:20 UTC+2, Jean-Pierre Rivière a écrit :

> Yes. Fine !!!
>
> But on my 5.1.23, it seems to be tgat the action of $action-setfield is 
> not immediate but postponed to the end of the action (ie when the matro 
> called by actions=<> has terminated).
>
> This is problematic for me as I was trying to increment a value within a 
> loop by using  $action-setfield in an action setup.
>
> I have tried my code on your new wiki, but I can't make it function in any 
> way. I don't know why yet. I'm waiting for your answer about the moment 
> when the field modification take place before trying anew (it might not be 
> useful...)
>
> regards
>
> Le vendredi 23 avril 2021 à 17:30:21 UTC+2, jeremy...@gmail.com a écrit :
>
>> Hi Jean-Pierre
>>
>> In my quick test creating a new tiddler on tiddlywiki.com/prerelease and 
>> entering the following, and then clicking the button, everything worked as 
>> expected.
>>
>> <$button>
>> <$action-setfield $tiddler="HelloThere" $field=bar $value=42/>
>> test
>> 
>>
>> Best wishes
>>
>> Jeremy
>>
>> On 23 Apr 2021, at 16:22, Jean-Pierre Rivière  
>> wrote:
>>
>> Hi!
>>
>> I found out that to update to 42 the value of field "bar" in tiddler 
>> "foo" I *must* use the syntax
>>
>> <$action-setfield $tiddler=foo bar=42/>
>>
>> and that the following has no effect that I cam see:
>>
>> <$action-setfield $tiddler=foo $field=bar $value=42/>
>>
>> although I would have thought both as valid from reading the doc.
>>
>> Is that normal (under tw5.1.23)? What does achieve the second form?
>>
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/a13a6c5f-6cb1-46f5-a059-77999f19305en%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/a13a6c5f-6cb1-46f5-a059-77999f19305en%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>>
>>

-- 
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/c37f5525-1f12-4fd7-9d5f-4070d62e190en%40googlegroups.com.


Re: [tw5] accessibility issues with select widget

2021-04-23 Thread Jean-Pierre Rivière
 nested inside the label element instead of using the “for” 
> attribute. There’s even an example in the spec:
>
>
> https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element
>
> Sometimes, a user has to select one or more items. This example shows such 
> an interface.
>
> 
>  Select the songs from that you would like on your Act II Mix Tape:
>  
>   It Sucks to Be Me (Reprise)
>   There is Life Outside Your Apartment
>   The More You Ruv Someone
>   Schadenfreude
>   I Wish I Could Go Back to College
>   The Money Song
>   School for Monsters
>   The Money Song (Reprise)
>   There's a Fine, Fine Line (Reprise)
>   What Do You Do With a B.A. in English? (Reprise)
>   For Now
>  
>
>
>
> If we can't get WCAG conformity witg tiddlywiki, this mean the law will 
> forbid any application in tw technology to be used as a web app for any 
> major public (the public, corporate app, etc). This would really be a shame.
>
>
> I agree that WCAG conformity is essential, but in this case it appears to 
> be a piece of bureaucracy divorced from both the HTML spec and browser 
> implementations.
>
> Is there really no way to properly handle id tags? Could we imagine a blue 
> sky effort to imagine potential solutions? Where and how could interested 
> parties be technically briefed and reports their own works about it 
> afterwards?
>
>
> We would need to use the “qualify” technique that we use to generate state 
> tiddler titles. It would be hard to make things work without burdening 
> authors with additional complexity.
>
> Best wishes
>
> Jeremy
>
>
> regards.
>
> -- 
> Jean-Pierre
>
>
>
>
> Le mercredi 21 avril 2021 à 22:27:39 UTC+2, jeremy...@gmail.com a écrit :
>
>> Hi Jean-Pierre
>>
>> Using HTML IDs is awkward in TiddlyWiki because of the way that fragments 
>> of HTML can be displayed more than once. But it is also possible to nest 
>> the select element inside the label element:
>>
>>
>> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#advanced_select_with_multiple_features
>>
>> For example:
>>
>> 
>> This is the label
>> <$select tiddler=<> default='HelloThere'>
>> <$list filter='[all[shadows+tiddlers]tags[]sort[title]]'>
>> >><$view field='title'/>
>> 
>> 
>> 
>>
>> Best wishes
>>
>> Jeremy
>>
>> --
>> Jeremy Ruston
>> jer...@jermolene.com
>> https://jermolene.com
>>
>> On 21 Apr 2021, at 11:04, Jean-Pierre Rivière  
>> wrote:
>>
>> As far as WCAG 2.1 is concerned, a "select" elements should better have 
>> an "id" tag in order that a "label" element could point to it witg its 
>> "for" tag. Alternatives are a "title" tag or WAI-ARIA roles for the 
>> "select" element.
>>
>>
>> Alas, none of this is possible with the current "select" widget.
>>
>> The "button" widget can have aria labels but sill cannot get an "id" tag.
>>
>> Neither can have a "name" tag which can also be helpful in this respect 
>> (as a poor man's workaround).
>>
>> I think it would be time to address this a11y issues that prevents to 
>> make a fully accessible document or site with tiddlywiki.
>>
>> I propose to help in this endeavour in listing the accessibility problems 
>> with forms  widgets. And propose some fixes (if I'm successfull).
>>
>> My interest in the quest: I am using tiddliwiki to build a tool for 
>> recording scores and minutes at accessibility tests for web sites. It would 
>> also be better if the tool was as WCAG compliant as it could be.
>>
>> Regards.
>>
>> -- 
>> Jean-Pierre
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/ed0a3873-8007-4e15-932d-b99811308884n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/ed0a3873-8007-4e15-932d-b99811308884n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>>
> -- 
> 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+...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/cd8c9c6e-39d9-4b8b-9b31-d448cc7b5d03n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/cd8c9c6e-39d9-4b8b-9b31-d448cc7b5d03n%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>
>

-- 
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/33120e8f-71e3-4a91-aa55-23bac1d5bf1en%40googlegroups.com.


Re: [tw5] action setfield surprise

2021-04-23 Thread Jean-Pierre Rivière
Yes. Fine !!!

But on my 5.1.23, it seems to be tgat the action of $action-setfield is not 
immediate but postponed to the end of the action (ie when the matro called 
by actions=<> has terminated).

This is problematic for me as I was trying to increment a value within a 
loop by using  $action-setfield in an action setup.

I have tried my code on your new wiki, but I can't make it function in any 
way. I don't know why yet. I'm waiting for your answer about the moment 
when the field modification take place before trying anew (it might not be 
useful...)

regards

Le vendredi 23 avril 2021 à 17:30:21 UTC+2, jeremy...@gmail.com a écrit :

> Hi Jean-Pierre
>
> In my quick test creating a new tiddler on tiddlywiki.com/prerelease and 
> entering the following, and then clicking the button, everything worked as 
> expected.
>
> <$button>
> <$action-setfield $tiddler="HelloThere" $field=bar $value=42/>
> test
> 
>
> Best wishes
>
> Jeremy
>
> On 23 Apr 2021, at 16:22, Jean-Pierre Rivière  
> wrote:
>
> Hi!
>
> I found out that to update to 42 the value of field "bar" in tiddler "foo" 
> I *must* use the syntax
>
> <$action-setfield $tiddler=foo bar=42/>
>
> and that the following has no effect that I cam see:
>
> <$action-setfield $tiddler=foo $field=bar $value=42/>
>
> although I would have thought both as valid from reading the doc.
>
> Is that normal (under tw5.1.23)? What does achieve the second form?
>
>
> -- 
> 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+...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/a13a6c5f-6cb1-46f5-a059-77999f19305en%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/a13a6c5f-6cb1-46f5-a059-77999f19305en%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>
>

-- 
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/45e0eceb-e3d0-46c6-85f9-a8e968c16a42n%40googlegroups.com.


[tw5] action setfield surprise

2021-04-23 Thread Jean-Pierre Rivière
Hi!

I found out that to update to 42 the value of field "bar" in tiddler "foo" 
I *must* use the syntax

<$action-setfield $tiddler=foo bar=42/>

and that the following has no effect that I cam see:

<$action-setfield $tiddler=foo $field=bar $value=42/>

although I would have thought both as valid from reading the doc.

Is that normal (under tw5.1.23)? What does achieve the second form?

-- 
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/a13a6c5f-6cb1-46f5-a059-77999f19305en%40googlegroups.com.


Re: [tw5] accessibility issues with select widget

2021-04-23 Thread Jean-Pierre Rivière
Hi Jeremy. Thank you for your reply. I do appreciate it.

Your tw code renders an html code like

This is my labelone

This fails https://www.w3.org/WAI/WCAG21/Techniques/html/H44 because of 
lack of "id" tag.

https://www.w3.org/WAI/WCAG21/Techniques/html/H65 provides an alternative 
with the "title" tag but neither edit-text widget nor button widget provide 
a way to get a title tag. This solution would be a little out of touch (aka 
not very acceptable) if you provide a label element that fails only because 
of a lack of "id" tag.

on the contrary we are clearly within the wrong as shown 
in https://www.w3.org/WAI/WCAG21/Techniques/failures/F68

If we can't get WCAG conformity witg tiddlywiki, this mean the law will 
forbid any application in tw technology to be used as a web app for any 
major public (the public, corporate app, etc). This would really be a shame.

Is there really no way to properly handle id tags? Could we imagine a blue 
sky effort to imagine potential solutions? Where and how could interested 
parties be technically briefed and reports their own works about it 
afterwards?

regards.

-- 
Jean-Pierre




Le mercredi 21 avril 2021 à 22:27:39 UTC+2, jeremy...@gmail.com a écrit :

> Hi Jean-Pierre
>
> Using HTML IDs is awkward in TiddlyWiki because of the way that fragments 
> of HTML can be displayed more than once. But it is also possible to nest 
> the select element inside the label element:
>
>
> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#advanced_select_with_multiple_features
>
> For example:
>
> 
> This is the label
> <$select tiddler=<> default='HelloThere'>
> <$list filter='[all[shadows+tiddlers]tags[]sort[title]]'>
> >><$view field='title'/>
> 
> 
> 
>
> Best wishes
>
> Jeremy
>
> --
> Jeremy Ruston
> jer...@jermolene.com
> https://jermolene.com
>
> On 21 Apr 2021, at 11:04, Jean-Pierre Rivière  
> wrote:
>
> As far as WCAG 2.1 is concerned, a "select" elements should better have 
> an "id" tag in order that a "label" element could point to it witg its 
> "for" tag. Alternatives are a "title" tag or WAI-ARIA roles for the 
> "select" element.
>
>
> Alas, none of this is possible with the current "select" widget.
>
> The "button" widget can have aria labels but sill cannot get an "id" tag.
>
> Neither can have a "name" tag which can also be helpful in this respect 
> (as a poor man's workaround).
>
> I think it would be time to address this a11y issues that prevents to make 
> a fully accessible document or site with tiddlywiki.
>
> I propose to help in this endeavour in listing the accessibility problems 
> with forms  widgets. And propose some fixes (if I'm successfull).
>
> My interest in the quest: I am using tiddliwiki to build a tool for 
> recording scores and minutes at accessibility tests for web sites. It would 
> also be better if the tool was as WCAG compliant as it could be.
>
> Regards.
>
> -- 
> Jean-Pierre
>
> -- 
> 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+...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/ed0a3873-8007-4e15-932d-b99811308884n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/ed0a3873-8007-4e15-932d-b99811308884n%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>

-- 
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/cd8c9c6e-39d9-4b8b-9b31-d448cc7b5d03n%40googlegroups.com.


Re: [tw5] Fetching tiddlers from one wiki to another

2021-04-21 Thread Jean-Pierre Rivière
Thank you for your answer. Well, now the POC is working from this link with 
chromium and firefox, both on linux. 

If I get back the bug, I'll look at the console. I should have thought 
about it. I had tried a few things before discovering the "imteractive 
import" tiddlers but not this time.

As for loading tiddlers, to be honest, this is not the proper way to 
describe what I want. The tiddlers I want to show suppose a lot of macros 
and data tiddlers for their rendering. What I would like is getting a 
snapshot of their final html code within the requiring wiki, which would 
have imported the sylesheet beforehand. This being stated, I also have some 
plain tiddlers I would like to see. importing them within the $:/temp/ 
hierarchy would be fine. All those tiddlers are helpers for reference 
documentation. They are too numerous to include. Thiy must be seen on an ad 
hoc basis and get ridden off ASAP.


Le mercredi 21 avril 2021 à 15:34:26 UTC+2, saq.i...@gmail.com a écrit :

>  
>
>> I have got a look at 
>> https://saqimtiaz.github.io/sq-tw/temp/get-remote-tiddlers.html but in 
>> the "Interactive import" tiddler, the button reads "fetch Undefined widget 
>> 'action-getremotetiddler'" and does nothing. I tested it on a recent 
>> chromium.
>>
>>
> That is pretty odd, it works for me in both current Chrome and FF on 
> Windows 10. Do you see any error messages in the browser console?
>  
>
>>  As for me, I would like to be able to transclude tiddlers from other 
>> wikis, but not import them per se.
>>
>
> That is not the aim with this POC.  TiddlyWiki does have facilities to 
> load remote .tid files as tiddlers which might be closer to what you need. 
> It makes use of the _canonical_uri field but has the same limitations 
> regarding CORS.
>

-- 
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/dc67cd1b-457b-48e7-aa33-09c1c1baf282n%40googlegroups.com.


[tw5] Re: Just a thought: embedding TiddlyWiki documentation in our TiddlyWikis?

2021-04-21 Thread Jean-Pierre Rivière
For my current project, I have a tw dedicated to be a chest of relative 
information about the project. daily road-map and daily achievements and 
also technical article I write about what I encounter and since my project 
is done on tw, this is tw stuff as well. I'm using tags and macro and 
Left-Menu to help getting access to these information on my left side on an 
affordable way.

But yes, for the primary information, I have https://tiddlywiki.com/ in an 
other tab. and sometimes many tabs.

Le mercredi 21 avril 2021 à 13:51:05 UTC+2, stan...@gmail.com a écrit :

> Like Walt, +1 for the idea.  This is not really a silly idea.  If one were 
> to look at the Programming Language R (statistics, data science) in the 
> RStudio development environment, one has help functions in a pane along 
> side the source code being worked on, just as Charlie showed above.  I am 
> sure there are many other IDEs with similar layouts and functionality
> Stan
>
> On Tuesday, April 20, 2021 at 11:27:16 PM UTC-4 cj.v...@gmail.com wrote:
>
>> Just a silly thought I had.
>>
>> There are certain pages of TiddlyWiki documentation that I often 
>> reference (in particular: filter operators and widgets).
>>
>> It just dawned on me that these (the static pages) would be nice to have 
>> displayed in a sidebar tab for all my TiddlyWiki instances.
>>
>> [image: Screenshot 2021-04-21 12.20.24 AM - Display 2.png]
>>
>

-- 
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/7fe42248-ecab-4b04-8dcb-a556464cefc1n%40googlegroups.com.


Re: [tw5] Fetching tiddlers from one wiki to another

2021-04-21 Thread Jean-Pierre Rivière

I have got a look 
at https://saqimtiaz.github.io/sq-tw/temp/get-remote-tiddlers.html but in 
the "Interactive import" tiddler, the button reads "fetch Undefined widget 
'action-getremotetiddler'" and does nothing. I tested it on a recent 
chromium.

I can't see any plugin or macro for the magic. And I'm not so sure at what 
is happening. As for me, I would like to be able to transclude tiddlers 
from other wikis, but not import them per se. Icbnnot see if that would be 
possible within the scope of this projects (and it should also be noted the 
alrady announced technical limitations liki CORS).

regards,

-- 
Jean-Pierre

Le mercredi 21 avril 2021 à 07:23:57 UTC+2, saq.i...@gmail.com a écrit :

> Hi Jan,
>
> I'll reiterate from my first post that this is just a quick and messy POC 
> with a very narrow usage window because of the CORS requirement.
>
> Also note that apparently Twederation is supposed to be able to silently 
> import content in the background as well, as pointed out by Jeremy above. 
> If that works for your intended workflow, it may be a better choice for you 
> as it wont impose the same requirement to serve the wiki files with the 
> correct CORS headers.
>
> The demo I posted does support using a filter to only import certain 
> tiddlers. The other two requirements you mention are feasible though not 
> implemented in the demo. I am still at the exploration stage of seeing what 
> is possible, and need to work on the project proposal I have in mind which 
> involves using TW in an LMS context too. If that goes well I will revisit 
> this topic later this year.
>
> Regards,
> Saq
>
> On Saturday, April 17, 2021 at 4:09:09 PM UTC+2 Jan wrote:
>
>> Hi Saq,
>> thank you very much for this widget! This is a great help, I have looked 
>> for something like this for a long time. 
>> This is a very important puzzlepiece to use TW as an interactive Learning 
>> Management System. 
>> For this usecase it is great that it has a silent mode, which makes it 
>> mor unobstrusive than the fetch-function of Twederation.
>> For the interactity of an LMS I would love three other features:
>>
>> -Can it handle filters to import only certain tiddlers? So far I could 
>> not see how to implement them in the action-widget.
>> -It would be great if it could tag them imported tiddlers like "temp" or 
>> "imported"
>> -It would be very important to have an "Overwrite Filter" determining 
>> which tiddlers can be overwritten by the imported tiddlers. (For example al 
>> those whose modifier is not the current user).
>>
>> Best wishes  and nany thanks for this great improvement!
>> Jan
>>
>>
>>
>>
>>
>> Am So, 4. Apr, 2021 um 10:49 VORMITTAGS schrieb Saq Imtiaz <
>> saq.i...@gmail.com>:
>>
>> Hi Jeremy,
>>
>> A little background: I have a couple of ideas in mind for projects to do 
>> with education with some of the organizations I work with, for which I am 
>> considering TiddlyWiki. One of them would be very similar to the syncing 
>> educator and student notebooks project that was based on TiddlyWiki classic 
>> over 10 years ago. The other involves providing a sandbox for exploration 
>> and developing skills to do with using and potentially creating/customizing 
>> digital tools to aid one's own learning. While TiddlyWiki sounds like a 
>> good fit, it will also be essential that it is hard for the students to 
>> break the tool itself.
>>
>> Both projects, if they proceed, will entail quite a bit of custom coding 
>> to get the user experience just right, so as a first step I wanted to 
>> understand what was possible today in terms of browser restrictions and 
>> loading content dynamically in TW5. As mentioned in my original post, I 
>> realize the use case for this particular prototype is very narrow. However 
>> I find that sharing ideas and prototypes is rarely a bad idea as it can 
>> often inspire other ideas in the community, so I try my best to do so 
>> whenever possible.
>>  
>>
>>> Those restrictions still exist. For example, the XMLHttpRequest approach 
>>> described here generally won’t work from a file: URI, which was a major 
>>> design goal for the plugin library and Twederation.
>>>
>>
>> That's interesting as I've found it to work without problems to fetch 
>> content into a local file wiki as long as the remote content is served with 
>> the correct CORS headers (and the request is made without the 
>> X-Requested-With header). Or do you mean when the remote content is also 
>> accessed via a file: URI ? I have not tested that scenario.
>>
>> Hosting all the wikis with CORS support is an easy requirement to satisfy 
>> for the projects I have in mind.
>>  
>>
>>> It’s definitely time we explored dynamic content loading via 
>>> XMLHttpRequest in more detail. The constraints get less onerous as we gain 
>>> better HTTP/HTTPS solutions.
>>>
>>
>> Agreed. I quite miss the possibilities offered by the quite rich 
>> ecosystem of adaptors that we had in TiddlyWiki Classic and even the 

Re: [tw5] of interest: transclusion and field of transcluded tiddler

2021-04-21 Thread Jean-Pierre Rivière
Yes, you're right and your code works. But I never use a list widget 
without an explicit loop variable. As you wrote, it makes for more easy to 
decipher code. It is those kinds of implicit stuff that can make Perl code 
so short but so arcane. This is the origin of my aversion for them.

Le mercredi 21 avril 2021 à 14:35:21 UTC+2, Mohammad a écrit :

> I believe in
>
> <$list variable=journal filter="[tag[journal]]">
> 
>   <$link to=<>/> <$transclude tiddler=<> 
> field=important mode=inline/>
>   <$transclude tiddler=<> mode=block/>
> 
> 
>
> You will get the same result using shortcut transclusion in double curly 
> brackets, if you remove the tiddler or leave it to be currentTiddler
>
> <$list filter="[tag[journal]]">
> 
>   <$link/> {{!!important}}
>   {{!!text}}
> 
> 
>
> So, {{!!field}} will work as long as you refer correctly to currectTiddler!
> *Sidenote*: I myself prefer the first implementation (your solution) as 
> it is a semantic and clear one! In programming I myself prefer to write 
> codes that are maintainable and understandable and self explanatory!
>
>
> Best wishes
> Mohammad
>
>
> On Wed, Apr 21, 2021 at 3:15 PM Jean-Pierre Rivière  
> wrote:
>
>> I have acollection of tiddlers that have a field name "importantt".
>>
>> I display this field with {{!!important}} within each of these tiddler.
>>
>> and I have an other tiddler that display a collection of those tiddler 
>> thanks to a list widget and a transclude widget. But when transcluded, the 
>> important field was nos shown.
>>
>> I have not set up a template for inclusion so far and probably won't.
>>
>> I read the old topic 
>> https://groups.google.com/g/tiddlywiki/c/7-8bDakJnw4/m/__rB5Q-6AwAJ and 
>> the indicated 
>> http://tobibeer.github.io/tb5/#Passing%20Parameters%20To%20A%20Transclusion 
>> and I got my solution.
>>
>> For in my list widget I use a "journal" variable to list each tiddler I 
>> want to show. And there is no such "journal" variable or macro in each of 
>> every targeted tiddlers.
>>
>> So now, in every of those tiddlers, I make my transclusion as
>>
>> <$transclude tiddler=<> field=important/>
>>
>> instead of
>>
>> {{!!important}}
>>
>> and this works OK when each of those tiller is on display by itself or 
>> transcluded by my library tiddler.
>>
>> to be complete:
>>
>> in "outer" tiddler:
>> <$list variable=journal filter="[tag[journal]]">
>> 
>>   <$link to=<>/> <$transclude tiddler=<> 
>> field=important mode=inline/>
>>   <$transclude tiddler=<> mode=block/>
>> 
>> 
>>
>> in each inner tiddler (tagged "journal" and with an "important" field):
>> <$transclude tiddler=<> field=important/>
>>
>> Thank you to all PMario and Tobias Beer. I hope this post could help 
>> further people with a quicker access to a solution to a simple but frequent 
>> problem.
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/934e4e5a-9ef7-4be8-a9c3-f5c5f964b400n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/934e4e5a-9ef7-4be8-a9c3-f5c5f964b400n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/bd9dfedb-fc93-456d-9732-62cc48ac8750n%40googlegroups.com.


[tw5] of interest: transclusion and field of transcluded tiddler

2021-04-21 Thread Jean-Pierre Rivière
I have acollection of tiddlers that have a field name "importantt".

I display this field with {{!!important}} within each of these tiddler.

and I have an other tiddler that display a collection of those tiddler 
thanks to a list widget and a transclude widget. But when transcluded, the 
important field was nos shown.

I have not set up a template for inclusion so far and probably won't.

I read the old 
topic https://groups.google.com/g/tiddlywiki/c/7-8bDakJnw4/m/__rB5Q-6AwAJ 
and the 
indicated 
http://tobibeer.github.io/tb5/#Passing%20Parameters%20To%20A%20Transclusion 
and I got my solution.

For in my list widget I use a "journal" variable to list each tiddler I 
want to show. And there is no such "journal" variable or macro in each of 
every targeted tiddlers.

So now, in every of those tiddlers, I make my transclusion as

<$transclude tiddler=<> field=important/>

instead of

{{!!important}}

and this works OK when each of those tiller is on display by itself or 
transcluded by my library tiddler.

to be complete:

in "outer" tiddler:
<$list variable=journal filter="[tag[journal]]">

  <$link to=<>/> <$transclude tiddler=<> 
field=important mode=inline/>
  <$transclude tiddler=<> mode=block/>



in each inner tiddler (tagged "journal" and with an "important" field):
<$transclude tiddler=<> field=important/>

Thank you to all PMario and Tobias Beer. I hope this post could help 
further people with a quicker access to a solution to a simple but frequent 
problem.

-- 
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/934e4e5a-9ef7-4be8-a9c3-f5c5f964b400n%40googlegroups.com.


[tw5] accessibility issues with select widget

2021-04-21 Thread Jean-Pierre Rivière
As far as WCAG 2.1 is concerned, a "select" elements should better have an 
"id" tag in order that a "label" element could point to it witg its "for" 
tag. Alternatives are a "title" tag or WAI-ARIA roles for the "select" 
element.

Alas, none of this is possible with the current "select" widget.

The "button" widget can have aria labels but sill cannot get an "id" tag.

Neither can have a "name" tag which can also be helpful in this respect (as 
a poor man's workaround).

I think it would be time to address this a11y issues that prevents to make 
a fully accessible document or site with tiddlywiki.

I propose to help in this endeavour in listing the accessibility problems 
with forms  widgets. And propose some fixes (if I'm successfull).

My interest in the quest: I am using tiddliwiki to build a tool for 
recording scores and minutes at accessibility tests for web sites. It would 
also be better if the tool was as WCAG compliant as it could be.

Regards.

-- 
Jean-Pierre

-- 
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/ed0a3873-8007-4e15-932d-b99811308884n%40googlegroups.com.


[tw5] Re: sorting json data

2021-04-20 Thread Jean-Pierre Rivière
Thanks to the ideas of Tones, I have found out how to solve elegantly my 
problem. And found out two oddities as well. But firs, let 's see the the 
data in tiddler "projets-json":

[
  {
   "project": "pleiade",
   "name": "Pléiade v5",
   "url": "http:pleiade.test.acmeserver.com"
   },
   {
   "project": "rnvp",
   "name": "RNVP preprod",
   "url": "https://rnvp.preprod.acmeserver.com;
   },
   {
   "project": "resa",
   "name": "application de réservation de salles",
   "url": "http://ars.test.acmeserver.com;
   }
]

Notice that the relative order of the "project" and "name" index is not 
always the same. on purpose.

And here comes the code!

=
\define exp-med() \s*},\s*{
\define exp-beg() [[]\s*{\s*
\define exp-end() \s*}\s*]\s*

\define exp-grab() .*"name":\s"([^"]*)"[\s\S]*
\define exp-build() AKA_$1_YET

\define exp-grab01() 
[\s\S]*"project":\s"([^"]*)"[\s\S]*"name":\s"([^"]*)"[\s\S]*
\define exp-build01() $2^$1

\define exp-grab02() 
[\s\S]*"name":\s"([^"]*)"[\s\S]*"project":\s"([^"]*)"[\s\S]*
\define exp-build02() $1^$2

\define exp-final() [^^]*\^

!! step 1
Get the whole json in a single line and from there into lines of exactly 
one complete json object each.

<$list 
filter="[{projets-json}join[]splitregexpsplitregexpsplitregexp!is[blank]]"
 
variable=each-line>
«<>»


---

!! experimental step 2
add an experiment for capturing a desired kind of data. Normally, only the 
name would be on display, between AKA_ and _YET.

<$list 
filter="[{projets-json}join[]splitregexpsplitregexpsplitregexp!is[blank]search-replace::regexp,]"
 
variable=each-line>
«<>»


---

!! real step 2
add fetching "name" and "project" values and arrange them into NAME^PROJECT.

<$list 
filter="[{projets-json}join[]splitregexpsplitregexpsplitregexp!is[blank]search-replace::regexp,]"
 
variable=each-line>
«<>»


!! step 3
As we can't be sure of the order of the index within json objects,we have 
to have two scans: one name then project and the other one as project then 
name. This method can be extended up to three fields ; beyond that would be 
a nightmare (can we sort the fields within a json object?).

<$list 
filter="[{projets-json}join[]splitregexpsplitregexpsplitregexp!is[blank]search-replace::regexp,search-replace::regexp,]"
 
variable=each-line>
«<>»


!! step 4
Sort the lines

<$list 
filter="[{projets-json}join[]splitregexpsplitregexpsplitregexp!is[blank]search-replace::regexp,search-replace::regexp,sortan[]]"
 
variable=each-line>
«<>»


!! step 5

only display the PROJECT value (the part after after "^").

<$list 
filter="[{projets-json}join[]splitregexpsplitregexpsplitregexp!is[blank]search-replace::regexp,search-replace::regexp,sortan[]search-replace::regexp,[]]"
 
variable=each-line>
«<>»

=

and here is what we get:
==
step 1

Get the whole json in a single line and from there into lines of exactly 
one complete json object each.

«"project": "pleiade", "name": "Pléiade v5", "url": "
http:pleiade.test.acmeserver.com"»
«"project": "rnvp", "name": "RNVP preprod", "url": "
https://rnvp.preprod.acmeserver.com"»
«"name": "application de réservation de salles", "url": "
http://ars.test.acmeserver.com;, "project": "resa"»
experimental step 2

add an experiment for capturing a desired kind of data. Normally, only the 
name would be on display, between AKA_ and _YET.

«"project": "pleiade", AKA_Pléiade v5_YET»
«"project": "rnvp", AKA_RNVP preprod_YET»
«AKA_application de réservation de salles_YET»
real step 2

add fetching "name" and "project" values and arrange them into NAME^PROJECT.

«Pléiade v5^pleiade»
«RNVP preprod^rnvp»
«"name": "application de réservation de salles", "url": "
http://ars.test.acmeserver.com;, "project": "resa"»
step 3

As we can't be sure of the order of the index within json objects,we have 
to have two scans: one name then project and the other one as project then 
name. This method can be extended up to three fields ; beyond that would be 
a nightmare (can we sort the fields within a json object?).

«Pléiade v5^pleiade»
«RNVP preprod^rnvp»
«application de réservation de salles^resa»
step 4

Sort the lines

«application de 

[tw5] Re: sorting json data

2021-04-20 Thread Jean-Pierre Rivière
nice one too.

I had not thought about using macros to define constants. Handier that 
using variables. Is that a regular feature of your coding, Tones?


Le mardi 20 avril 2021 à 07:34:59 UTC+2, TW Tones a écrit :

> In your example there is a field with the value "name" for every entry, 
> they do not need to be sorted. 
> If on the other hand you are referring to values in the second field like 
> "pleiade", now that is a different story.
>
> Another approach without the JSON mangler is to parse each line, then 
> parse each value;
>
> Here is a hint at how it can be done. Note no json handling, just text 
> handling.
>
> \define open-curly() {
> \define open-square() [
> \define close-square() ]
> \define dbl-quote() "
> \define comma() ,
> \define colon() :
>
> <$list 
> filter="[{Data}splitregexp[\n]!prefix!prefix]" 
> variable=each-line>
> ;<>
> <$list filter="[splitnth[4]]">
>
> 
> 
>
> Regards
> Tones
> On Tuesday, 20 April 2021 at 08:17:02 UTC+10 jn.pierr...@gmail.com wrote:
>
>> Thank you Mark. The macro is a nice thing, but it is not a filter. This 
>> allow to build the html for a sorted table.
>>
>> But there might be some case where I would need to refine the filter to 
>> get a whole list of more complex data out of my filter. BUT this is not 
>> true as of now.
>>
>> With your help, I can achieve what I want in a reasonable amount of code, 
>> and clear code. That's great!
>>
>> Le lundi 19 avril 2021 à 20:34:39 UTC+2, Mark S. a écrit :
>>
>>> This is a slightly different approach that I've used before. The names 
>>> are all fetched in a form where they can be wikified, turned back into a 
>>> list, and then sorted. Then a lookup is done by name for each item and the 
>>> project is extracted. I think from this you can see how you would proceed 
>>> with extracting the URL as well. For this to work of course, the names have 
>>> to be unique. I called the data tiddler "data" here.
>>>
>>> \define getnames()  <$vars lb=" [[" rb="]]" sep="$$"><$list 
>>> filter="[[data]indexes[]addsuffix[/name]]" variable="fetch">{{{ 
>>> [[data]getindexaddprefixaddsuffix] }}}
>>>
>>> \define getprojectbyname(name) 
>>> <$list filter="[[data]indexes[]]" variable="index">
>>> <$list filter="[addsuffix[/name]]" variable=namepath>
>>> <$list filter="[[data]getindexcompare:string:eq<__name__>]">
>>> <$list filter="[addsuffix[/project]]" variable=projectpath>
>>> {{{ [[data]getindex] }}}
>>> 
>>> \end
>>>
>>> <$wikify text="""<>""" name="names">
>>> <$list filter="[enlistsort[]]" variable="name">
>>> Name: <> 
>>> Project: <$macrocall $name="getprojectbyname" name=<> /> 
>>>
>>> 
>>> 
>>>
>>> I've often thought how handy it would be if you could get two outputs 
>>> from a list instead of just one. e.g. both and index and the index/name 
>>> value. 
>>>
>>>
>>> On Monday, April 19, 2021 at 8:56:23 AM UTC-7 jn.pierr...@gmail.com 
>>> wrote:
>>>
 I have a structured json data tiddler name "projects", which looks like 
 this:

 [ 
   { "project": "pleiade", "name": "Pléiade v5", "url": "http:
 pleiade.test.acmeserver.com" },
   { "project": "rnvp", "name": "RNVP preprod", "url": "
 https://rnvp.preprod.acmeserver.com; },
   { "project": "ars", "name": "application de réservation de salles", 
 "url": "http://ars.test.acmeserver.com; }
  ]

 I want to show this a list sorted on the "name" field. This is the 
 sorting part which I struggle to get, unsuccessfully.

 I have installed the jsonmangler plugin. I can't find a reherence doc 
 though. With numerous tries, I've been able to get my list, but not sorted.

 I have this idea to constitute a list of tiddlers where each item is 
 "name^index" where name is the name and index the index of each record. 
 Then I wold sort the list and reduce it to the index part to get the 
 sorted 
 list of index which would enable me to achieve the display I want.

 But I cannot build this name-index list. I have the list of the names 
 in the natural order and the list of numbers which are the natural indexes 
 of the items. I can then get a list list like "t0 t1 t2 0 1 2". I can in 
 fact be a little clever and build "t0 t1 t2 ^0; ^1; ^2;"  instead and then 
 what I need is getting "t0 ^0; t1 ^1; t2 ^2;". This is the critical step I 
 don't know how to do.

 (because from there I would join it in "t0^0;t1^1;t2^2;", split that 
 along the ";" character and get the list of name^index I wish.)

 I know how to do it manually in the case of three records, like this:

 
 <$list variable="demo" filter="[enlist[t0 t1 t2]append[^0; ^1; 
 ^2;]move:-2[^0;]move:-1[^1;]join[]split[;]!is[blank]]">
 <>
 
 

 So the general idea would be to generate the part like 
 "move:-2[^0;]move:-1[^1;]" from the number of records. That is beginning 
 to 
 be very complex for what that is, how common this seems to be to me. 

[tw5] Re: sorting json data

2021-04-19 Thread Jean-Pierre Rivière
Thank you Mark. The macro is a nice thing, but it is not a filter. This 
allow to build the html for a sorted table.

But there might be some case where I would need to refine the filter to get 
a whole list of more complex data out of my filter. BUT this is not true as 
of now.

With your help, I can achieve what I want in a reasonable amount of code, 
and clear code. That's great!

Le lundi 19 avril 2021 à 20:34:39 UTC+2, Mark S. a écrit :

> This is a slightly different approach that I've used before. The names are 
> all fetched in a form where they can be wikified, turned back into a list, 
> and then sorted. Then a lookup is done by name for each item and the 
> project is extracted. I think from this you can see how you would proceed 
> with extracting the URL as well. For this to work of course, the names have 
> to be unique. I called the data tiddler "data" here.
>
> \define getnames()  <$vars lb=" [[" rb="]]" sep="$$"><$list 
> filter="[[data]indexes[]addsuffix[/name]]" variable="fetch">{{{ 
> [[data]getindexaddprefixaddsuffix] }}}
>
> \define getprojectbyname(name) 
> <$list filter="[[data]indexes[]]" variable="index">
> <$list filter="[addsuffix[/name]]" variable=namepath>
> <$list filter="[[data]getindexcompare:string:eq<__name__>]">
> <$list filter="[addsuffix[/project]]" variable=projectpath>
> {{{ [[data]getindex] }}}
> 
> \end
>
> <$wikify text="""<>""" name="names">
> <$list filter="[enlistsort[]]" variable="name">
> Name: <> 
> Project: <$macrocall $name="getprojectbyname" name=<> /> 
>
> 
> 
>
> I've often thought how handy it would be if you could get two outputs from 
> a list instead of just one. e.g. both and index and the index/name value. 
>
>
> On Monday, April 19, 2021 at 8:56:23 AM UTC-7 jn.pierr...@gmail.com wrote:
>
>> I have a structured json data tiddler name "projects", which looks like 
>> this:
>>
>> [ 
>>   { "project": "pleiade", "name": "Pléiade v5", "url": "http:
>> pleiade.test.acmeserver.com" },
>>   { "project": "rnvp", "name": "RNVP preprod", "url": "
>> https://rnvp.preprod.acmeserver.com; },
>>   { "project": "ars", "name": "application de réservation de salles", 
>> "url": "http://ars.test.acmeserver.com; }
>>  ]
>>
>> I want to show this a list sorted on the "name" field. This is the 
>> sorting part which I struggle to get, unsuccessfully.
>>
>> I have installed the jsonmangler plugin. I can't find a reherence doc 
>> though. With numerous tries, I've been able to get my list, but not sorted.
>>
>> I have this idea to constitute a list of tiddlers where each item is 
>> "name^index" where name is the name and index the index of each record. 
>> Then I wold sort the list and reduce it to the index part to get the sorted 
>> list of index which would enable me to achieve the display I want.
>>
>> But I cannot build this name-index list. I have the list of the names in 
>> the natural order and the list of numbers which are the natural indexes of 
>> the items. I can then get a list list like "t0 t1 t2 0 1 2". I can in fact 
>> be a little clever and build "t0 t1 t2 ^0; ^1; ^2;"  instead and then what 
>> I need is getting "t0 ^0; t1 ^1; t2 ^2;". This is the critical step I don't 
>> know how to do.
>>
>> (because from there I would join it in "t0^0;t1^1;t2^2;", split that 
>> along the ";" character and get the list of name^index I wish.)
>>
>> I know how to do it manually in the case of three records, like this:
>>
>> 
>> <$list variable="demo" filter="[enlist[t0 t1 t2]append[^0; ^1; 
>> ^2;]move:-2[^0;]move:-1[^1;]join[]split[;]!is[blank]]">
>> <>
>> 
>> 
>>
>> So the general idea would be to generate the part like 
>> "move:-2[^0;]move:-1[^1;]" from the number of records. That is beginning to 
>> be very complex for what that is, how common this seems to be to me. So 
>> surely there is a nicer way to do it.
>>
>> thanks in advance,
>>
>>

-- 
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/a51354e6-1b80-4199-a9fd-7f4c44fc6acan%40googlegroups.com.


[tw5] Re: Subfilter recursion

2021-04-19 Thread Jean-Pierre Rivière
About recursive macro, they may be possible, but the problem is how to stop 
the recursion. Your example works if there is no loop created by tagging.

The problem is we don't have a proper <> macro to decide what to do 
(control recursion call in that case). Or how do you do that?

Le dimanche 18 avril 2021 à 21:36:33 UTC+2, Soren Bjornstad a écrit :

> I've never tried to do a recursive* filter*, so I don't know what's 
> technically possible (though I've never seen someone try to use multiple 
> filter runs in *subfilter* and am a bit suspicious that the second run is 
> doing a tagging[] on everything in your wiki). But recursive macros are 
> easy and functional, and I suspect they'll work for your use case. Here's 
> one version that does an outline of the TOC on tiddlywiki.com, using the 
> current tiddler to easily pass the state through to the next level:
>
> \define recurse()
> <$list filter="[all[current]tagging[]]">
>   <>
>   <>
> 
> \end
>
> <$tiddler tiddler="TableOfContents">
>   
> <>
>   
> 
>
> On Sunday, April 18, 2021 at 2:01:51 PM UTC-5 Yaisog Bonegnasher wrote:
>
>> Hi,
>> I recently tried to create a recursive subfilter to find all tiddlers 
>> below a certain tag, no matter how many levels deep (similar to the *kin* 
>> filter, which  is too slow for my large wiki). Unfortunately, I was greeted 
>> with a red-message-box-of-death informing me of too much recursion. 
>> However, there should only be a couple of levels.
>> Are recursive filters at all possible or am I doing something wrong?
>> For a quick example, try this in a new tiddler on tiddlywiki.com:
>> \define subfilter-test() [tagging[]] [tagging[]subfilter]
>>
>> <$set name="test" filter="[[TableOfContents]subfilter]">
>>   <$list filter="=[enlist]" template="$:/core/ui/ListItemTemplate" 
>> />
>> 
>> Any enlightment is greatly appreciated.
>> Best regards
>> Yaisog
>>
>

-- 
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/8c52e9b8-e9a4-4682-9152-8ce19b5335aan%40googlegroups.com.


[tw5] sorting json data

2021-04-19 Thread Jean-Pierre Rivière
I have a structured json data tiddler name "projects", which looks like 
this:

[ 
  { "project": "pleiade", "name": "Pléiade v5", "url": 
"http:pleiade.test.acmeserver.com" },
  { "project": "rnvp", "name": "RNVP preprod", "url": 
"https://rnvp.preprod.acmeserver.com; },
  { "project": "ars", "name": "application de réservation de salles", 
"url": "http://ars.test.acmeserver.com; }
 ]

I want to show this a list sorted on the "name" field. This is the sorting 
part which I struggle to get, unsuccessfully.

I have installed the jsonmangler plugin. I can't find a reherence doc 
though. With numerous tries, I've been able to get my list, but not sorted.

I have this idea to constitute a list of tiddlers where each item is 
"name^index" where name is the name and index the index of each record. 
Then I wold sort the list and reduce it to the index part to get the sorted 
list of index which would enable me to achieve the display I want.

But I cannot build this name-index list. I have the list of the names in 
the natural order and the list of numbers which are the natural indexes of 
the items. I can then get a list list like "t0 t1 t2 0 1 2". I can in fact 
be a little clever and build "t0 t1 t2 ^0; ^1; ^2;"  instead and then what 
I need is getting "t0 ^0; t1 ^1; t2 ^2;". This is the critical step I don't 
know how to do.

(because from there I would join it in "t0^0;t1^1;t2^2;", split that along 
the ";" character and get the list of name^index I wish.)

I know how to do it manually in the case of three records, like this:


<$list variable="demo" filter="[enlist[t0 t1 t2]append[^0; ^1; 
^2;]move:-2[^0;]move:-1[^1;]join[]split[;]!is[blank]]">
<>



So the general idea would be to generate the part like 
"move:-2[^0;]move:-1[^1;]" from the number of records. That is beginning to 
be very complex for what that is, how common this seems to be to me. So 
surely there is a nicer way to do it.

thanks in advance,

-- 
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/67051567-db70-45fd-b838-6f9fe69a04cdn%40googlegroups.com.


[tw5] Re: feeding newline

2021-04-16 Thread Jean-Pierre Rivière
How stupid of me!!!

In fact I got "[[id:rnvp name:RNVP in url:https://rnvp.worki.ng/rnvp/ 
<https://rnvp.hp.in.phm.education.gouv.fr/rnvp-service/ui/>]]" within my 
text field in my wiki. The square brackets tell the true story. the newline 
works, but the fault is in the way I tried feeding it to my tiddler later 
on. confirmed with an <$action-log $$message=<> $$filter="id name 
url"/> that the newline are there indeed.

BTW my feeding was <$action-setfield $tiddler="$proto$" $field=text 
$value=<>/>

OK, closed thread.

Le vendredi 16 avril 2021 à 18:46:48 UTC+2, Jean-Pierre Rivière a écrit :

> doesn't seem to work witg tge join operator.
>
> My filter was:
>
> <$vars id={{!!id}} name={{!!name}} url={{!!url}} newline="
> ">
> <$set name=body filter="[[id:]addsuffix] [[name:]addsuffix] 
> [[url:]addsuffix] +[join]">
>
> I get a single line, not three.
> As for this code, well it was an early attempt. I'm converting it into 
> using several action-setffield instead.
> Le vendredi 16 avril 2021 à 18:03:01 UTC+2, Eric Shulman a écrit :
>
>> On Friday, April 16, 2021 at 8:28:56 AM UTC-7 jn.pierr...@gmail.com 
>> wrote:
>>
>>> But I can't add a newline character because there is no way I can code 
>>> it that I am aware.
>>>
>> So if you know how to summon newlines, please enlight me!
>>>
>>
>> Assign a literal newline to a variable.  Then you can add the variable to 
>> your text by using addsuffix within the filter syntax.
>> <$vars newline="
>> ">
>> <$set name="output" filter="[*...some filter operators...*
>> addsuffix]">
>> ...
>> 
>> 
>>
>> -e
>>
>

-- 
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/9a36814c-0ac5-4083-a375-93f206910cb0n%40googlegroups.com.


[tw5] Re: feeding newline

2021-04-16 Thread Jean-Pierre Rivière
doesn't seem to work witg tge join operator.

My filter was:

<$vars id={{!!id}} name={{!!name}} url={{!!url}} newline="
">
<$set name=body filter="[[id:]addsuffix] [[name:]addsuffix] 
[[url:]addsuffix] +[join]">

I get a single line, not three.
As for this code, well it was an early attempt. I'm converting it into 
using several action-setffield instead.
Le vendredi 16 avril 2021 à 18:03:01 UTC+2, Eric Shulman a écrit :

> On Friday, April 16, 2021 at 8:28:56 AM UTC-7 jn.pierr...@gmail.com wrote:
>
>> But I can't add a newline character because there is no way I can code it 
>> that I am aware.
>>
> So if you know how to summon newlines, please enlight me!
>>
>
> Assign a literal newline to a variable.  Then you can add the variable to 
> your text by using addsuffix within the filter syntax.
> <$vars newline="
> ">
> <$set name="output" filter="[*...some filter operators...*
> addsuffix]">
> ...
> 
> 
>
> -e
>

-- 
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/0a5e1830-1451-436a-a0da-de5de4a76fcen%40googlegroups.com.


[tw5] Re: feeding newline

2021-04-16 Thread Jean-Pierre Rivière
I had thought about using a variable but not seen any way to set that value 
to it. How clever of you! Many thanks again!

Le vendredi 16 avril 2021 à 18:03:01 UTC+2, Eric Shulman a écrit :

> On Friday, April 16, 2021 at 8:28:56 AM UTC-7 jn.pierr...@gmail.com wrote:
>
>> But I can't add a newline character because there is no way I can code it 
>> that I am aware.
>>
> So if you know how to summon newlines, please enlight me!
>>
>
> Assign a literal newline to a variable.  Then you can add the variable to 
> your text by using addsuffix within the filter syntax.
> <$vars newline="
> ">
> <$set name="output" filter="[*...some filter operators...*
> addsuffix]">
> ...
> 
> 
>
> -e
>

-- 
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/e937e2aa-592c-4abd-a2c9-5ab9b72a2f36n%40googlegroups.com.


[tw5] Re: \rules pragma

2021-04-16 Thread Jean-Pierre Rivière
Sorry for being late to thank you for your very interesting response. 
Things are clearer. It's enough to have an idea of the beast. this could be 
useful later on, and it's good to know that such things could be dno if 
need be.

Regards.

Le samedi 10 avril 2021 à 00:13:23 UTC+2, PMario a écrit :

> Hi,
> The names can also be seen at: 
> https://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FControlPanel%2FParsing
>
> WARNING: Be careful if you change settings there. It can brick your wiki!
> -m
>

-- 
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/5a59225f-c898-497f-8b22-bc04265f7c87n%40googlegroups.com.


[tw5] feeding newline

2021-04-16 Thread Jean-Pierre Rivière
With the edit-text widget, you can act on index within a dictionary, which 
is fine.
but with action-createtiddler, you can only create field, not indexed 
content. An option like "$useIndex=yes" would be cool to allow for getting 
indexes instead of fields.

but as for now, I need to write all my text by hand. And here I have not 
yet devised how to do this. I was thinking to create it with a set widget 
and a filter in which I wold get my index:data lines at the end of the 
process.

But I cbn't add a newline character because there is no way I can code it 
that I am aware.

So if you know how to summon newlines, please enlight me!

-- 
Jean-Pierre

-- 
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/fe523ed2-6554-4add-b295-646ce259e5dbn%40googlegroups.com.


  1   2   >