[tw5] Re: Presenting my plugin library

2021-08-11 Thread The Islander

My goodness. That tiddlywiki5 logo. Can I steal that please? :)
On Wednesday, August 11, 2021 at 8:23:51 AM UTC-7 Andrew wrote:

> Thank you Mario for your candid response. You have always been 
> insightful.  I now know what to focus on fixing. Thank you.
>
> On Wednesday, August 11, 2021 at 12:15:04 AM UTC-7 PMario wrote:
>
>> Hi Andrew,
>>
>> It's nice, but why do you use a promotion image of an image hosting 
>> service as a backdrop image? 
>>
>> Github lets you add your own images to gh-pages. So you should use this 
>> service instead of tickle users privacy concerns. 
>>
>> Whenever you load an image from a 3rd party, you also ping them, that I'm 
>> visiting your page. .. I personally don't want this and the page doesn't 
>> contain an option to opt-out. ... :/
>>
>> Sorry for ranting, but that and the animated psychedelic image, was the 
>> first thing that jumped into my eyes and made the page unusable. For me 
>> it's impossible to read the text on a transparent tiddler if the background 
>> image moves left and right. 
>>
>> -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/ecf25349-df6e-4cc8-bed7-f238236c0bbfn%40googlegroups.com.


[tw5] Re: Notes from the Coalface: Pasting URL's with pretty title

2021-08-07 Thread The Islander
Well here's an example.

Here's the tiddler "title" section:
https://i.imgur.com/vYKrG9Z.png

It has spaces and other non URL standard characters in it.

The url to this tiddler is: #Next-game instead of whatever escaped 
characters it should contain because the title contains them. This is all 
accomplished through pmario's uni-link plugin 
(https://wikilabs.github.io/editions/uni-link/).

Professional publications typically replace non URL standard characters 
with standard equivalents so that their URLs aren't full of escaped 
gibberish.

Examples:
https://developer.apple.com/documentation/xcode/documenting-a-swift-framework-or-package
https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html

The titles of the topics are used as a basis for the URLs but nonstandard 
characters are stripped out for URL "beautification".. hence non-yuck!

Hope that makes sense.




On Saturday, August 7, 2021 at 10:57:06 AM UTC-7 cj.v...@gmail.com wrote:

> Yuck how?  What's a non-yuck URL?
>
> Understanding, of course, that yuck is in the eye of the beholder, and 
> that URL's are first about being successful at getting to something on the 
> web.
>
> I ask because of the potential for me to gain a new insight into how 
> different people see things.
>
> On Friday, August 6, 2021 at 12:42:44 AM UTC-3 The Islander wrote:
>
>> Although the link text looks nice, hover over it and look at the URL. 
>> Yuck!
>>
>> On Wednesday, August 4, 2021 at 6:12:40 PM UTC-7 TW Tones wrote:
>>
>>> Folks,
>>>
>>> I just stumbled upon something helpful. You may know how to copy a 
>>> permalink to a tiddler, this results in URL, and using the to clipboard 
>>> option is help full. the only problem is the result is an ugly URL with 
>>> encoding.
>>>
>>> I discovered today however if you have Control Panel > Settings > Tiddler 
>>> Titles 
>>> <https://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FControlPanel%2FSettings%2FTitleLinks>
>>>  set 
>>> to Display tiddler titles as links, there is a a better choice. Or where 
>>> every you see a link in a tiddler eg  Learning 
>>> <https://tiddlywiki.com/#Learning> [[Learning  |
>>> https://tiddlywiki.com/#Learning]] copt that with you mouse.
>>>
>>> If the titles are displayed as links highlight and copy the title with 
>>> your mouse. The result if pasted is well formatted link eg; Navigation 
>>> History 
>>> <https://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FControlPanel%2FSettings%2FNavigationHistory>.
>>>  
>>> It is not helpful pasting into tiddlywiki,  I will raise an issue on this. 
>>> But it is helpful pasting links into email and forum posts. As I have done 
>>> here.
>>>
>>> Regards
>>> Tones
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ad81901a-f3c2-4425-8dc4-f8d81cd6dbcen%40googlegroups.com.


[tw5] Re: Notes from the Coalface: Pasting URL's with pretty title

2021-08-05 Thread The Islander
Although the link text looks nice, hover over it and look at the URL. Yuck!

On Wednesday, August 4, 2021 at 6:12:40 PM UTC-7 TW Tones wrote:

> Folks,
>
> I just stumbled upon something helpful. You may know how to copy a 
> permalink to a tiddler, this results in URL, and using the to clipboard 
> option is help full. the only problem is the result is an ugly URL with 
> encoding.
>
> I discovered today however if you have Control Panel > Settings > Tiddler 
> Titles 
> 
>  set 
> to Display tiddler titles as links, there is a a better choice. Or where 
> every you see a link in a tiddler eg  Learning 
>  [[Learning  |
> https://tiddlywiki.com/#Learning]] copt that with you mouse.
>
> If the titles are displayed as links highlight and copy the title with 
> your mouse. The result if pasted is well formatted link eg; Navigation 
> History 
> .
>  
> It is not helpful pasting into tiddlywiki,  I will raise an issue on this. 
> But it is helpful pasting links into email and forum posts. As I have done 
> here.
>
> Regards
> Tones
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/abd00ca0-197f-4be7-ae7c-138981e9be81n%40googlegroups.com.


[tw5] Re: Difference between filter and subfilter?

2021-08-02 Thread The Islander
Hi Tones and Eric,

I greatly appreciate your detailed replies! Reading through them clears it 
up for me thank you.

It may be useful to add this sort of clarification to official 
documentation - the motivations behind some of the more complex filter 
operators. If anyone feels it's appropriate for me to request this as an 
open issue on github, please let me know.

The "filter" filter operator in particular is difficult to search for, due 
to its identical naming to the parent concept of a filter, and other 
related naming concepts like the "filter" filter run prefix.

Thanks!


On Sunday, August 1, 2021 at 3:05:31 AM UTC-7 Eric Shulman wrote:

> Here's a demonstration of the difference:
>
> 1) Create three tiddlers named A, B, and C, with text content "this is A", 
> "this is B" and "this is C", respectively.
>
> 2) Create a Test tiddler containing:
> <$vars F="[get[text]match[this is B]]">
>
> subfilter result 1 is: <$text text={{{ [enlist[A B C]subfilter] }}} 
> />
>
> <$list filter="[enlist[A B C]get[text]match[this is B]]" variable="result">
>subfilter result 2 is: <>
> 
>
> filter result 1 is: <$text text={{{ [enlist[A B C]filter] }}} />
>
> <$list filter="[enlist[A B C]]">
><$list filter="[get[text]match[this is 
> B]then]" variable="result">
>   filter result 2: is <>
>
> 
>
> 3) The output will be:
> *subfilter result 1 is: this is B*
>
> *subfilter result 2 is: this is B*
>
> *filter result 1 is: B*
>
> *filter result 2: is B*
>
> The difference:
>
>- *subfilter* applies filter F to each input title and returns the 
>TEXT that matches "this is B", and is *equivalent to inserting filter 
>F into a larger filter expression*
>- *filter *applies filter F to each input title and returns the TITLE 
>whose text matches "this is B" and is *equivalent to writing nested 
>filters*
>
> hope this helps...
>
> -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/91bd18da-ea75-4972-9761-99e946e31420n%40googlegroups.com.


[tw5] Difference between filter and subfilter?

2021-07-31 Thread The Islander
Hello, after reading the official documentation on subfilter and filter, 
it's not clear to me what the difference is between these two operators.

   - Why would someone choose to use one over the other? A couple of simple 
   examples where one differentiates from the other would be very useful.
   - Is subfilter suitable for use in the middle of a filter expression? 
   The subfilter documentation page itself shows an example of a subfilter in 
   the middle of a filter expression, but none of the examples do this
   - I'm further confused by the discussion in this issue on Github 
    which is 
   requesting filter as a simple alias of subfilter for readability

On a side note, I thought there would be some consistency to availability 
of currentTiddler within the operand of filter, but there isn't 
. Are saqimtiaz's 
improvements something slated to be included in 5.2.0?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b51bdb78-1b17-4c6a-a38e-7df57e63ad91n%40googlegroups.com.


[tw5] Re: TiddlyWiki + nodejs: What are benefits and use cases?

2021-07-24 Thread The Islander

   
   - For synchronization via dropbox, etc., only changed tiddlers get 
   updated.


Dropbox has long switched to block based synchronization, so even for a 
single file TW on Dropbox, it will synchronize up only the changed blocks 
in the file so the sync should be very quick once the base file is already 
in cloud. Also, if you are into saving backups of a single TW file, when a 
new backup is saved, only the "new" blocks of the new single file will be 
synced up to Dropbox, not the whole file.




-- 
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/28992528-6c48-47b3-8dcf-2bb032dab882n%40googlegroups.com.


[tw5] Re: Number Format

2020-11-18 Thread The Islander
Hi Tony,

Any idea why the comma separators are embedding a link in the comma? This 
is what seems to happen on my tiddlywiki.

Your Syntax writeup above also has a commas linking to a url for some odd 
reason as well.

Thx!

On Monday, September 21, 2020 at 3:06:46 AM UTC-7 Werner wrote:

> Thanks, guys. Great starting point.
>
> Werner
>
> TW Tones schrieb am Samstag, 19. September 2020 um 10:53:45 UTC+2:
>
>> Eric Beat me to it,
>>
>>  should have refreshed GG, His solution is superior of course and worthy 
>> of the Core.
>>
>> However mine still demonstrates the extendibility of tiddlywiki with only 
>> macros and wikitext.
>>
>> Regards
>> Tones
>>
>> On Saturday, 19 September 2020 at 18:51:30 UTC+10 TW Tones wrote:
>>
>>> Werner,
>>>
>>> As you say, would be good in the core, but almost as good is a simple 
>>> macro.
>>>
>>> See attached and import to any wiki, then open $:/PSaT/format-numbers 
>>>  For 
>>> instructions
>>>
>>> Syntax
>>> <>
>>>
>>>- *n* is the number with or without decimal places (no default)*t* is 
>>>the thousands separator (optional) - defaults to ","
>>>   - (Can change default in format-number macro, set 
>>>   thousands-separator)
>>>- *d* is the decimal separator (optional) - defaults to "."
>>>- (Can change default in format-number macro, set decimal-separator)
>>>- *p* is the decimal places to use (optional) - defaults to "2"
>>>- (Can change default in format-number macro, set decimal-places)
>>>
>>> For example <> results in 1, 
>>> <#m_-6578330602703203538_m_1244614928399698320_m_8478119421336035852_%2C>
>>> 234, 
>>> <#m_-6578330602703203538_m_1244614928399698320_m_8478119421336035852_%2C>
>>> 567, 
>>> <#m_-6578330602703203538_m_1244614928399698320_m_8478119421336035852_%2C>
>>> 654, 
>>> <#m_-6578330602703203538_m_1244614928399698320_m_8478119421336035852_%2C>
>>> 321.67 
>>>  
>>> *$:/PSaT/format-numbers/macro*
>>> \define format-number(n t d p)
>>> <$set name=thousands-separator value="$t$" emptyValue=",">
>>> <$set name=decimal-separator value="$d$" emptyValue=".">
>>> <$set name=decimal-places value="$p$" emptyValue="2">
>>> <$set name=fixed-decimal value={{{ [[$n$]fixed] }}}>
>>> <$set name=integer value={{{ [split[.]first[]] }}}>
>>> <$set name=remainder value={{{ [split[.]last[]] }}}>
>>> <$set name=length filter="[length[]]">
>>> <$macrocall $name=each-digit length=<> /><$list 
>>> filter="[!match[0]]" 
>>> variable=nul><><>
>>> 
>>> \end
>>> \define each-digit(length)
>>> \whitespace trim
>>> <$list filter="[range[1,$length$]]" variable=position>
>>> <$set name=digit filter="[[$(integer)$]split[]nth]">
>>> <$set name=zeros filter="[[$length$]subtract]">
>>> <>{{{ 
>>> [!match[0]remainder[3]match[0]then] }}}
>>> 
>>> 
>>> \end
>>>
>>> *Regards*
>>> *Tones*
>>> On Friday, 18 September 2020 at 23:20:14 UTC+10 Werner wrote:
>>>
 Tony, 

 sorry, was absorbed by other projects, so couldn't reply earlier. OK, 
 I'll be a bit more specific:

 I have a number stored in a JSON tiddler. When I retrieve it, I get 
 plain old 3500 for example. But I want decimal points and comma separators 
 to have it rendered like 3,500. Or 3.500 in German. Or whatever is your 
 default locale. And, if DateFormat is included in the view widget, I think 
 NumberFormat should also be. So I think, the most elegant solution would 
 be 
 extending the view widget source code to allow for "number" and pass it 
 through to JavaScript intl.Numberformat (cf.: 
 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat).
  
 Should not be that hard to implement. Maybe I try it, if I find the time.

 Of course there are plugins, but I think something as basic as a number 
 format should be in the core.

 Werner

 TW Tones schrieb am Dienstag, 8. September 2020 um 02:32:41 UTC+2:

> Post script
>
> Actualy i think using simple templates to display a number in a 
> desired format would be smart and the template can be changed to suit 
> localisation if not automaticaly respond to localisation. Macro access to 
> templates is also easy to provide.
>
> Tones
>
> On Tuesday, 8 September 2020 at 10:25:30 UTC+10 TW Tones wrote:
>
>> Werner
>>
>> Perhaps some examples?
>>
>> Evans formulae plugin has features to support this from memory. There 
>> are other maths plugins that may.
>>
>> I can imagin a gap that exists between basic maths and the more 
>> advanced maths especialy in relation to display.
>>
>> However i can see these gaps would be easy to solve with a few wiki 
>> text macros or taping into javascript functions that already handle it.
>>
>> Please research your percived gaps and post back some details.
>>
>> Tones
>>
>> On Tuesday, 8 September 2020 

[tw5] Re: How to get SetWidget to work with transclusion + template?

2020-06-20 Thread The Islander
Hi Tony, thanks to you and everyone else. Your explanations are very 
helpful!

On Friday, June 19, 2020 at 1:49:23 AM UTC-7, TW Tones wrote:
>
> With respect don't use title as you do. It will not work. That is why I 
> suggested using the $(current)$ as I do in my example. They are 
> equivalent.I believe you can't put references and macros inside the define 
> (parameters).
>
> regards
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e517ae4c-2664-48e7-b187-617678730053o%40googlegroups.com.


[tw5] Re: How to get SetWidget to work with transclusion + template?

2020-06-18 Thread The Islander
Hello,

How would I make the below solution work if my definition looked like this?

\define mymacro(index1:"{{!!title}}")


I can substitute a hardcoded string (the same as the title) for $index1$ 
from your suggestion, but if I specify index1 to be {{!!title}} it doesn't 
seem to work.

Thanks!

On Thursday, June 18, 2020 at 8:51:46 PM UTC-7, Mark S. wrote:
>
>
>
>
> You can't substitute the < > brackets in the middle of a string like that. 
> You can only substitute them inside a filter expression where a square 
> bracket would have occurred. But there is a trick to concatenating strings 
> in filters using the "addprefix" and "addsuffix" operators. So your filter 
> expression might look like this:
>
> "[[$:/.somewhere/]addsuffix]"
>
> But there's a way you can skip "set" and "list" completely:
>
> \define mymacro(index1)
> <$tiddler tiddler={{{ 
> [[tiddler1]getindex[$index1$]addprefix[$:/.somewhere/]] }}}>
> {{||$:/.somewhere/templates/mytemplate}}
> 
> \end
>
> Remember to end your macro definitions with \end, BTW.
>
>
>
> On Thursday, June 18, 2020 at 8:12:12 PM UTC-7, The Islander wrote:
>>
>> Hi everyone,
>>
>> I can't seem to be able to figure out how to get this to work. Appreciate 
>> your help.
>>
>>
>>
>> \define mymacro(index1:"{{!!title}}")
>> <$set name="myvar" tiddler="tiddler1" index=$index1$>
>> <$list filter="[$:/.somewhere/]">{{||$:/.somewhere/templates/
>> mytemplate}}
>> 
>> \end
>>
>>
>>
>>
>> Can't seem to figure out what I'm doing wrong.
>>
>> 1. I need to get a value from a data tiddler (tiddler1) with an index 
>> equal to the title field of the invoking tiddler (named index1 = 
>> {{!!title}}).
>> 2. The result of first step = myvar.
>> 3. I need to take the result and get a tiddler named $:/.somewhere/
>> 4. I need to display the resulting tiddler using a template named $:
>> /.somewhere/templates/mytemplate
>>
>> The results don't seem to work.
>>
>> Appreciate your help!
>>
>> Thanks.
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4294ec32-13de-4ba6-993a-586c2a9c87aao%40googlegroups.com.


[tw5] How to get SetWidget to work with transclusion + template?

2020-06-18 Thread The Islander
Hi everyone,

I can't seem to be able to figure out how to get this to work. Appreciate 
your help.



\define mymacro(index1:"{{!!title}}")
<$set name="myvar" tiddler="tiddler1" index=$index1$>
<$list filter="[$:/.somewhere/]">{{||$:/.somewhere/templates/
mytemplate}}





Can't seem to figure out what I'm doing wrong.

1. I need to get a value from a data tiddler (tiddler1) with an index equal 
to the title field of the invoking tiddler (named index1 = {{!!title}}).
2. The result of first step = myvar.
3. I need to take the result and get a tiddler named $:/.somewhere/
4. I need to display the resulting tiddler using a template named $:
/.somewhere/templates/mytemplate

The results don't seem to work.

Appreciate your help!

Thanks.


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/627ed698-6599-4825-b89c-7c486019968co%40googlegroups.com.


[tw5] Re: Getting transclusion the whole table of content

2020-03-27 Thread The Islander
Hi @TonyM, could you clarify with some code explaining what you've said 
below?

For example, in this 
post: https://groups.google.com/d/msg/tiddlywiki/tH2hWn2XPIM/Cpsqw4QAAwAJ

I don't see the list filter affecting the output of the toc macro at all.

<$list filter="[all[current]has[caption]get[caption]] 
[all[current]!has[caption]get[title]] +[reverse[]]">

<>





On Friday, July 13, 2018 at 6:58:37 PM UTC-7, TonyM wrote:
>
> Andrej,
>
> Good work, 
>
> I was about to reply with the basic "recursion" approach, where the macro 
> calls itself, importantly from inside a list widget, so it is limited to 
> the set of members in that lists filter. I think a lot of people leave this 
> behaviour to toc macros when you can build it yourself once you understand 
> the pattern.
>
> That is the macro will work its way through all members of that 
> hierarchical list, down branches to the leaves, once the leaf siblings are 
> all listed it returns to the previous level
>
> In side the list other than calling the macro you can place anything you 
> want to take place on every item in the hierarchy.  
>
> Regards
> Tony
>
>
> On Friday, July 13, 2018 at 8:25:10 PM UTC+10, Andrej Korenić wrote:
>>
>> Well, I got it working... I don't know how but here is the solution...
>>
>> I created tiddler called Transclude chapters that was tagged with 
>> $:/tags/Macro. Code is this:
>>
>> \define transclude_chapters(tag,sort:"",itemClassFilter,exclude,path)
>>
>>   <$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] 
>> -[[$tag$]] $exclude$""">
>> <$vars item=<> path="""$path$/$tag$""" 
>> excluded="""$exclude$ 
>> -[[$tag$]]""">
>>   <$set name="toc-item-class" filter="""$itemClassFilter$""" 
>> emptyValue="toc-item" value="toc-item-selected">
>>
>> <$transclude mode='block'/>
>>
>>  <$macrocall $name="transclude_chapters" tag=<> sort=
>> """$sort$""" itemClassFilter="""$itemClassFilter$""" exclude=<> 
>> path=<>/>
>>
>>   
>> 
>>   
>> \end
>>
>> So I just call it with the root tag:
>>
>> <>
>>
>> and that's it :)
>>
>

-- 
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/dc13b4e5-d97d-4b54-80f9-98c6ac457d6a%40googlegroups.com.


[tw5] Re: How do I make toc category obey "empty" after exclusion? Also, is there a way to sort by title only if no caption exists?

2020-03-27 Thread The Islander
The question is where do we put this filter?

You can't put it in the toc macro because it complains Filter Expression 
Error.

You can't do something like this:
<$list filter="[all[current]has[caption]get[caption]] 
[all[current]!has[caption]get[title]] +[reverse[]]">

<>



because it doesn't do any sort.

So where would a filter like this go?

Thanks!


On Wednesday, September 12, 2018 at 10:18:12 AM UTC-7, Mark S. wrote:
>
> It sounds like you have things mostly sorted out.
>
> A filter like this might allow you to sort by caption or title (whichever 
> is present):
>
> [has[caption]get[caption]] [!has[caption]get[title]] +[sort[]]
>
> Just remember, that if you use caption then there might be more than one 
> tiddler that uses that caption and you can't form a standard link based on 
> the caption name.
>
> Good luck!
> -- Mark
>

-- 
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/54014c22-9bf2-461c-b188-46db94eeaf74%40googlegroups.com.


[tw5] Sidebar toc tab blank if I use list filter on toc

2020-03-27 Thread The Islander
Hello,

Posting this as a separate question because the followup is buried in a 
topic with a different subject.

This code:
<$list filter="[all[current]has[caption]get[caption]] 
[all[current]!has[caption]get[title]] +[sort[]]">

<>





*The contents show in the tiddler, but when I look at Sidebar, the contents 
are blank! No idea why?*Link here: http://aegeanmists.
tiddlyspot.com/#%24%3A%2F.isle%2FTable-of-Contents








-- 
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/747a7d82-1d69-4be3-ab65-e8704bee6037%40googlegroups.com.


[tw5] Re: How do I make toc category obey "empty" after exclusion? Also, is there a way to sort by title only if no caption exists?

2020-03-27 Thread The Islander
Sorry to resurrect this old topic, but I can't seem to find the answer to 
this.

When I use the following:
<<<>

It gives me the error:
*Filter Error: Syntax Error in Filter Expression*

Any idea why it is throwing this error?

On Friday, September 14, 2018 at 3:46:20 AM UTC-7, S H Chang wrote:
>
> Thank you Mark and Tony for the filter!
>
> Mark made a really good point about having the same caption for more than 
> one tiddler which I've forgotten about. I will keep that in mind.
>
> On Thursday, 13 September 2018 09:29:24 UTC+8, TonyM wrote:
>>
>> ps In my own filter I needed 
>>
>> "[all[current]has[caption]get[caption]] 
>> [all[current]!has[caption]get[title]] +[sort[]]"
>>
>>
>> Regards
>> Tony
>>
>> On Thursday, September 13, 2018 at 10:48:01 AM UTC+10, TonyM wrote:
>>>
>>> Nice Filter!
>>>
>>> On Thursday, September 13, 2018 at 3:18:12 AM UTC+10, Mark S. wrote:

 It sounds like you have things mostly sorted out.

 A filter like this might allow you to sort by caption or title 
 (whichever is present):

 [has[caption]get[caption]] [!has[caption]get[title]] +[sort[]]

 Just remember, that if you use caption then there might be more than 
 one tiddler that uses that caption and you can't form a standard link 
 based 
 on the caption name.

 Good luck!
 -- Mark

 On Tuesday, September 11, 2018 at 6:31:21 PM UTC-7, S H Chang wrote:
>
> I should have scrutinised my code before posting here. There was a 
> mistake in <>; it didn't 
> have 
> the list for "empty" children. I've also realised that it should be 
> !tag[Log]!visibility[hidden] instead. I've added that to the macro so now 
> it looks like this:
>
> \define toc-linked-selective-single-expandable-body(tag,sort:"",
> itemClassFilter:" ",exclude,path)
> <$set name="toc-state" value=<>>
>   <$set name="toc-item-class" filter="""$itemClassFilter$""" 
> emptyValue="toc-item" value="toc-item-selected" >
> >>
>   <$link>
>   <$list filter=
> "[all[current]tagging[]!visibility[hidden]!tag[Log]limit[1]]" variable
> ="ignore" emptyMessage="<$button 
> class='tc-btn-invisible'>{{$:/core/images/blank}}">
>   <$reveal type="nomatch" state=<> text=<<
> currentTiddler>>>
> <$button set=<> setTo=<> 
> class="tc-btn-invisible 
> tc-popup-keep">
>   {{$:/core/images/right-arrow}}
> 
>   
>   <$reveal type="match" state=<> text=<<
> currentTiddler>>>
> <$button set=<> setTo="x-all-close" 
> class="tc-btn-invisible 
> tc-popup-keep">
>   {{$:/core/images/down-arrow}}
> 
>   
> 
> <>
>   
>   <$reveal type="match" state=<> text=< >>>
> <$macrocall $name="toc-selective-single-expandable" tag=<<
> currentTiddler>> sort="""$sort$""" itemClassFilter=
> """$itemClassFilter$""" exclude="""$exclude$""" path="""$path$"""/>
>   
> 
>   
> 
> \end
>
> \define toc-unlinked-selective-single-expandable-body(tag,sort:"",
> itemClassFilter:" ",exclude,path)
> <$set name="toc-state" value=<>>
>   <$set name="toc-item-class" filter="""$itemClassFilter$""" 
> emptyValue="toc-item" value="toc-item-selected">
> >>
>   <$list filter=
> "[all[current]tagging[]!visibility[hidden]!tag[Log]limit[1]]" variable
> ="ignore" emptyMessage="<$button 
> class='tc-btn-invisible'>{{$:/core/images/blank}} <$view 
> field='caption'><$view field='title'/>">
> <$reveal type="nomatch" state=<> text=<<
> currentTiddler>>>
>   <$button set=<> setTo=<> 
> class="tc-btn-invisible 
> tc-popup-keep">
> {{$:/core/images/right-arrow}}
> <>
>   
> 
> <$reveal type="match" state=<> text=<<
> currentTiddler>>>
>   <$button set=<> setTo="close" 
> class="tc-btn-invisible 
> tc-popup-keep">
> {{$:/core/images/down-arrow}}
> <>
>   
> 
>   
>   <$reveal type="match" state=<> 
> text=<>>
> <$macrocall $name="""toc-selective-single-expandable""" 
> tag=<> sort="""$sort$""" 
> itemClassFilter="""$itemClassFilter$""" exclude="""$exclude$""" 
> path="""$path$"""/>
>   
> 
>   
> 
> \end
>
> \define toc-selective-single-expandable-empty-message()
> < """$(sort)$""" itemClassFilter:"""$(itemClassFilter)$""" exclude:
> """$(excluded)$""" path:"""$(path)$""">>
> \end
>
> \define toc-selective-single-expandable(tag,sort:"",itemClassFilter,
> exclude,path)
> <$vars tag="""$tag$""" sort="""$sort$""" itemClassFilter=
> """$itemClassFilter$""" excluded="""$exclude$ 

[tw5] Re: Invoke url in iframe with a button using JavaScript

2019-12-25 Thread The Islander
For the life of me I can't figure out how to concatenate a regular string 
with the contents of a tiddler and a variable inside a macro.

Let's say 'variable' = 35

Stringstuff{{$:/link/to/tiddler!!text}}$variable$

ends up with:

Stringstuff{{$:/link/to/tiddler!!text}}35

Any idea how to how to get the {{}} to evaluate? How do I concat these 
three things?

-- 
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/4d21d59d-4358-4094-b7ef-8bcce22e8ab1%40googlegroups.com.


[tw5] Re: Invoke url in iframe with a button using JavaScript

2019-12-25 Thread The Islander
Another idea would be to implement a button whose action it is to overwrite 
the contents of the tiddler with the iframe.

But I'm not sure how I'd get a single button press to:

   1. Close Tiddler1
   2. Overwrite the contents of Tiddler1
   3. Open Tiddler1


-- 
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/6e96d4e0-3880-4a19-9015-ac2c13b1ca00%40googlegroups.com.


[tw5] Invoke url in iframe with a button using JavaScript

2019-12-25 Thread The Islander
Hi all,

On my TW5 I had a page inside an iframe in Tiddler1 (it's a dice roller). 
The iframe has an id of "myIframe".

The url inside the iframe can take parameter inputs like http://somewhere.c
om/myIframeRequest.html?param1=value0=value1

I wanted one or more buttons in Tiddler2 to change the iframe url such as 
the following:

function myFunction(){
$('#myIframe').attr('src', "myIframeRequest.html?param1=value2=value3"); 
} 


Any idea how I'd achieve that?

The use case is that inside the frame is a dice roller, and Tiddler2 is an 
info sheet that is interested in different dice rolls with a single click 
of a button.

Thanks!



-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7d1765de-2b13-4096-a657-586930724307%40googlegroups.com.