[tw5] Re: [TW5] Secondary sort in Sortable Tables

2019-03-31 Thread Mohammad
S.S,
 What does each operator do here?

On Monday, April 1, 2019 at 6:17:31 AM UTC+4:30, S. S. wrote:
>
> Give this a try:
>
> 
> <$list filter="[tag[Ebook]has[vendor]each[vendor]get[vendor]sort[]]">
> <$list filter="[tag[Ebook]has[vendor]field:vendor
> sort[author]]">
> 
>   
> //<$link to={{!!title}}><$view field="title"/>//
>   
>   
> <$view field='author'/>
>   
>   
> <$view field='vendor'/>
>   
> 
> 
> 
> 
>
>
> Edited to fix one tag from book  to  Ebook  .
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/66cab52c-757c-4b26-9b5e-3e491cb98ed3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: [TW5] Secondary sort in Sortable Tables

2019-03-31 Thread Mohammad
Added to TW-Scripts

On Monday, April 1, 2019 at 6:17:31 AM UTC+4:30, S. S. wrote:
>
> Give this a try:
>
> 
> <$list filter="[tag[Ebook]has[vendor]each[vendor]get[vendor]sort[]]">
> <$list filter="[tag[Ebook]has[vendor]field:vendor
> sort[author]]">
> 
>   
> //<$link to={{!!title}}><$view field="title"/>//
>   
>   
> <$view field='author'/>
>   
>   
> <$view field='vendor'/>
>   
> 
> 
> 
> 
>
>
> Edited to fix one tag from book  to  Ebook  .
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c49e6d03-6618-4512-b4a3-74e1399ac268%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread Mohammad
Hi Tony,
 Have a look at 
https://stackoverflow.com/questions/17930267/what-is-the-difference-between-syntax-and-semantics-of-programming-languages
and also Wikipewdia but in short!
Semantics is about the *meaning* of the sentence. It answers the questions: 
is this sentence valid? If so, what does the sentence mean?

For example I prefer the first piece of code below which create an aside


1.

  Epcot Center
  The Epcot Center is a theme park in Disney World, Florida.



2.

  Epcot Center
  The Epcot Center is a theme park in Disney World, Florida.


Solution one is much more meaningful, easier to understand and easier to 
maintain, while both solutions are syntactically correct!

Other resources: [[https://www.webopedia.com/TERM/S/semantics.html]]

In linguistics, semantics is the study of meanings. In computer science 
, the term is 
frequently used to differentiate the meaning of an instruction 
 from its format 
. The format, which covers 
the spelling of language  
components 
and the rules controlling how components are combined, is called the 
language's *syntax* . For 
example, if you misspell a command 
, it is a syntax error. If, 
on the other hand, you enter a legal command that does not make any sense 
in the current context, it is a semantic error.

--Mohammad



On Monday, April 1, 2019 at 2:39:54 AM UTC+4:30, TonyM wrote:
>
> Mohammad,
>
> you and others are often referring to symantic, can you share a definition 
> if possible. The term clashes in my mind with philosophy and natural 
> languages use of the word.
>
> Thanks
> Tony
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/05c6d09b-b4b4-45da-869f-a5f6661d2b9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] TiddlyIE broken in 5.1.19?

2019-03-31 Thread andrewg_oz
Hi Jeremy,

I loaded my 5.1.13 and tested "window.TiddlyIE" in the console. I got 
"[object] { }". Then I tried the same using a freshly-downloaded empty 
5.1.19 and got the same "[object] { }".

However, if I disable the add-on, then "window.TiddlyIE" becomes 
"undefined". It might simply be disabled for you.

I've been able to set a breakpoint in both 5.1.13 and 5.1.19 at the line in 
"tiddlyie.js" that is "window.TiddlyIE.save(pathname, text);" (i.e. the 
point where the error occurs) to see what pathname and text looked like. 
They looked OK in both cases, but it appears the text must be processed by 
the save function quite a bit (backslash processing at least), and 5.1.13 
and 5.1.19 are radically different and trying to compare the two wasn't 
practical.

Are the empty.html files of previous versions archived anywhere?

Regards,
Andrew Gregory


On Friday, 29 March 2019 17:38:47 UTC+8, Jeremy Ruston wrote:
>
> Hi Andrew
>
> I’m not aware of any problems with TiddlyIE, but equally I’ve no idea how 
> many people are using it these days. If it is broken in v5.1.19 then I 
> think it must be a bug.
>
> I tried installing TiddlyIE in a Windows 10 virtual machine but I found 
> that it doesn’t appear to be visible to TiddlyWiki. In particular, if I 
> open a local TiddlyWiki HTML file and open the browser developer console 
> with F12, and then type “window.TiddlyIE” in the JavaScript console the 
> result is “undefined”.
>
> It would be interesting to see if the same is true with your 5.1.13 wiki; 
> could you try?
>
> Many thanks,
>
> Jeremy
>
>
>
>
> On 29 Mar 2019, at 09:16, andrewg_oz > 
> wrote:
>
> Hi,
>
> I can't save using TiddlyIE after upgrading from 5.1.13 to 5.1.19.
>
> The upgrade appears to be successful. After closing and opening the 
> upgraded TW, I click save - and get an immediate "Internal JavaScript 
> Error, The data is invalid." The "Save As" dialog is not shown.
>
> Call stack shows:
> Error
>at TiddlyIESaver.prototype.save (eval code:40:3)
>at SaverHandler.prototype.saveWiki (eval code:175:3)
>at Anonymous function (eval code:91:4)
>at eventListeners[type] (eval code:399:4)
>at Widget.prototype.dispatchEvent (eval code:412:3)
>at Widget.prototype.dispatchEvent (eval code:418:3)
>at Widget.prototype.dispatchEvent (eval code:418:3)
>at Widget.prototype.dispatchEvent (eval code:418:3)
>at Widget.prototype.dispatchEvent (eval code:418:3)
>at Widget.prototype.dispatchEvent (eval code:418:3)"
>
> Line 40 looks like "window.TiddlyIE.save(pathname, text);"
>
> Everything else seems fine except that the contents of text boxes (e.g. 
> when editing tiddlers, the ControlPanel field where you enter Default 
> tiddlers, etc) are unstyled.
>
> I've tried the upgrade using both IE and Chrome - saving the resulting TW 
> with IE is the same regardless.
>
> TiddlyIE also can't save the plain "empty" TW downloaded from the website, 
> so that eliminates anything funny in my TW.
>
> Is this just me, or is TiddlyIE broken for anyone else? I have no real 
> reason to upgrade apart from that being a good idea in general, so I'm 
> happy with 5.1.13 for now.
>
> Cheers,
> Andrew
>
> -- 
> 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 tiddl...@googlegroups.com .
> To post to this group, send email to tiddl...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/12178c7e-9cb0-487f-ba10-a8d447378199%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0a64daca-a3e0-4c1d-b981-c3dcc0a8d1b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: [TW5] Secondary sort in Sortable Tables

2019-03-31 Thread S. S.
Give this a try:


<$list filter="[tag[Ebook]has[vendor]each[vendor]get[vendor]sort[]]">
<$list filter="[tag[book]has[vendor]field:vendor
sort[author]]">

  
//<$link to={{!!title}}><$view field="title"/>//
  
  
<$view field='author'/>
  
  
<$view field='vendor'/>
  





-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/72058ed2-ad79-40c1-887f-de46ee7c0784%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: [TW5] Secondary sort in Sortable Tables

2019-03-31 Thread michaelharrison619
No, unfortunately that has removed all content except the authors. Guess I 
will have to keep playing around with it.

Thank you for suggesting the get operator. Can you think of anything else 
that might work?

Thank you.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a134fce5-6fec-46c0-b996-b85a3d0bc657%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Updating from of node TW 17 to 19 not working?

2019-03-31 Thread Dave
Hi, I just tried 

sudo npm update -g tiddlywiki


from a version 5.1.18, but nothing seemed to happen, i.e. no feedback in 
the terminal (but there was a 1-2 seconds pause).  

I'm on Bob 1.2.2r2.  I tried looking for a big file called something like 
"$__core.tid", but didn't find it.  Is it maybe a server problem and I 
should just try again later?


thanks,
- Dave

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/34d7de29-53f8-434b-b848-3d59a513fb5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: [TW5] Secondary sort in Sortable Tables

2019-03-31 Thread S. S.
I had imagined that changing the first line of the macro to the below might 
have done it.
But I may be very mistaken.
[tag[EBook]has[vendor]get[author]$(SortType)$sort{!!sort_by}]
I have not used the *get* operator before, so this may be very incorrect 
help.
Sorry.




On Monday, April 1, 2019 at 6:56:24 AM UTC+7, michaelha...@gmail.com wrote:
>
> S. S.,
>
> I apologize for being a clod, but I am afraid I don't see how I would be 
> able to implement the get operator in the above table. 
>
> Would you be able to explain how I would use the operator properly? From 
> what I understand, I would not have thought it would work with the sortable 
> table.
>
> Thank you.
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/51208731-969b-4a6d-9837-3129eb59e028%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: [TW5] Secondary sort in Sortable Tables

2019-03-31 Thread michaelharrison619
S. S.,

I apologize for being a clod, but I am afraid I don't see how I would be 
able to implement the get operator in the above table. 

Would you be able to explain how I would use the operator properly? From 
what I understand, I would not have thought it would work with the sortable 
table.

Thank you.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8d823d9d-1a7b-4ecb-b7f4-a8a3741ba5e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: [TW5] Secondary sort in Sortable Tables

2019-03-31 Thread S. S.
Huw asked a similar question just yesterday, and who else but Jed had the 
answer.
Filter list by tag but sort by and show value of field 

Hope that helps.
Cheers


-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/662a44ab-493a-44bd-acc0-659deae9d673%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: In TiddlyWiki (5) my macro works in tiddlers, except when appearing as sidebar

2019-03-31 Thread icqol . secretary

Thanks!!! That's what I needed to know!!

On Sunday, March 31, 2019 at 8:44:15 AM UTC+9, TonyM wrote:
>
>  tiddlers in the sidebar do not have the current tiddler set.
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/785ff8fd-73a1-4d50-afa5-7e5c4f7a53a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread TonyM
Mohammad,

you and others are often referring to symantic, can you share a definition if 
possible. The term clashes in my mind with philosophy and natural languages use 
of the word.

Thanks
Tony

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1559e292-177b-4a9f-b8b0-e1f05d90ea1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] [TW5] Secondary sort in Sortable Tables

2019-03-31 Thread michaelharrison619
Hello, I have been using Jed McCarty's code for clickable table column 
headers to create sortable tables.

I recently put together a table to keep track of my various ebooks and from 
whih vendor I purchased them. See code below.

\define SortableFilters()
[tag[EBook]has[vendor]$(SortType)$sort{!!sort_by}]
\end

\define ToggleDirection()
<$list filter='[sort_type[!]]' 
emptyMessage="""<$action-setfield 
sort_type='!'/>""">
<$action-setfield sort_type=''/>

\end

<$set name=SortType filter='[get[sort_type]]'>


  
<$button class='tc-btn-invisible' style='width:100%;height:100%'>
  Title
  <$action-setfield sort_by='title'/>
<>

  
  
<$button class='tc-btn-invisible' style='width:100%;height:100%'>
  Author
  <$action-setfield sort_by='author'/>
<>

  
  
<$button class='tc-btn-invisible' style='width:100%;height:100%'>
  Vendor
  <$action-setfield sort_by='vendor'/>
<>

  

<$list filter=<>>

  
//<$link to={{!!title}}><$view field="title"/>//
  
  
<$view field='author'/>
  
  
<$view field='vendor'/>
  





I have noticed that, after sorting the table by a column, the secondary 
sort is always by title. So if I sort the list by vendor, the books are 
listed within that sort alphabetically. As this is a library index, it 
would be more appropriate if I could have the secondary sort default to the 
author field, rather than the tiddler titles. 


Is there any way I might be able to change the behavior of the table, so 
that it will sort by a specific field rather than the title, after I have 
used the proper sort_by?

Any suggestions would be very much appreciated.

Thank you.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c3b2526e-d7c8-41cd-8d88-965abf30312b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] How to use the $set widget properly with a "not missing" and "empty" filter?

2019-03-31 Thread Mohammad
Hi Eric,
 Excellent as always!

Best
Mohammad

On Sunday, March 31, 2019 at 9:47:42 PM UTC+4:30, Eric Shulman wrote:
>
> On Sunday, March 31, 2019 at 7:46:22 AM UTC-7, Jeremy Ruston wrote:
>>
>> Perhaps it would be clearer expressed as a series of examples...
>>
>
> Here's my take on examples plus a little bit of re-arranging and editing 
> of Jeremy's descriptions...
>  
>
>> 1. If the "tiddler" attribute is present, get the text of the tiddler, or 
>> the 
>> value of the "emptyValue" attribute if the text field is blank or missing
>>
> <$set name="myvar" tiddler="SomeTiddler" emptyValue="sometext">
>  
>
>> 1a. If the "subtiddler" attribute is present, get the text of the 
>> subtiddler from the specified tiddler, or the value of the "emptyValue" 
>> attribute if the subtiddler text is blank or missing
>>
> <$set name="myvar" tiddler="SomeTiddler" subtiddler="SomeSubTiddler" 
> emptyValue="sometext">
>
> 1b. If the "field" attribute is present, get the value of that field, or 
>> the value of the "emptyValue" attribute if the field is blank or missing
>
> <$set name="myvar" tiddler="SomeTiddler" field="somefield" 
> emptyValue="sometext">
>
> 1c. If the "index" attribute is present, get the value of the specified 
>> index, or the value of the "emptyValue" attribute if the index is blank 
>> or missing
>>
> <$set name="myvar" tiddler="SomeTiddler" index="somefield" 
> emptyValue="sometext">
>  
>
>> 2. If the "filter" attribute is present and not blank, return the entire 
>> filter results using double square brackets quoting around any results that 
>> include spaces
>>
> <$set name="myvar" filter="[somefilter[]]">
>  
>
>> 2a. If both the "filter" attribute and the "value" attribute are present 
>> and the filter results are not empty, return the value of the "value" 
>> attribute, otherwise return blank
>>
> <$set name="myvar" filter="[somefilter[]]" value="somevalue">
>  
>
>> 2b. If both the "filter" attribute and the "emptyValue" attribute are 
>> present, return the entire filter results using double square brackets 
>> quoting around any results that include spaces, or the value of the 
>> "emptyValue" attribute if the result is empty
>>
> <$set name="myvar" filter="[somefilter[]]" emptyValue="sometext">
>  
>
>> 2c. If the "filter" attribute, the "value" attribute, and the 
>> "emptyValue" attribute are present, return the value of the "value" 
>> attribute, or the value of the "emptyValue" attribute if the result is 
>> empty
>>
> <$set name="myvar" filter="[somefilter[]]" value="somevalue" 
> emptyValue="sometext">
>  
>
>> 2d. If both the "filter" attribute and the "select" attribute are present 
>> and the "select" attribute is a valid number "N", return the "Nth" 
>> result from the filter
>>
> <$set name="myvar" filter="[somefilter[]]" select="3">
>  
>
>> 3. If neither the "tiddler" or "filter" attributes are provided, return 
>> the value of the "value" attribute, or the value of the "emptyValue" 
>> attribute if the "value" attribute is blank or missing
>>
> <$set name="myvar" value="somevalue" emptyValue="sometext">
>
> -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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2dc35db1-d045-4050-bd39-f3ddaff4563d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] How to use the $set widget properly with a "not missing" and "empty" filter?

2019-03-31 Thread Eric Shulman
On Sunday, March 31, 2019 at 7:46:22 AM UTC-7, Jeremy Ruston wrote:
>
> Perhaps it would be clearer expressed as a series of examples...
>

Here's my take on examples plus a little bit of re-arranging and editing of 
Jeremy's descriptions...
 

> 1. If the "tiddler" attribute is present, get the text of the tiddler, or the 
> value of the "emptyValue" attribute if the text field is blank or missing
>
<$set name="myvar" tiddler="SomeTiddler" emptyValue="sometext">
 

> 1a. If the "subtiddler" attribute is present, get the text of the 
> subtiddler from the specified tiddler, or the value of the "emptyValue" 
> attribute if the subtiddler text is blank or missing
>
<$set name="myvar" tiddler="SomeTiddler" subtiddler="SomeSubTiddler" 
emptyValue="sometext">

1b. If the "field" attribute is present, get the value of that field, or 
> the value of the "emptyValue" attribute if the field is blank or missing

<$set name="myvar" tiddler="SomeTiddler" field="somefield" 
emptyValue="sometext">

1c. If the "index" attribute is present, get the value of the specified 
> index, or the value of the "emptyValue" attribute if the index is blank 
> or missing
>
<$set name="myvar" tiddler="SomeTiddler" index="somefield" 
emptyValue="sometext">
 

> 2. If the "filter" attribute is present and not blank, return the entire 
> filter results using double square brackets quoting around any results that 
> include spaces
>
<$set name="myvar" filter="[somefilter[]]">
 

> 2a. If both the "filter" attribute and the "value" attribute are present 
> and the filter results are not empty, return the value of the "value" 
> attribute, otherwise return blank
>
<$set name="myvar" filter="[somefilter[]]" value="somevalue">
 

> 2b. If both the "filter" attribute and the "emptyValue" attribute are 
> present, return the entire filter results using double square brackets 
> quoting around any results that include spaces, or the value of the 
> "emptyValue" attribute if the result is empty
>
<$set name="myvar" filter="[somefilter[]]" emptyValue="sometext">
 

> 2c. If the "filter" attribute, the "value" attribute, and the "emptyValue" 
> attribute are present, return the value of the "value" attribute, or the 
> value of the "emptyValue" attribute if the result is empty
>
<$set name="myvar" filter="[somefilter[]]" value="somevalue" 
emptyValue="sometext">
 

> 2d. If both the "filter" attribute and the "select" attribute are present 
> and the "select" attribute is a valid number "N", return the "Nth" result 
> from the filter
>
<$set name="myvar" filter="[somefilter[]]" select="3">
 

> 3. If neither the "tiddler" or "filter" attributes are provided, return 
> the value of the "value" attribute, or the value of the "emptyValue" 
> attribute if the "value" attribute is blank or missing
>
<$set name="myvar" value="somevalue" emptyValue="sometext">

-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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/971424d3-11d6-4a33-ac83-8b07a53cdc86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Tiddlywiki on Node.js: Backup

2019-03-31 Thread Mohammad
Hi RA,
 Actually I am using TW on Node.js on a Windows machine and I like to have 
a backup of the tiddlers I change!

--Mohammad

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/de1f7a6d-29b6-462b-a97c-e500fe3c5ae4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Tiddlywiki on Node.js: Backup

2019-03-31 Thread RA
I use syncthing  to propagate my wiki folder from 
server to 2 workstations. It comes with file versioning functionality. I'm 
not familiar with Tiddlydesktop not Timimi, but I'm guessing that's what 
you are looking for?


On Friday, March 29, 2019 at 10:25:49 PM UTC-7, Mohammad wrote:
>
> This may be a redundant question:
>  Working with Tiddlywiki on Node.js, on every change a Saving action is 
> triggered, but the modified tiddler is overwrite!
> As I used to work with Tiddlydesktop and Timimi, I can create backups or 
> save on demand!
>
> is there any way to have backup or save on demand when working on Node.js?
>
> --Mohammad
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/836a1263-0025-46db-901b-26efc8b7ea2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: How to use the $set widget properly with a "not missing" and "empty" filter?

2019-03-31 Thread Mohammad
Hi S.S.,
 If you add the Jeremy explanation to your documentation project, I 
appreciate to update us here!

Thank you

On Sunday, March 31, 2019 at 1:29:14 AM UTC+4:30, S. S. wrote:
>
>
> I found a solution here: [TW5] Using conditional assignment mode of 
> SetWidget to check empty strings 
> 
>
> Either of the below work, and I chose the former.
> filter="[enlist[$tiddler$]]"
>  filter=" $tiddler$"
>
> Regards
>
>
> On Saturday, March 30, 2019 at 11:17:57 PM UTC+7, S. S. wrote:
>>
>> Within a macro, I am trying to determine if a parameter is empty, and 
>> then set a variable based on knowing that it is empty.
>>
>> I came across the Google Group post from a last month: Check the Blank 
>> Macro parameter 
>> 
>> \define mm(newField)
>> <$list filter="[<__newField__>] -[[]]">
>>
>> Do my job!
>> 
>> \end
>>
>>
>> <>
>>
>> So I tried using something based on that. Pasting the below into a new 
>> tiddler on tiddlywiki.com shows the issue:
>>
>> \define test(tiddler)
>> <$set name="result" filter="[[$tiddler$]] -[[]]" value="Why is this 
>> variable set when the filter ''is not missing'' and ''it's empty''?">
>>
>> The description of the ''value'' attribute of the `$set` widget says: The 
>> value to assign to the variable if the filter is missing or ''//not 
>> empty//''
>>
>> tiddler=$tiddler$  
>>
>> result=<>
>>
>> <$list filter="[[$tiddler$]] -[[]]" emptyMessage="See, the filter shows 
>> it's Empty">
>> 
>> 
>> \end
>>
>> <>
>>
>>
>> I don't understand where I've gone wrong. I'd appreciate some advice.
>> 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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d92f5b0b-aeff-4655-836c-944fad71784b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] How to use the $set widget properly with a "not missing" and "empty" filter?

2019-03-31 Thread Mohammad
Added to TW-Scripts

On Sunday, March 31, 2019 at 7:16:22 PM UTC+4:30, Jeremy Ruston wrote:
>
> Hi SS
>
> The logic used by the set widget to determine the result assigned to the 
> variable is as follows:
>
> 1. If the "tiddler" attribute is present and not blank, then:
> 1a. If the "subtiddler" attribute is also present and not blank, then get 
> the subtiddler from the specified tiddler, otherwise just get the tiddler 
> itself
> 1b. If the "field" attribute is present then return return the value of 
> that field, or the value of the "emptyValue" attribute if the field is 
> blank or missing
> 1c. Otherwise, if the "index" attribute is present, return the value of 
> the specified index, or the value of the "emptyValue" attribute if the 
> index is blank or missing
> 1d. Otherwise, return the text field of the tiddler, or the value of the 
> "emptyValue" attribute if the text field is blank or missing
>
> 2. If the "filter" attribute is present and not blank, then evaluate the 
> results of the filter, and:
> 2a. If the "value" attribute is present and the filter results are not 
> empty, return the value of the "value" attribute (even if the "value" 
> attribute is blank)
> 2b. If the "value" attribute is present and the filter results are empty, 
> return the value of the "emptyValue" attribute, if present, otherwise 
> return a blank result
> 2c. If the "value" attribute is not present, then if the "select" 
> attribute is a valid number it is used to retrieve a specified result from 
> the filter
> 2d. If the "value" attribute is not present, and the "select" attribute is 
> not a valid number, and the filter results are not empty, then the entire 
> filter results are returned (using double square brackets quoting around 
> any results that include spaces)
> 2e. If the "value" attribute is not present, the "select" attribute is not 
> a valid number, and the filter results are empty, then the value of the 
> "emptyValue" attribute is returned (or blank if it is not present)
>
> 3. If neither the "tiddler" or "filter" attributes are provided, return 
> the value of the "value" attribute, or the value of the "emptyValue" 
> attribute if the "value" attribute is blank or missing
>
> Perhaps it would be clearer expressed as a series of examples...
>
> Best wishes
>
> Jeremy
>
> --
> Jeremy Ruston
> jer...@jermolene.com 
> https://jermolene.com
>
> On 30 Mar 2019, at 16:17, S. S. > wrote:
>
> Within a macro, I am trying to determine if a parameter is empty, and then 
> set a variable based on knowing that it is empty.
>
> I came across the Google Group post from a last month: Check the Blank 
> Macro parameter 
> 
> \define mm(newField)
> <$list filter="[<__newField__>] -[[]]">
>
> Do my job!
> 
> \end
>
>
> <>
>
> So I tried using something based on that. Pasting the below into a new 
> tiddler on tiddlywiki.com shows the issue:
>
> \define test(tiddler)
> <$set name="result" filter="[[$tiddler$]] -[[]]" value="Why is this 
> variable set when the filter ''is not missing'' and ''it's empty''?">
>
> The description of the ''value'' attribute of the `$set` widget says: The 
> value to assign to the variable if the filter is missing or ''//not 
> empty//''
>
> tiddler=$tiddler$  
>
> result=<>
>
> <$list filter="[[$tiddler$]] -[[]]" emptyMessage="See, the filter shows 
> it's Empty">
> 
> 
> \end
>
> <>
>
>
> I don't understand where I've gone wrong. I'd appreciate some advice.
> 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 tiddl...@googlegroups.com .
> To post to this group, send email to tiddl...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/1867389e-59de-4b9e-b8e6-6ecd9212d92e%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/85221747-8ab2-416f-a4ba-4dbf0da42562%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] How to use the $set widget properly with a "not missing" and "empty" filter?

2019-03-31 Thread Jeremy Ruston
Hi SS

The logic used by the set widget to determine the result assigned to the 
variable is as follows:

1. If the "tiddler" attribute is present and not blank, then:
1a. If the "subtiddler" attribute is also present and not blank, then get the 
subtiddler from the specified tiddler, otherwise just get the tiddler itself
1b. If the "field" attribute is present then return return the value of that 
field, or the value of the "emptyValue" attribute if the field is blank or 
missing
1c. Otherwise, if the "index" attribute is present, return the value of the 
specified index, or the value of the "emptyValue" attribute if the index is 
blank or missing
1d. Otherwise, return the text field of the tiddler, or the value of the 
"emptyValue" attribute if the text field is blank or missing

2. If the "filter" attribute is present and not blank, then evaluate the 
results of the filter, and:
2a. If the "value" attribute is present and the filter results are not empty, 
return the value of the "value" attribute (even if the "value" attribute is 
blank)
2b. If the "value" attribute is present and the filter results are empty, 
return the value of the "emptyValue" attribute, if present, otherwise return a 
blank result
2c. If the "value" attribute is not present, then if the "select" attribute is 
a valid number it is used to retrieve a specified result from the filter
2d. If the "value" attribute is not present, and the "select" attribute is not 
a valid number, and the filter results are not empty, then the entire filter 
results are returned (using double square brackets quoting around any results 
that include spaces)
2e. If the "value" attribute is not present, the "select" attribute is not a 
valid number, and the filter results are empty, then the value of the 
"emptyValue" attribute is returned (or blank if it is not present)

3. If neither the "tiddler" or "filter" attributes are provided, return the 
value of the "value" attribute, or the value of the "emptyValue" attribute if 
the "value" attribute is blank or missing

Perhaps it would be clearer expressed as a series of examples...

Best wishes

Jeremy

--
Jeremy Ruston
jer...@jermolene.com
https://jermolene.com

> On 30 Mar 2019, at 16:17, S. S.  wrote:
> 
> Within a macro, I am trying to determine if a parameter is empty, and then 
> set a variable based on knowing that it is empty.
> 
> I came across the Google Group post from a last month: Check the Blank Macro 
> parameter
> \define mm(newField)
> <$list filter="[<__newField__>] -[[]]">
> 
> Do my job!
> 
> \end
> 
> 
> <>
> 
> So I tried using something based on that. Pasting the below into a new 
> tiddler on tiddlywiki.com shows the issue:
> 
> \define test(tiddler)
> <$set name="result" filter="[[$tiddler$]] -[[]]" value="Why is this variable 
> set when the filter ''is not missing'' and ''it's empty''?">
> 
> The description of the ''value'' attribute of the `$set` widget says: The 
> value to assign to the variable if the filter is missing or ''//not empty//''
> 
> tiddler=$tiddler$  
> 
> result=<>
> 
> <$list filter="[[$tiddler$]] -[[]]" emptyMessage="See, the filter shows it's 
> Empty">
> 
> 
> \end
> 
> <>
> 
> 
> I don't understand where I've gone wrong. I'd appreciate some advice.
> 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 post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/1867389e-59de-4b9e-b8e6-6ecd9212d92e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/E37EEDC5-82E2-42AC-8E9A-2FDFB83F0370%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: [TW5] Bob and BobEXE version 1.2.2 Friend Potatoes

2019-03-31 Thread Jed Carty
BIG NOTE OF DOOM: THIS IS VERY EXPERIMENTAL 
I haven't run into bugs, but as this thread demonstrates that doesn't mean 
that there aren't a lot of them. Back everything up before trying out the 
new features.


That said, because I can't let things go, now you can get plugins directly 
from GitHub repos when using Bob. The same thing can be extended to Themes 
and Editions without too much trouble but I haven't done that yet. 
Languages too but I don't think that would be as useful, I don't think 
anyone is doing a translation that isn't available in the main plugin 
library.

To use this you find the url of a GitHub repo for a tiddlywiki plugin (like 
https://github.com/OokTech/RandomValue ), open up the control panel -> bob 
settings -> fetch plugins and put the url into the text box in that tab and 
click Save Plugin to Server, after you do that you can go to the Manage 
Plugins tab and click Update Plugin List and the new plugin should be 
included in the list and ready to be used in your wikis.

The updated bit of the changelog is here:

- You can now fetch plugins directly from github. (VERY EXPERIMENTAL)
  - This required two external modules that are now included in the Bob 
plugin
- An updated (and not backwards compatible) jszip
- follow-redirects
  - On GitHub.com or GitLab.com you can give the repo url to get the plugin
- For github the repo url will be something like this 
`https://github.com/OokTech/TW5-RandomValue`, there is some special 
handling to get the zip url from the repo url for github.
- for gitlab the repo url will be something like this 
`https://gitlab.com/inmysocks/ookbot`, there is also special handling to 
get the url for the zip from gitlab.com repos.
  - Anywhere else you have to give the full url for the zip file itself.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f140288c-12e8-4fbf-9288-7cbd6b20cac6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Re: Fraalancer Needed to Customize TiddlyWiki to a Project Scheduler

2019-03-31 Thread Jeremy Ruston
Hi Ams,

Just to add that I do consultancy work on TiddlyWiki through my company 
Federatial (https://federatial.com/). Most of our work at the moment is around 
Xememex, a multi-user cloud implementation of TiddlyWiki. We offer it on a 
wholesale basis: organisations pay us to run an independent instance of 
Xememex, which can be private or public. Our highest profile customer is the 
Anna Freud Centre in London, who use Xememex to build a fractal manual of 
adolescent mental healthcare (https://manuals.annafreud.org/).

Running TiddlyWiki in the cloud is very convenient, and blows away the 
limitations of the single file configuration. For example, we're currently 
working with a law firm in the US on migrating a 14,500 page legal Word 
document to a custom Xememex application (with 53,000 tiddlers). The client 
loves that they can at any time save the entire app as a fully functional 90MB 
self-contained HTML file.

Best wishes

Jeremy

--
Jeremy Ruston
jer...@jermolene.com
https://jermolene.com

> On 31 Mar 2019, at 00:08, TonyM  wrote:
> 
> Ams,
> 
> I am working on methods that will allow this kind of solution to work on top 
> of single file wikis in the future. It depends on features now only in the 
> pre-release version.
> 
> Whatever the method used they need to be stored somewhere so what will serve 
> the tikis, as Mario asks.
> 
> For example: It is possible to host a tiddlywiki file on SharePoint and use 
> the checkin/out process to enforce one editor at a time. But for every user 
> to have the ability to create and edit tiddlers, possibly at the same time 
> (read only is fine) has some difficulties. However with the introduction of 
> local storage in 5.1.20 we now have other possibilities. However they are 
> conceptual and immature for a business solution without further development.
> 
> The only other viable alternative would be to have a NodeJS server and/or 
> with Bob so that multiuser multiaccess can be managed. 
> 
> Others will have a different perspective, so lets see if we get more ideas.
> 
> I am available for such work, but I believe there are some complexities you 
> are not aware of.
> 
> Regards
> Tony 
> 
>> On Saturday, March 30, 2019 at 7:52:54 PM UTC+11, Ams wrote:
>> Hello Everyone,
>> 
>> I'm looking for a freelancer to help me customize TiddlyWiki to a Project 
>> Scheduler.
>> 
>> 
>> ## Purpose:
>> 
>> A team is tasked with tracking many project progress. The project consist of 
>> several milestones with its planned dates. Each member of this team is 
>> responsible to track multiple projects and it’s many milestone. Hence, I 
>> want to customize TiddlyWiki to help the team members track their projects 
>> milestones, and also help the team leader to monitor the overall projects 
>> and team members work. The TiddlyWiki html will be put in a shared folder in 
>> the team leader computer where others can access it.
>> 
>> ## Users & Their Features:
>> 
>> 1. Team Member can: 
>> Login to his account/page
>> Create a new project, and set its planned milestones dates.
>> Submit a project milestones with comments.
>> View the user own projects and their milestones planned date.
>> View delayed milestones.
>> 
>> 2. Team Leader/Admin can:
>> Create & edit projects info, and its planned & actual milestones.
>> Create & manage team members account.
>> View all projects.
>> View delayed projects by team member.
>> 
>> ## We can talk more over skype for more info. 
> 
> -- 
> 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 post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/3b430e34-d703-4da5-96d2-5d6a212866b7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9E31493F-9B3D-4ED9-9DCB-B600A9237D3B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread Mohammad
Thanks for clarification.
It is interesting.

Best
Mohammad

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/eca8ff32-4a69-4e58-b060-90a2846e506e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread S. S.
Mohammad,

Since we are using the parameter *c* as a variable, we have to define its 
value as a variable first.
So if we wanted to pass the value *red* to the parameter *c*, we first have 
to define the variable *red*.
In this case we give the variable *red* the value *red* also.
Then it will work, as shown below.

\define myhelper(h) 
\define mymacro(c:"variable_for_color") <$macrocall $name="myhelper" h=<<$c$
>>/>

<$set name="variable_for_color" value="blue">
a <> b


<$set name="red" value="red">
c <> d


Results in HTML produced:
a  b

c  d


Regards.





On Sunday, March 31, 2019 at 7:28:16 PM UTC+7, Mohammad wrote:
>
> Why this does not work?
>
> <$set name="variable_for_color" value="blue">
> a <> b
>
> c <> d
> 
>
>
> It produces
>
>
>  a  b c  d 
> 
>
>
>
> On Sunday, March 31, 2019 at 3:49:19 PM UTC+4:30, S. S. wrote:
>>
>> RA,
>>
>> See if this works for you:
>> \define myhelper(h) 
>> \define mymacro(c:"variable_for_color") <$macrocall $name="myhelper" h=<<
>> $c$>>/>
>>
>> <$set name="variable_for_color" value="blue">
>> a <> b
>> 
>>
>> Inspecting the underlying HTML gives:
>> 
>> a  b
>>
>> 
>>
>> Cheers
>>
>>
>> On Sunday, March 31, 2019 at 10:59:26 AM UTC+7, RA wrote:
>>>
>>> Is it possible? I want to do something like this:
>>>
>>> \define mymacro(c:variable_for_color)   >> "color:variable_for_color"/>
>>>
>>> So, there are 3 questions here really: defining a variable before 
>>> defining a macro, using variable as a macro parameter default, and using 
>>> variable inside html 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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/37793e13-677d-4b81-979d-af1a54218f56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread Mohammad
Also this is interesting

h=<<$c$>>



On Sunday, March 31, 2019 at 3:49:19 PM UTC+4:30, S. S. wrote:
>
> RA,
>
> See if this works for you:
> \define myhelper(h) 
> \define mymacro(c:"variable_for_color") <$macrocall $name="myhelper" h=<<
> $c$>>/>
>
> <$set name="variable_for_color" value="blue">
> a <> b
> 
>
> Inspecting the underlying HTML gives:
> 
> a  b
>
> 
>
> Cheers
>
>
> On Sunday, March 31, 2019 at 10:59:26 AM UTC+7, RA wrote:
>>
>> Is it possible? I want to do something like this:
>>
>> \define mymacro(c:variable_for_color)   > "color:variable_for_color"/>
>>
>> So, there are 3 questions here really: defining a variable before 
>> defining a macro, using variable as a macro parameter default, and using 
>> variable inside html 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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7a177057-b608-4aaf-8b59-7f0103912fc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread Mohammad
Hi S.S,
 Your solution teaches one new rule
A variable can be referenced as default value in a macro definition by its 
name
So: c:<> or c:$(varname)$ does not work
BUT
c:"varname" works!

Is this is bug or it is a rule?

--Mohammad


On Sunday, March 31, 2019 at 3:49:19 PM UTC+4:30, S. S. wrote:
>
> RA,
>
> See if this works for you:
> \define myhelper(h) 
> \define mymacro(c:"variable_for_color") <$macrocall $name="myhelper" h=<<
> $c$>>/>
>
> <$set name="variable_for_color" value="blue">
> a <> b
> 
>
> Inspecting the underlying HTML gives:
> 
> a  b
>
> 
>
> Cheers
>
>
> On Sunday, March 31, 2019 at 10:59:26 AM UTC+7, RA wrote:
>>
>> Is it possible? I want to do something like this:
>>
>> \define mymacro(c:variable_for_color)   > "color:variable_for_color"/>
>>
>> So, there are 3 questions here really: defining a variable before 
>> defining a macro, using variable as a macro parameter default, and using 
>> variable inside html 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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/12c473b2-ea37-4564-8e3d-b5bedb3af132%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread Mohammad
Why this does not work?

<$set name="variable_for_color" value="blue">
a <> b

c <> d



It produces


 a  b c  d 




On Sunday, March 31, 2019 at 3:49:19 PM UTC+4:30, S. S. wrote:
>
> RA,
>
> See if this works for you:
> \define myhelper(h) 
> \define mymacro(c:"variable_for_color") <$macrocall $name="myhelper" h=<<
> $c$>>/>
>
> <$set name="variable_for_color" value="blue">
> a <> b
> 
>
> Inspecting the underlying HTML gives:
> 
> a  b
>
> 
>
> Cheers
>
>
> On Sunday, March 31, 2019 at 10:59:26 AM UTC+7, RA wrote:
>>
>> Is it possible? I want to do something like this:
>>
>> \define mymacro(c:variable_for_color)   > "color:variable_for_color"/>
>>
>> So, there are 3 questions here really: defining a variable before 
>> defining a macro, using variable as a macro parameter default, and using 
>> variable inside html 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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/21930b39-76ad-4f4e-b399-9e967a909acb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread S. S.
RA,

See if this works for you:
\define myhelper(h) 
\define mymacro(c:"variable_for_color") <$macrocall $name="myhelper" h=<<$c$
>>/>

<$set name="variable_for_color" value="blue">
a <> b


Inspecting the underlying HTML gives:

a  b



Cheers


On Sunday, March 31, 2019 at 10:59:26 AM UTC+7, RA wrote:
>
> Is it possible? I want to do something like this:
>
> \define mymacro(c:variable_for_color)"color:variable_for_color"/>
>
> So, there are 3 questions here really: defining a variable before defining 
> a macro, using variable as a macro parameter default, and using variable 
> inside html 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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3426624f-da60-4415-9cb3-ca9f478e3f72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Tiddler Commander Plugin: New update 0.0.15

2019-03-31 Thread Mohammad
Hi Mario,

A new release of Tiddler commander is ready to upload and now:

 - All css prefixes changed to cmd- so there is no confusion with TW 
standard css prefixes (Note: there was no overwrite)
 - The default tab button style has not been changed! but the a customized 
css for the tab button in Commander UI has been developed! So, there is no 
worry if user apply different themes 
- Tiddler Commander is not mobile friendly but I asked *Jd* to help with 
that!

regarding the !important, it seems the Tiddlywiki itself uses !important 
flag, as I could not change the $edit-text width using a simple css
but, you are totally right and I am not sure if I can find any other 
solution and I would appreciate if you can suggest other solution.

Best
Mohammad


On Tuesday, March 26, 2019 at 4:06:46 PM UTC+4:30, PMario wrote:
>
> Hi folks!
>
> First of all @Mohammad: I wasn't aware, that all of this can be done with 
> TW macros. GREAT WORK! ...
>
> I've found 2 things that caught my attention immediately. see: 2 
> Styleshees 
> 
> .
>
> It seems the plugin modifies cm-xxx classes. Where cm- prefix is already 
> used for CodeMirror plugins. 
>
> IMO you shouldn't do this. What if a user doesn't use CodeMirror? ...
>
> It also seems, that the plugin modifies the "tab-button" settings. 
>  - Why? 
>  - As soon as someone includes the plugin, they do have 2 different tab 
> styles?
>  - What's the difference? 
>  - Styling only, or is there a difference in function? 
>  - What if users use a different "theme" than the plugin expects?
>  - IMO the CSS !important flag is toxic see link:[1]. So I personally try 
> to avoid it at all cost!
>
> 
>
> About CSS prefixes: TW uses tc-, tv-, tm- and th-   prefixes for different 
> things.
>
> tc- ... tw class
> tv- ... tw variable
> tm- ... tw message
> th- ... tw hook
>
> If I need similar classes like tc-xxx I use wltc-  prefix. for WikiLabs 
> tw class. ... This mechanism allows me to have short class prefixes and 
> they don't clash with existing classes tc- classes. Same with wltm-, wlth- 
> ... I think you get it.
>
> So if you need new class definitions you could add your own 2 chars in 
> front of tc-. So everyone that sees them knows: OK that's a class from a 
> plugin. 
>
> Just some thoughts. 
>
> 
>
> have fun!
> mario
>
> [1] https://uxengineer.com/css-specificity-avoid-important-css/
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b2896941-13df-4713-b036-20379d957b8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread Mohammad


On Sunday, March 31, 2019 at 8:29:26 AM UTC+4:30, RA wrote:
>
> Is it possible? I want to do something like this:
>
> \define mymacro(c:variable_for_color)"color:variable_for_color"/>
>
> So, there are 3 questions here really: defining a variable before defining 
> a macro, using variable as a macro parameter default, and using variable 
> inside html 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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/de88b344-fb85-4242-a5fc-bdac72826a27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Filter list by tag but sort by and show value of field

2019-03-31 Thread Huw
That is most excellent! Thanks! I missed that operator entirely!

regards

Huw

On Sunday, 31 March 2019 09:52:54 UTC+1, Jed Carty wrote:
>
> It sounds like you need the get operator 
> https://tiddlywiki.com/#get%20Operator
>
> Try this:
>
> <$list filter='[tag[TAGNAME]get[nameid]sort[]]'>
>
>
> 
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/98d491f7-e3f0-4dab-b650-4897c5a256f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Filter list by tag but sort by and show value of field

2019-03-31 Thread Mohammad
Added to TW-Scripts

On Sunday, March 31, 2019 at 1:22:54 PM UTC+4:30, Jed Carty wrote:
>
> It sounds like you need the get operator 
> https://tiddlywiki.com/#get%20Operator
>
> Try this:
>
> <$list filter='[tag[TAGNAME]get[nameid]sort[]]'>
>
>
> 
>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e285f44d-19d1-4193-8fa9-4c9e4c7bde66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: use variable for macro param default

2019-03-31 Thread Mohammad
This is not an elegant solution and not semantic, but works!

\define spanmac(text) 

$text$

\end

\define mymacro(c:"", text)  
<$list filter="[enlist[$c$ $(vc)$]limit[1]]" variable=myColor>
<>

\end



<$vars vc="red" >

;Test one, no color sent
:<>

;Test two
:<>



The vc has a default red color, so if you call the mymacro without c 
parameter, the default value here red is used!
If you pass c parameter, then it used! Try above code inside tiddlywiki.com

--Mohammad



On Sunday, March 31, 2019 at 10:15:44 AM UTC+4:30, RA wrote:
>
> Yes, but I'd like `c` to have a default value, and I'd like to define that 
> default not as a literal color value, but via a variable. Can you do that?
>
> On Saturday, March 30, 2019 at 10:12:41 PM UTC-7, Mohammad wrote:
>>
>> Why noy use something like this
>>
>> \define mymacro(c, text)   
>> 
>> $text$
>> \end
>>
>> Then use it as
>>
>> <>
>>
>>
>>
>>
>> On Sunday, March 31, 2019 at 8:29:26 AM UTC+4:30, RA wrote:
>>>
>>> Is it possible? I want to do something like this:
>>>
>>> \define mymacro(c:variable_for_color)   >> "color:variable_for_color"/>
>>>
>>> So, there are 3 questions here really: defining a variable before 
>>> defining a macro, using variable as a macro parameter default, and using 
>>> variable inside html 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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a6dfea21-a7f6-4b36-8332-700b1a3f514b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Filter list by tag but sort by and show value of field

2019-03-31 Thread Jed Carty
It sounds like you need the get 
operator https://tiddlywiki.com/#get%20Operator

Try this:

<$list filter='[tag[TAGNAME]get[nameid]sort[]]'>




-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f2b7077c-f56c-43ee-aec1-b9fb85a90500%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Filter list by tag but sort by and show value of field

2019-03-31 Thread Huw
Currently I am using "*<$list filter='[tag[TAGNAME]sort[title]]'/>*" to 
produce a list of tiddlers by tag. Works fine.

However, what I would like to do (and have failed miserably) is to get a 
list of tiddlers by tag, sorted by and displaying the value of a specific 
field.

So for example I have tiddlers "Apple", "Orange", "Pear".

All have a field named "nameid" that contains a string and all have the tag 
"Fruit".

I would like to produce a list of all items with the tag "Fruit", but the 
list should be derived from and sorted by the value of the "id" field, so 
the list would be:

AppleIDString
OrangeIDString
PearIDString

rather than

Apple
Orange
Pear

Which is what I have now.

Any help would be much appreciated!

regards

Huw

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1980f3a0-cf64-4605-b7c8-37ae0eb10d0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.