Re: [tw5] Re: [NOOB] need some help with filters OR instead of AND

2021-09-20 Thread Peter Dart
Thank you so much Charlie!
All working,
 I owe you a beer or two!.

if you are ever in Melbourne look me up :) (assuming we will get out of our
lockdown and current mess sometime soon)

just what i needed.


On Tue, 21 Sept 2021 at 02:04, Charlie Veniot  wrote:

> Just for conversation's sake, download the attached and drag it into
> tiddlywiki.com .
>
> On Monday, September 20, 2021 at 5:36:59 AM UTC-3 peterdart...@gmail.com
> wrote:
>
>> Thanks for the hints,
>> I am understanding more about TW5 and learning, but still no cigar.
>>
>> I will explain what i am trying to achieve it may make things easier
>> (feels like there will be a pre-canned solution out there). I have added a
>> fair amount of content to a wiki +80 pages, diagrams and tiddlymap all
>> working well, there are common tags that are reused to assist with
>> classification and content. I am was hoping to provide an interactive, easy
>> to use search page that lets the end readers narrow down the pages with a
>> combination of tags, it may take about 3 tags to find the pages you are
>> looking for, but could be more. I understand that i can do this in advance
>> search - just trying to make it easy for others with pulldowns, and no
>> typing...etc.
>>
>> I feel like i am getting closer, and have found the source of the
>> original macro i used, but still not the result i am looking for, looks
>> like the macro i found and tried to use is too old. (skip the rest of this
>> paragraph if you dont need the detail ). The example tagfilter() i found
>> and tried to implement looks like it was created a while ago as an example
>> by @tobibeer and may not actually have made it into the core (
>> http://tagfilter.tiddlyspot.com/). The online tagfilter shown in the
>> link does filter and work the way i wanted it to with AND logic, however
>> when i have added it to my wiki it works with OR. From reading comments in
>> github it looks like the changes to "tagging" that this macro used were not
>> actually added to core and it was superseded by the "contains:tags" filter
>> logic. I tried adding more of what is listed as dependencies in github for
>> the macro but ended up with lots of javascript errors and crash on startup,
>> (did manage to recover from backup) .
>>
>> In that old macro, i think this line that filters and displays the list
>> is  this one
>> [all[current]tags[]tagging:all[]]
>> where it is taking the list of tags that the user has selected ("current"
>> and have been added to a temp page) and finding all the tiddlers that
>> *some* contain the same tags, where i want it to contain *all* of the same
>> tags. From reading i need to replace that part with something that includes
>> "contains:" (maybe)
>>
>> What i am trying to achieve in English is.. "How do i find a list of all
>> pages that contain all the tags of the current temp page?"
>>
>> Once again thanks in advance,
>> Pete
>>
>>
>>
>> On Sunday, 19 September 2021 at 12:51:00 am UTC+10 cj.v...@gmail.com
>> wrote:
>>
>>> G'day Pete,
>>>
>>> Although that stretch of code is too big and complicated for me to wrap
>>> my mind around it, I've thrown two sample filters into TiddlyWiki.com's
>>> Advanced Search tiddler and did a couple of screen captures (attached),
>>> just to show the basics of setting up "and" vs "or".
>>>
>>>
>>>
>>> On Friday, September 17, 2021 at 5:59:34 AM UTC-3 peterdart...@gmail.com
>>> wrote:
>>>
 Hey Guys
 Apologies if this is a duplicate. This could be a simple answer but i
 have been looking at it for days and still not getting there.
 I am using a macro i found on the web called tagfilter
 ($:/.tb/macros/tagfilter), just had another look and i can't see where i
 got it from. Its pretty simple just pick a set of tags and then lookup the
 pages that match and display the list. I want to modify it so that it just
 returns the ones that have ALL of the tags picked rather than ANY.
 I think the line in the macro that is doing the filter is this

 <$list
 filter="[!is[system]sort[]]+[all[current]tags[]tagging:all[]]+[sort[]]-[all[current]]"
 template="$template$"/>

 I think its the "tagging" part that is picking up pages with ANY of the
 tags... question is what do i replace it with?

 This is the full macro incase i am misleading people on the line that
 is doing the filter

 \define lingo-base() $:/language/EditTemplate/

 \define
 tagfilter(filter:"[!is[system]sort[]]",state:"$:/temp/TagFilter",
 template:"$:/core/ui/ListItemTemplate")
 <$set name=state value="$state$">
 <$tiddler tiddler=<>>
 <$set name=tags filter="[all[current]tags[]]">
 <$set name="addtags" filter="
 $filter$
 +[all[current]tags[]tagging:all[]]
 -[all[current]]
 +[tags[]]
 -[all[current]tags[]]">

 <$fieldmangler>
 <$list filter="[all[current]tags[]sort[title]]" storyview="pop">
 <>
 

 <$reveal type=nomatch text="" de

[tw5] Re: Filter tiddlers with exactly one tag.

2021-09-20 Thread Charlie Veniot
G'day,

Give the attached tiddler a spin.  (Download and then drag the file into 
TiddlyWiki.com.)





On Monday, September 20, 2021 at 11:38:43 PM UTC-3 thor...@gmail.com wrote:

> I wish to filter tiddlers with a `technical_todo` tag into "tiddlers which 
> I have already tagged with _another_ tag", and "tiddlers which have yet to 
> be tagged with further tags".
>
> A filter like `[tag[technical_todo]]` will return all tiddlers with the 
> tag `technical_todo`, regardless of whether these tiddlers have additional 
> tags. I can always futher filter out tags using more steps with 
> `[!tag[foo]]` (and this is of course useful too).
>
> But for the sake of organizing "otherwise-untagged" tiddlers, is there a 
> shorthand to only output those tiddlers with _exactly_ the one tag I'm 
> requesting? Perhaps by counting the number of tags each output tiddler from 
> `[tag[technical_todo]]` can get me those with only a single 
> `technical_todo` tag?
>

-- 
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/8551ea8f-2cb3-4769-a93a-c7935d85b70en%40googlegroups.com.


FilterExample.json
Description: application/json


[tw5] Filter tiddlers with exactly one tag.

2021-09-20 Thread thor...@gmail.com
I wish to filter tiddlers with a `technical_todo` tag into "tiddlers which 
I have already tagged with _another_ tag", and "tiddlers which have yet to 
be tagged with further tags".

A filter like `[tag[technical_todo]]` will return all tiddlers with the tag 
`technical_todo`, regardless of whether these tiddlers have additional 
tags. I can always futher filter out tags using more steps with 
`[!tag[foo]]` (and this is of course useful too).

But for the sake of organizing "otherwise-untagged" tiddlers, is there a 
shorthand to only output those tiddlers with _exactly_ the one tag I'm 
requesting? Perhaps by counting the number of tags each output tiddler from 
`[tag[technical_todo]]` can get me those with only a single 
`technical_todo` tag?

-- 
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/e054b7d1-31af-494f-b71b-36fb69cc7714n%40googlegroups.com.


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 PMario
On Monday, September 20, 2021 at 11:15:14 AM UTC+2 PMario wrote:

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. 
>

The GitHub discussion is here. 
https://github.com/Jermolene/TiddlyWiki5/discussions/6059
-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/5c65d087-a671-40d7-a5a6-0baba0f88049n%40googlegroups.com.


[tw5] Re: [NOOB] need some help with filters OR instead of AND

2021-09-20 Thread Charlie Veniot
Just for conversation's sake, download the attached and drag it into 
tiddlywiki.com .

On Monday, September 20, 2021 at 5:36:59 AM UTC-3 peterdart...@gmail.com 
wrote:

> Thanks for the hints, 
> I am understanding more about TW5 and learning, but still no cigar.
>
> I will explain what i am trying to achieve it may make things easier 
> (feels like there will be a pre-canned solution out there). I have added a 
> fair amount of content to a wiki +80 pages, diagrams and tiddlymap all 
> working well, there are common tags that are reused to assist with 
> classification and content. I am was hoping to provide an interactive, easy 
> to use search page that lets the end readers narrow down the pages with a 
> combination of tags, it may take about 3 tags to find the pages you are 
> looking for, but could be more. I understand that i can do this in advance 
> search - just trying to make it easy for others with pulldowns, and no 
> typing...etc.
>
> I feel like i am getting closer, and have found the source of the original 
> macro i used, but still not the result i am looking for, looks like the 
> macro i found and tried to use is too old. (skip the rest of this paragraph 
> if you dont need the detail ). The example tagfilter() i found and tried to 
> implement looks like it was created a while ago as an example by @tobibeer 
> and may not actually have made it into the core (
> http://tagfilter.tiddlyspot.com/). The online tagfilter shown in the link 
> does filter and work the way i wanted it to with AND logic, however when i 
> have added it to my wiki it works with OR. From reading comments in github 
> it looks like the changes to "tagging" that this macro used were not 
> actually added to core and it was superseded by the "contains:tags" filter 
> logic. I tried adding more of what is listed as dependencies in github for 
> the macro but ended up with lots of javascript errors and crash on startup, 
> (did manage to recover from backup) .
>
> In that old macro, i think this line that filters and displays the list 
> is  this one
> [all[current]tags[]tagging:all[]]
> where it is taking the list of tags that the user has selected ("current" 
> and have been added to a temp page) and finding all the tiddlers that 
> *some* contain the same tags, where i want it to contain *all* of the same 
> tags. From reading i need to replace that part with something that includes 
> "contains:" (maybe) 
>
> What i am trying to achieve in English is.. "How do i find a list of all 
> pages that contain all the tags of the current temp page?"
>
> Once again thanks in advance,
> Pete
>
>
>
> On Sunday, 19 September 2021 at 12:51:00 am UTC+10 cj.v...@gmail.com 
> wrote:
>
>> G'day Pete,
>>
>> Although that stretch of code is too big and complicated for me to wrap 
>> my mind around it, I've thrown two sample filters into TiddlyWiki.com's 
>> Advanced Search tiddler and did a couple of screen captures (attached), 
>> just to show the basics of setting up "and" vs "or".
>>
>>
>>
>> On Friday, September 17, 2021 at 5:59:34 AM UTC-3 peterdart...@gmail.com 
>> wrote:
>>
>>> Hey Guys
>>> Apologies if this is a duplicate. This could be a simple answer but i 
>>> have been looking at it for days and still not getting there.
>>> I am using a macro i found on the web called tagfilter 
>>> ($:/.tb/macros/tagfilter), just had another look and i can't see where i 
>>> got it from. Its pretty simple just pick a set of tags and then lookup the 
>>> pages that match and display the list. I want to modify it so that it just 
>>> returns the ones that have ALL of the tags picked rather than ANY.
>>> I think the line in the macro that is doing the filter is this
>>>
>>> <$list 
>>> filter="[!is[system]sort[]]+[all[current]tags[]tagging:all[]]+[sort[]]-[all[current]]"
>>>  
>>> template="$template$"/>
>>>
>>> I think its the "tagging" part that is picking up pages with ANY of the 
>>> tags... question is what do i replace it with?
>>>
>>> This is the full macro incase i am misleading people on the line that is 
>>> doing the filter
>>>
>>> \define lingo-base() $:/language/EditTemplate/
>>>
>>> \define 
>>> tagfilter(filter:"[!is[system]sort[]]",state:"$:/temp/TagFilter", 
>>> template:"$:/core/ui/ListItemTemplate")
>>> <$set name=state value="$state$">
>>> <$tiddler tiddler=<>>
>>> <$set name=tags filter="[all[current]tags[]]">
>>> <$set name="addtags" filter="
>>> $filter$
>>> +[all[current]tags[]tagging:all[]]
>>> -[all[current]]
>>> +[tags[]]
>>> -[all[current]tags[]]">
>>>
>>> <$fieldmangler>
>>> <$list filter="[all[current]tags[]sort[title]]" storyview="pop">
>>> <>
>>> 
>>>
>>> <$reveal type=nomatch text="" default=<>>
>>> <$reveal type=match text="" default=<>>
>>> Filter by:
>>> 
>>> <$button popup=<> 
>>> class="tc-btn-invisible tc-btn-dropdown" 
>>> tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} 
>>> aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/new-button}}
>>> 
>>> <$reveal type=

[tw5] Re: How do I use a URL in a macro?

2021-09-20 Thread thor...@gmail.com
Thank you, your explanation it makes it very clear what's going on. Whoops 
:D!

> Either way, it's going to be "more typing" (but only a little).  Still, 
its less typing than the full `<$macrocall ...>` widget syntax.

In this case, I will be using the `<$macrocall ...>` syntax because I want 
to create a template tiddler using `tm-new-tiddler`. This template contains 
wikitext which field-transcludes a URL field. However, if I want to create 
a generic macro for links where I might want to specify the URL scheme, I 
know to watch out for my colons this time :D!


On Monday, September 20, 2021 at 8:35:52 AM UTC-4 Eric Shulman wrote:

> On Monday, September 20, 2021 at 12:35:18 AM UTC-7 thor...@gmail.com 
> wrote:
>
>> I can make the first method work by putting the URL in quotes, but I 
>> would like to avoid that in general because it's more typing :): 
>> `>`. Why are the quotes required? I 
>> thought macro expansion substituted text without treating the macro inputs 
>> as WikiText?
>>
>
> The `<>` syntax, in addition to handling 
> *unnamed* parameters, also recognizes *named* parameters, using 
> `name:value`.
> Thus, a value like `http://foo.org` is parsed as a parameter named 
> "http", with a value of "//foo.org".  By enclosing it in quotes, it 
> avoids the named parameter parsing and passes it into the macro as a single 
> parameter value
>
> So... you can use the quotes to bypass the parameter name parsing: 
> `>`
> or, you can add a parameter *name*, like this:  `< http://foo.org bar>>`.
>
> Either way, it's going to be "more typing" (but only a little).  Still, 
> its less typing than the full `<$macrocall ...>` widget syntax.
>
> -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/e26ed45a-4043-4fb1-8f15-36fb06780been%40googlegroups.com.


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

2021-09-20 Thread PMario
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/708b01cc-cd6f-487b-a1e5-b07536eafb7dn%40googlegroups.com.


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

2021-09-20 Thread PMario
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/68d67b77-9579-40ba-ba26-0025448b9024n%40googlegroups.com.


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

2021-09-20 Thread Charlie Veniot
Oops.  Nano because:

   - really easy to create syntax highlighting for any language (or for any 
   kind of text)
   - extremely light and agile
   - loads of reference resources for GNU nano (including videos)


On Monday, September 20, 2021 at 9:35:39 AM UTC-3 Charlie Veniot wrote:

> Thanks all for the ideas.
>
> None of those really do the trick for me, so I've decided to make GNU nano 
> my TiddlyWiki-syntax-highlighting editor until something better ever comes 
> along.   (Maybe I'll see what I'm missing if and when I can view some 
> videos of those.)
>
>- really easy to create syntax highlighting for any language (or any 
>kind of text)
>- extremely light and agile
>- loads of reference resources for GNU nano (including videos)
>
> I'll do a demo video of the end-ish results once I'm done setting up 
> highlighting for TiddlyWiki widgets.
> On Monday, September 20, 2021 at 7:51:10 AM UTC-3 jn.pierr...@gmail.com 
> wrote:
>
>> 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/9bcb438e-2233-4c7c-960a-5194389c50a4n%40googlegroups.com.


[tw5] Re: How do I use a URL in a macro?

2021-09-20 Thread Eric Shulman
On Monday, September 20, 2021 at 12:35:18 AM UTC-7 thor...@gmail.com wrote:

> I can make the first method work by putting the URL in quotes, but I would 
> like to avoid that in general because it's more typing :): `< http://foo.org"; bar>>`. Why are the quotes required? I thought macro 
> expansion substituted text without treating the macro inputs as WikiText?
>

The `<>` syntax, in addition to handling 
*unnamed* parameters, also recognizes *named* parameters, using 
`name:value`.
Thus, a value like `http://foo.org` is parsed as a parameter named "http", 
with a value of "//foo.org".  By enclosing it in quotes, it avoids the 
named parameter parsing and passes it into the macro as a single parameter 
value

So... you can use the quotes to bypass the parameter name parsing: 
`>`
or, you can add a parameter *name*, like this:  `>`.

Either way, it's going to be "more typing" (but only a little).  Still, its 
less typing than the full `<$macrocall ...>` widget syntax.

-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/961a4043-498c-47ac-a2d2-1bb5eef6ab85n%40googlegroups.com.


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

2021-09-20 Thread Charlie Veniot
Thanks all for the ideas.

None of those really do the trick for me, so I've decided to make GNU nano 
my TiddlyWiki-syntax-highlighting editor until something better ever comes 
along.   (Maybe I'll see what I'm missing if and when I can view some 
videos of those.)

   - really easy to create syntax highlighting for any language (or any 
   kind of text)
   - extremely light and agile
   - loads of reference resources for GNU nano (including videos)

I'll do a demo video of the end-ish results once I'm done setting up 
highlighting for TiddlyWiki widgets.
On Monday, September 20, 2021 at 7:51:10 AM UTC-3 jn.pierr...@gmail.com 
wrote:

> 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/5c16197e-ee05-43d2-bb02-e9d3121b758dn%40googlegroups.com.


[tw5] Re: 3D file preview?

2021-09-20 Thread Alex Davies
I'm afraid I haven't had any time to really work on this, and I don't 
anticipate getting more free time until after Christmas.

On Sunday, September 19, 2021 at 6:46:56 PM UTC-3 Ste wrote:

> Did you make any progress on this Alex? 
>
> On Tuesday, August 24, 2021 at 4:44:57 PM UTC+1 Alex Davies wrote:
>
>> With the lazy-load tiddler on node-js supporting larger collections of 
>> files it seems like a potentially very useful tool.
>>
>> On Wednesday, August 11, 2021 at 7:40:38 PM UTC-3 joshua@gmail.com 
>> wrote:
>>
>>> Including 3d files in a wiki is a really neat idea. Man, I wish I had 
>>> more time. Replaying so I can find the thread later. ;)
>>>
>>> Best,
>>>
>>> Joshua Fontany
>>>
>>> On Wednesday, August 11, 2021 at 3:58:15 AM UTC-7 Ste wrote:
>>>
 There is also this as part of the plugin:


 http://rboue.tiddlyspot.com/#%24%3A%2Fplugins%2Frboue%2FThree.js%2FLib%2FLoaders%2FSTLLoader.js

 On Tuesday, 10 August 2021 at 21:15:56 UTC+1 Alex Davies wrote:

> There there needs to be what, a display widget and and a parser?
>
> On Tuesday, August 10, 2021 at 1:57:39 PM UTC-3 Ste wrote:
>
>> There is this :
>> http://rboue.tiddlyspot.com/#Three.js%2Fintroduction 
>>
>> Which has, I think, the ability to display STL files. 
>> It's been on my to do list to look at and have a go but... 
>>
>>
>>
>> On Tuesday, 10 August 2021 at 16:30:00 UTC+1 Alex Davies wrote:
>>
>>> I'd really like to be able to include STL files in my tiddlywiki, 
>>> but actually supporting a new file type is a bit beyond me. It seems 
>>> like 
>>> it would be entirely doable using threejs, but a bit more challenging 
>>> to 
>>> make it happen "automatically" so that tiddlywiki doesn't try to show 
>>> me 
>>> several MB text files.
>>>
>>> Any thoughts on how that could be accomplished? Something to do with 
>>> mime type detection?
>>>
>>

-- 
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/a1176656-a41a-481f-9865-b8ace6694e36n%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.


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

2021-09-20 Thread PMario
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/473272e1-5d24-4f1a-98d6-2be23f4016ben%40googlegroups.com.


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

2021-09-20 Thread TiddlyTweeter

>
> *TT: You forgot to mention your own Custom Markup* that can do highlights 
>> easy already and more :-)
>
>
> PM: ... Hmmm, It's built for a different usecase. It can do highlights for 
> the rendered output. ... The OP is for editor highlighting.
>

Ciao PMario 

*My bad*. For not fully understanding* cj.v's* OP!

That said, I thought your post both addressed *cj.v's *issues and the 
broader issue of general markup parsing well. I do appreciate such good* 
orientation* posts!

Issues arising ...

   1 - Right. Code-Mirror is the bees-knees for the programmatic mind :-)

   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? 

Best wishes
TT

-- 
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/57ab0590-e0ca-45cf-aa08-5ed99e97190dn%40googlegroups.com.


[tw5] Re: [NOOB] need some help with filters OR instead of AND

2021-09-20 Thread Peter Dart
Thanks for the hints, 
I am understanding more about TW5 and learning, but still no cigar.

I will explain what i am trying to achieve it may make things easier (feels 
like there will be a pre-canned solution out there). I have added a fair 
amount of content to a wiki +80 pages, diagrams and tiddlymap all working 
well, there are common tags that are reused to assist with classification 
and content. I am was hoping to provide an interactive, easy to use search 
page that lets the end readers narrow down the pages with a combination of 
tags, it may take about 3 tags to find the pages you are looking for, but 
could be more. I understand that i can do this in advance search - just 
trying to make it easy for others with pulldowns, and no typing...etc.

I feel like i am getting closer, and have found the source of the original 
macro i used, but still not the result i am looking for, looks like the 
macro i found and tried to use is too old. (skip the rest of this paragraph 
if you dont need the detail ). The example tagfilter() i found and tried to 
implement looks like it was created a while ago as an example by @tobibeer 
and may not actually have made it into the core 
(http://tagfilter.tiddlyspot.com/). The online tagfilter shown in the link 
does filter and work the way i wanted it to with AND logic, however when i 
have added it to my wiki it works with OR. From reading comments in github 
it looks like the changes to "tagging" that this macro used were not 
actually added to core and it was superseded by the "contains:tags" filter 
logic. I tried adding more of what is listed as dependencies in github for 
the macro but ended up with lots of javascript errors and crash on startup, 
(did manage to recover from backup) .

In that old macro, i think this line that filters and displays the list is  
this one
[all[current]tags[]tagging:all[]]
where it is taking the list of tags that the user has selected ("current" 
and have been added to a temp page) and finding all the tiddlers that 
*some* contain the same tags, where i want it to contain *all* of the same 
tags. From reading i need to replace that part with something that includes 
"contains:" (maybe) 

What i am trying to achieve in English is.. "How do i find a list of all 
pages that contain all the tags of the current temp page?"

Once again thanks in advance,
Pete



On Sunday, 19 September 2021 at 12:51:00 am UTC+10 cj.v...@gmail.com wrote:

> G'day Pete,
>
> Although that stretch of code is too big and complicated for me to wrap my 
> mind around it, I've thrown two sample filters into TiddlyWiki.com's 
> Advanced Search tiddler and did a couple of screen captures (attached), 
> just to show the basics of setting up "and" vs "or".
>
>
>
> On Friday, September 17, 2021 at 5:59:34 AM UTC-3 peterdart...@gmail.com 
> wrote:
>
>> Hey Guys
>> Apologies if this is a duplicate. This could be a simple answer but i 
>> have been looking at it for days and still not getting there.
>> I am using a macro i found on the web called tagfilter 
>> ($:/.tb/macros/tagfilter), just had another look and i can't see where i 
>> got it from. Its pretty simple just pick a set of tags and then lookup the 
>> pages that match and display the list. I want to modify it so that it just 
>> returns the ones that have ALL of the tags picked rather than ANY.
>> I think the line in the macro that is doing the filter is this
>>
>> <$list 
>> filter="[!is[system]sort[]]+[all[current]tags[]tagging:all[]]+[sort[]]-[all[current]]"
>>  
>> template="$template$"/>
>>
>> I think its the "tagging" part that is picking up pages with ANY of the 
>> tags... question is what do i replace it with?
>>
>> This is the full macro incase i am misleading people on the line that is 
>> doing the filter
>>
>> \define lingo-base() $:/language/EditTemplate/
>>
>> \define tagfilter(filter:"[!is[system]sort[]]",state:"$:/temp/TagFilter", 
>> template:"$:/core/ui/ListItemTemplate")
>> <$set name=state value="$state$">
>> <$tiddler tiddler=<>>
>> <$set name=tags filter="[all[current]tags[]]">
>> <$set name="addtags" filter="
>> $filter$
>> +[all[current]tags[]tagging:all[]]
>> -[all[current]]
>> +[tags[]]
>> -[all[current]tags[]]">
>>
>> <$fieldmangler>
>> <$list filter="[all[current]tags[]sort[title]]" storyview="pop">
>> <>
>> 
>>
>> <$reveal type=nomatch text="" default=<>>
>> <$reveal type=match text="" default=<>>
>> Filter by:
>> 
>> <$button popup=<> 
>> class="tc-btn-invisible tc-btn-dropdown" 
>> tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} 
>> aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/new-button}}
>> 
>> <$reveal type=match text="" default=<>>
>> Filter by:
>> <$button popup=<> 
>> class="tc-btn-invisible tc-btn-dropdown" 
>> tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} 
>> aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/new-button}}
>> 
>>
>> 
>> <$reveal state=<> 
>> type="nomatch" text="" default

[tw5] How do I use a URL in a macro?

2021-09-20 Thread thor...@gmail.com
Hello all,

I'm having trouble understanding why a simple macro I wrote doesn't work 
properly:

```
\define todoLink(url, name:"Link")
$name$
\end
```

If I use `>` to call my shiny new macro, the 
first parameter seems to be completely ignored:

`Link`

On the other hand, if I use the `<$macrocall>` syntax, like `<$macrocall 
$name="todoLink" url="http://foo.org"; name="bar"/>`, I get the expected 
behavior.

http://foo.org"; class="tc-tiddlylink-external" target="_blank" 
rel="noopener noreferrer">bar

Ultimately, I'll be using this macro in tiddlers with a `url` field, so I 
_think I'll have to use the `<$macrocall>` syntax. But I feel like this 
behavior will bite me in the future. Why does first method of calling the 
macro produce incorrect output, and why does the second work?

I can make the first method work by putting the URL in quotes, but I would 
like to avoid that in general because it's more typing :): `>`. Why are the quotes required? I thought macro 
expansion substituted text without treating the macro inputs as WikiText?

My browser is Opera 78.0.4093.184 on Windows 10, and my TiddlyWiki version 
is 5.1.21. Thanks for any 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/e1a1581a-cc14-4f80-81a5-7cb8771fce51n%40googlegroups.com.