[tw5] Re: What is the purpose of source field in a tiddler?

2020-09-06 Thread TW Tones
This answer lays with yourself.

Perhaps fine if your not editing the plugin Tiddler.

However can I suggest source-link

The reason is you could then write wiki text to turn the contents of any 
field name with -link into a link by the prefixes name

E.g. source is the title of a link stored in source-link

Perhaps a nice little defacto standard
Tony

On Monday, 7 September 2020 at 07:17:57 UTC+10 talha131 wrote:

> Though I could not find official documentation, but it seems source field 
> has special usage in TW.
>
> For example, this edition uses source field for creating a hierarchy of 
> tiddlers.
>
> http://tw5.scholars.tiddlyspot.com/
>
> It is also used for the source URL of a plugin.
>
> (optional) Source URL of plugin
>
> https://tiddlywiki.com/static/Plugin%2520Fields.html
>
> My understanding is that it is better to avoid source and use some other 
> custom field for my use case.
>
> Do let me know if my understanding is incorrect.
>

-- 
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/52ad4f7a-a5f0-4325-ae8b-54fb6f59d09cn%40googlegroups.com.


[tw5] Re: How do I remove a suffix from a variable?

2020-09-06 Thread Eric Shulman
On Saturday, September 5, 2020 at 12:05:24 PM UTC-7, leeand00 wrote:
>
> So I'm using a filter, and it's working great to remove the suffix and add 
> another one...see below:
> [tag[templates]tag[EditingTemplate]] +[removesuffix[Template]] +[addsuffix
> [ - Underground]]
> But...what I really want to do here, is remove the suffix and add another 
> one in a variable so I can create a bunch of template tiddlers:
>
> <$list filter="[tag[templates]tag[EditingTemplate]]">
><$set name="whichTiddlerTemplateName" value=<> >
><$set name="tiddlerToCreateFromTemplate" value="<
> > - Underground" >
>Use This Template: <>
>Create This Tiddler From Template: <>
>
>
>
> 
>
> In the second <$set> above (" tiddlerToCreateFromTemplate") I want to be 
> able to remove the template prefix the way I did in the filter...so that I 
> get  Spelling - Underground 
> 
>   
> instead of  Spelling Template - Underground 
> 
>   
> how do I do that?  
>

In addition to using filter syntax in the $list widget's filter="..." 
parameter,
you can also use the same filter syntax "inline" to compute a value
for *any* widget parameter by enclosing it within tripled curly braces {{{ 
[...] }}}

For your example, you can write this:
<$list filter="[tag[templates]tag[EditingTemplate]]">
   <$vars tiddlerToCreateFromTemplate={{{ 
[removesuffix[Template]addsuffix[ 
- Underground]] }}}
   Use This Template: <>
   Create This Tiddler From Template: <>
   
   


-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/f3258a5d-1e75-4761-90b5-69818ad78ff3o%40googlegroups.com.


[tw5] Re: How to show a list of tiddlers linked or transcluded or used inside via macro in the tiddler?

2020-09-06 Thread talha131


>From what I looked up, it does not seem possible. All the solutions are 
made on top of “Reference” tab. None of them take into account tiddlers 
transcluded in the tiddler.

For example,

   1. https://akhater.github.io/drift/ 
   2. https://hchaase.github.io/HC-Plugins/ 
   3. https://tobibeer.github.io/tb5/#taggly 

All of them work flawlessly with tiddlers linked via internal link markup. 
But do not work with translucded tiddlers, which leads me to think, this 
task is impossible or at least not trivial to pull off.
​

-- 
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/57211f24-e275-4dbe-8875-01cd90de2f9co%40googlegroups.com.


[tw5] Re: How do I remove a suffix from a variable?

2020-09-06 Thread Saq Imtiaz
Not sure you need the JavaScript.

Assuming input:
Spelling Template 

Desired output:
Spelling - Underground

Try:

<$set name="tiddlerToCreateFromTemplate" 
value={{{[removeSuffix[Template]addSuffix[- 
Underground]]}}} >

OR

<$set name="tiddlerToCreateFromTemplate" 
value={{{[split[Template]join[]addSuffix[ - 
Underground]]}}} >

You can also do :
{{{[removeSuffix[Template]addSuffix[- 
Underground]]}}}

to directly create a link instead of setting to a variable.

-- 
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/2902ad21-8992-4ce4-b398-829582ebc4afo%40googlegroups.com.


[tw5] Re: How do I remove a suffix from a variable?

2020-09-06 Thread leeand00
Okay I got it...had to make a small plugin, but it appears to work...

/*\ title: $:/core/modules/macros/tw5filterTemplatePrefix.js 
  type: application/javascript module-type: macro Macro to return 
something less the prefix. 
 \*/ 
(function(){ /*jslint node: true, browser: true */ 
 /*global $tw: false */ 
 "use strict"; 
 /* Information about this macro */ 

exports.name = "tw5filterTemplatePrefix"; 
exports.params = [ {name: "m"} ]; 

   /* Run the macro m: is the Tiddler Template Title returns: The name of 
the Tiddler less the template. */ 
   exports.run = function(m, v) { return m.replace(/Template/i, ""); }; 
 })();  

*$:/core/modules/macros/tw5filterTemplatePrefix.js  *


\define testCreate()


<$action-setfield $tiddler="$:/state/tab-1749438307" 
text="$(tiddlerToCreate)$ - $(dasSuffix)$" />


<>

\end


\define createDasTid()

<$action-createtiddler $template="$(whichTiddlerTemplate)$" 
$basetitle={{$:/state/tab-1749438307}}  tags="deltag"  />

\end

\define removeTemplatePrefix()

<>
\end


''Suffix:'' <$edit-text tiddler="$:/state/new-tiddler-suffix" tag="input" 
default=""/>


<$button>


<$list filter="[tag[templates]tag[EditingTemplate]]">


<$set name="dasSuffix" value={{$:/state/new-tiddler-suffix}}>
   
 <$set name="whichTiddlerTemplate" value=<> >
 
  <$wikify name="tiddlerToCreate" text=<> >
   
   <>
 
  


Create From Editing Template


*Tiddler: CreateTiddlersFromTemplates*

This appears to work if you leave all the  comments out, I should 
probably add something for the tags as well.

On Saturday, 5 September 2020 at 15:59:13 UTC-4 saq.i...@gmail.com wrote:

> PS: I realize now you may want addSuffix and not removeSuffix. Apologies.
>
>
> On Saturday, September 5, 2020 at 9:57:05 PM UTC+2, Saq Imtiaz wrote:
>>
>> Something along these lines will get you there:
>>
>> <$set name="tiddlerToCreateFromTemplate" 
>> value={{{[removeSuffix[Underground]]}}} >
>>
>> OR simplify
>>
>> <$list filter="[tag[templates]tag[EditingTemplate]]">
>> <$set name="tiddlerToCreateFromTemplate" 
>> value={{{[removeSuffix[Underground]]}}} >
>> Use This Template: <>
>> Create This Tiddler From Template: <>
>> 
>> 
>> 
>>
>> On Saturday, September 5, 2020 at 9:05:24 PM UTC+2, leeand00 wrote:
>>>
>>> So I'm using a filter, and it's working great to remove the suffix and 
>>> add another one...see below:
>>>
>>> [tag[templates]tag[EditingTemplate]] +[removesuffix[Template]] 
>>> +[addsuffix[ - Underground]]
>>>
>>> Result:
>>>
>>> Spelling - Underground 
>>> 
>>> PunctuationMistakes - Underground 
>>> 
>>> VerbMistakes - Underground 
>>> 
>>> CheckAdverbAdjectiveMistakes - Underground 
>>> 
>>> CheckForUnnecesaryWordsMistakes - Underground 
>>> 
>>> LookForWeakSentancesAndPhrasesThatNeedMoreInformation - Underground 
>>> 
>>> LookForRepetitionOfWordsOrPhrases - Underground 
>>> 
>>> LookForVaguePhrases - Underground 
>>> 
>>> CheckParagraphing - Underground 
>>> 
>>> CheckForDumbOrIllogicalStatements - Underground 
>>> 
>>> CheckForColloquialismsSlangInformalPhrases - Underground 
>>> 
>>>
>>> But...what I really want to do here, is remove the suffix and add 
>>> another one in a variable so I can create a bunch of template tiddlers:
>>>
>>> <$list filter="[tag[templates]tag[EditingTemplate]]">
>>>   <$set name="whichTiddlerTemplateName" value=<> >
>>><$set name="tiddlerToCreateFromTemplate" 
>>> value="<> - Underground" >
>>> Use This Template: <>
>>> Create This Tiddler From Template: <>
>>> 
>>> 
>>> 
>>> 
>>>
>>> In the second <$set> 

[tw5] How to show a list of tiddlers linked or transcluded or used inside via macro in the tiddler?

2020-09-06 Thread talha131


I have noticed that when you link to tiddlers using [[Tiddler Title] then 
it updates the “Reference” tab of the tiddler info.

But if I only transclude the tiddler {{Tiddler Title}} or use a macro,

<>

Then the tiddler does not end up in the “Reference” tab.

I am looking for a way to show related tiddlers in a section of the tiddler 
body. I understand that I can leverage ViewTemplate to modify the tiddler 
body.

But how do I get a list of tiddlers mentioned in the text using links, 
transclusion, and macros?
​

-- 
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/2d4862b3-f9c7-4c5b-ac58-0a3db858be32o%40googlegroups.com.


Re: [tw5] Re: Adjusting IFrame Trick I would like to implement in TW

2020-09-06 Thread Jan

Hi Steve,
to adjust the size -as Eric pointed out- the source of the Iframe has to 
point to the same domain.

So if you are running an instance of ethercalc there, this should work.

Best wishes Jan.

Am 06.09.2020 um 12:00 schrieb Ste:

Could this be used with ethercalc (https://ethercalc.net/) or other node.js 
apps?

I remember someone dropped social Calc spreadsheets into tiddlywiki ages and 
ages ago.



--
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/5F5551A1.9010304%40googlemail.com.


[tw5] Re: What is the purpose of source field in a tiddler?

2020-09-06 Thread talha131


Though I could not find official documentation, but it seems source field 
has special usage in TW.

For example, this edition uses source field for creating a hierarchy of 
tiddlers.

http://tw5.scholars.tiddlyspot.com/

It is also used for the source URL of a plugin.

(optional) Source URL of plugin

https://tiddlywiki.com/static/Plugin%2520Fields.html

My understanding is that it is better to avoid source and use some other 
custom field for my use case.

Do let me know if my understanding is incorrect.
​

-- 
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/8cc5eb6b-1a2a-42be-861e-5b83e14f13b7o%40googlegroups.com.


[tw5] Re: Few question about using @@ construction to style the tiddlers

2020-09-06 Thread talha131
Yeah, Eric. I meant that's the solution I used. 

-- 
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/380d9da6-62bd-4a58-9fd0-8d8d28f649f4o%40googlegroups.com.


[tw5] Re: Few question about using @@ construction to style the tiddlers

2020-09-06 Thread Eric Shulman
On Sunday, September 6, 2020 at 11:22:37 AM UTC-7, talha131 wrote:
>
> Thank you Mat. I ended up using your solution.
>

Just to note... we discussed this just 4 days ago in the topic titled 
"Regarding list bullets"

In fact, this is *exact* same solution that YOU yourself posted, here:
https://groups.google.com/d/msg/tiddlywiki/sl8pm8XgLGA/s7XNca_NAQAJ

-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/522e74fb-0514-4d43-b30e-ee0b9de73119o%40googlegroups.com.


[tw5] What is the purpose of source field in a tiddler?

2020-09-06 Thread talha131


As per the docs :

source is field is used by the core for

The source URL associated with a tiddler

Is there a practical example of it being used?
What I am looking for? 

I want to add a field that can be used for links to the source of the 
tiddler. Say I copy the content from Wikipedia and I want to mention the 
link the Wikipedia article. 

Can I use source field for it? Or should I add a new field like url?

I can then customize ViewTemplate to automatically show the source url in 
the body of the tiddler. But which field should I use?
​

-- 
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/a90536c7-15c9-4ce9-9dc1-c50885d7abf3o%40googlegroups.com.


[tw5] Re: Variables in title when clicking "New Tiddler" button?

2020-09-06 Thread Eric Shulman
On Sunday, September 6, 2020 at 9:02:15 AM UTC-7, Logan Chin wrote:
>
> I have created a "New Tiddler" button to press for each new lecture of a 
> given class; I have designed it such that the requisite course tags/fields 
> are filled every time a new tidier is created.
> I am wondering if there is some way to automate the date in the *title* 
> of the tiddler? Or would it be possible to have a title such as 
> "Lecture#(x)" in which every click increases x by 1?
>

Try this:

1) Create a tiddler called "NewLectureButton", containing:
\define addLecture()
<$vars num={{{ [prefixsort[modified]last[]split[Lecture 
#]rest[]else[0]add[1]] }}}>
<$vars newTitle={{{ [addsuffix[ Lecture #]addsuffix] 
}}}>
<$set name="newTags" filter="[]">
<$action-sendmessage $message="tm-new-tiddler" title=<> 
tags=<>
   year=<> month=<> day=<>
/>
\end
<$button actions=<>>New Lecture

Then, to use it:
1) Create a tiddler with a given course title (e.g., "Intro to Poly Sci") 
and tag (e.g., "IntrotoPolySci")
2) Enter whatever text you like (e.g., a course description, professor's 
name, room #, etc.)
3) Include the following somewhere in the content:
{{||NewLectureButton}}

How it works:
* The NewLectureButton tiddler displays a button that triggers an "action 
macro" (addLecture) when pressed.  This macro performs the following steps:
* "$vars num=..." calculates the next lecture number:
** Find all tiddlers that start with the course name 
(prefix)
** Get the most recent one (sort[modified]last[])
** Remove everything except the last lecture number (split[Lecture #]rest[])
** If this is the first lecture, use default number (else[0])
** Add 1 to the last lecture number (add[1])
* "$vars newTitle=..." constructs the new title by adding " Lecture #n" to 
the end of the course name (i.e., the current tiddler title)
* "$set name=newTags..." constructs a new tag from the course name, 
allowing for spaces in the course name (e.g., "Basket Weaving 101")
* The action-sendmessage create a new tiddler, opened for editing, using 
the calculated title, tags, year, month, and day

Let me know how it goes...

enjoy,
-e

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


[tw5] Re: How to apply a macro or a template to all the tag tiddlers?

2020-09-06 Thread talha131


Genius solution Eric!
​

-- 
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/ef4e5a0d-9453-40fe-8d81-881afffe1598o%40googlegroups.com.


[tw5] Re: Few question about using @@ construction to style the tiddlers

2020-09-06 Thread talha131
Thank you Mat. I ended up using your solution.

-- 
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/6c9f09a1-c6db-4895-a284-7c8274849fd0o%40googlegroups.com.


[tw5] Re: Few question about using @@ construction to style the tiddlers

2020-09-06 Thread Mat
@talha131 ...or maybe I should say @@.talha131  ;-)

Try this

@@.myclass
*foo
**bar
@@


.myclass li {list-style-type: decimal; } 
.myclass li li {list-style-type: lower-alpha; }


i.e you define a new class and apply this class. In the above, the class is 
defined in a local styleblock. If you want to use it globally you should 
instead move the content that is between the style tags into a stylesheet 
tiddler, i.e any tiddler tagged "$:/tags/Stylesheet" and with the type 
"Static stylesheet"

<:-)

-- 
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/0af376d5-126f-48a6-bdc0-423759b1091fo%40googlegroups.com.


[tw5] Re: How to transclude raw contents of a shadow tiddler

2020-09-06 Thread talha131


Thank you Saq. This was helpful. I ran it on a couple of shadow tiddlers 
and fixed my configuration using compareTiddlerText.
​

-- 
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/27aab8a5-f1f5-4160-8a25-e70682f35f8bo%40googlegroups.com.


[tw5] Variables in title when clicking "New Tiddler" button?

2020-09-06 Thread Logan Chin
Hi all,

I've spent the past couple days trying to optimize my wiki for when school 
starts.

I have created a "New Tiddler" button to press for each new lecture of a 
given class; I have designed it such that the requisite course tags/fields 
are filled every time a new tidier is created.

 I am wondering if there is some way to automate the date in the *title* of 
the tiddler? Or would it be possible to have a title such as "Lecture#(x)" 
in which every click increases x by 1? I have provided the code below:

<$button>
<$action-sendmessage $message="tm-new-tiddler"
   title=""
   tags= "[[IntrotoPolySci]]"
   year=<>
   month=<>
   day=<>
/>
New Lecture


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/cfd08037-592f-49ae-a858-2a62fe96f405n%40googlegroups.com.


[tw5] Re: Global wikilink styling depending on the target "weight" field value

2020-09-06 Thread Shareda
(that's why i drill to link.js widget). Soon I will try to apply your way 
(Transclusion with Templates) with backlinks and other link structure 
features in my wiki.

воскресенье, 6 сентября 2020 г. в 21:29:27 UTC+6, Shareda: 

> Oh, good and clear enough for me! Thank you! One more detail: what if i 
> have links like [[form of keyword|original keyword]] ? How can I remake it 
> or play around?
> I already have one mechanism based on macros like < "original keyword">> but it is not good becuse of backlinks are not tracing 
> throuh this macro. 
> воскресенье, 6 сентября 2020 г. в 18:53:15 UTC+6, Eric Shulman: 
>
>> On Sunday, September 6, 2020 at 4:52:32 AM UTC-7, Shareda wrote:
>>>
>>> Hello! I want to improve link styling in my TiddlyWiki, and I need some 
>>> help. In my wiki almost every tiddler describes some concept. Each concept 
>>> (tiddler) has a numerical field "weight". I want links to any concept 
>>> tiddler that has a "weight" field to be displayed with style="background: 
>>> rgba(255,0,0,)". I found the widget link.js, but for some 
>>> reason my changes do not affect the display. Where exactly should I insert 
>>> my code so that all wikilinks follow this style. I am new to JavaScript and 
>>> TW inner architecture , so it would be very good to get correct code.  
>>>
>>
>> You can achieve this styling with just a small change in the way you 
>> enter your links, without modifying any TWCore javascript code.
>>
>> First, wherever you want to embed a weighted link instead of writing just
>> TiddlerTitle or [[Tiddler Title]]
>> you write:
>> {{TiddlerTitle||wlink}} or {{Tiddler Title||wlink}}
>> This syntax is called "Transclusion with Templates" (see 
>> https://tiddlywiki.com/#Transclusion%20with%20Templates).
>> What it does is to render the indicated tiddler title, using the content 
>> from "wlink" (short for "weighted link").
>>
>> Then, create the "wlink" tiddler, containing this text:
>> <$link>
>>> addsuffix[ / 100));]] }}}>
>>   <>
>>
>> 
>>
>> Notes:
>> * Within this "template" tiddler, the currentTiddler value is the 
>> TiddlerTitle you specified in the transclusion syntax
>> * The $link widget outputs a link (using the currentTiddler value as its 
>> default target)
>> * The span inside the $link constructs the style using an "inline filter" 
>> (the {{{ [...] }}} syntax)
>> * This inline filter starts with literal text: "
>> *background:rgba(255,0,0,calc(*", then appends a value retrieved from 
>> the "weight" field of the currentTiddler, and then adds the remaining 
>> literal text:  "*/ 100));*"
>> * Thus, the resulting style is: "*background:rgba(255,0,0,calc(nnn **/ 
>> 100));*", where "nnn" is the value from the weight field.
>> * Finally, inside the span, the actual tiddler title is displayed
>>
>> enjoy,
>> -e
>>
>

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


[tw5] Re: How to apply a macro or a template to all the tag tiddlers?

2020-09-06 Thread Eric Shulman
On Sunday, September 6, 2020 at 8:17:02 AM UTC-7, talha131 wrote:

> I have a macro, which basically list all the tiddlers tagged with the 
> current tiddler in a vertical tab list 
> How do I automatically apply it to all the tiddler that are a tag?
> Say I create a new tag example. Then,
>
>1. A tiddler named example should automatically get created
>2. example tiddler should automatically show the tiddlers with the tag 
>example in a vertical tab list
>3. If I edit the example tiddler with some other content then the 
>vertical tag should stop showing. Instead it should the content I manually 
>entered.
>
> Try this:

1) Create a tiddler (e.g, "TagTabs"), tagged with $:/tags/ViewTemplate, 
containing: 
<$list filter="[taglimit[1]]" variable="is_a_tag">
<$list filter="[!has[text]]" variable="has_no_text">

<$macrocall $name="tabs" 
tabsList="[tag]"
default=<<__defaultTid__>>
state="$:/state/tab1" 
class="tc-vertical" 
template="$:/talha131/Template/VerticalTab"
retain="no"
/>


 

Notes:
* Tagging this tiddler with $:/tags/ViewTemplate adds the content to every 
tiddler
* The first $list checks to see if the current tiddler is a tag
* The second $list checks to see if the current tiddler has a blank text 
field
* If both conditions are met, then the <$macrocall> is shown, otherwise 
nothing is shown

enjoy,
-e


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7caa266a-70bf-4448-b7f8-67cc182aa1fbo%40googlegroups.com.


[tw5] Re: Global wikilink styling depending on the target "weight" field value

2020-09-06 Thread Shareda
Oh, good and clear enough for me! Thank you! One more detail: what if i 
have links like [[form of keyword|original keyword]] ? How can I remake it 
or play around?
I already have one mechanism based on macros like <> but it is not good becuse of backlinks are not tracing 
throuh this macro. 
воскресенье, 6 сентября 2020 г. в 18:53:15 UTC+6, Eric Shulman: 

> On Sunday, September 6, 2020 at 4:52:32 AM UTC-7, Shareda wrote:
>>
>> Hello! I want to improve link styling in my TiddlyWiki, and I need some 
>> help. In my wiki almost every tiddler describes some concept. Each concept 
>> (tiddler) has a numerical field "weight". I want links to any concept 
>> tiddler that has a "weight" field to be displayed with style="background: 
>> rgba(255,0,0,)". I found the widget link.js, but for some 
>> reason my changes do not affect the display. Where exactly should I insert 
>> my code so that all wikilinks follow this style. I am new to JavaScript and 
>> TW inner architecture , so it would be very good to get correct code.  
>>
>
> You can achieve this styling with just a small change in the way you enter 
> your links, without modifying any TWCore javascript code.
>
> First, wherever you want to embed a weighted link instead of writing just
> TiddlerTitle or [[Tiddler Title]]
> you write:
> {{TiddlerTitle||wlink}} or {{Tiddler Title||wlink}}
> This syntax is called "Transclusion with Templates" (see 
> https://tiddlywiki.com/#Transclusion%20with%20Templates).
> What it does is to render the indicated tiddler title, using the content 
> from "wlink" (short for "weighted link").
>
> Then, create the "wlink" tiddler, containing this text:
> <$link>
> addsuffix[ / 100));]] }}}>
>   <>
>
> 
>
> Notes:
> * Within this "template" tiddler, the currentTiddler value is the 
> TiddlerTitle you specified in the transclusion syntax
> * The $link widget outputs a link (using the currentTiddler value as its 
> default target)
> * The span inside the $link constructs the style using an "inline filter" 
> (the {{{ [...] }}} syntax)
> * This inline filter starts with literal text: "
> *background:rgba(255,0,0,calc(*", then appends a value retrieved from the 
> "weight" field of the currentTiddler, and then adds the remaining literal 
> text:  "*/ 100));*"
> * Thus, the resulting style is: "*background:rgba(255,0,0,calc(nnn **/ 
> 100));*", where "nnn" is the value from the weight field.
> * Finally, inside the span, the actual tiddler title is displayed
>
> enjoy,
> -e
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9156fd55-d7e5-4e3c-bba2-b3c297b222adn%40googlegroups.com.


[tw5] How to apply a macro or a template to all the tag tiddlers?

2020-09-06 Thread talha131


I have a macro, which basically list all the tiddlers tagged with the 
current tiddler in a vertical tab list

\define tagVerticalTabsUnsorted(defaultTid:"")

@@float:right;
{{||$:/core/ui/TagTemplate}}
@@
<$macrocall $name="tabs" 
tabsList="[tag]"default=<<__defaultTid__>>
state="$:/state/tab1" 
class="tc-vertical" 
template="$:/talha131/Template/VerticalTab"
retain="no"
/>

\end

How do I automatically apply it to all the tiddler that are a tag?

Say I create a new tag example. Then,

   1. A tiddler named example should automatically get created 
   2. example tiddler should automatically show the tiddlers with the tag 
   example in a vertical tab list 
   3. If I edit the example tiddler with some other content then the 
   vertical tag should stop showing. Instead it should the content I manually 
   entered. 

Is it possible in TW?

-- 
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/b26778f9-381e-4d78-9a06-80b359078566n%40googlegroups.com.


[tw5] Re: New TiddlyTools time feature: **Interactive Calendar**

2020-09-06 Thread cmari
Hi Eric,
Perhaps your ticket could be a nudge for this one 
?
cmari

On Saturday, September 5, 2020 at 1:17:29 AM UTC-7 Eric Shulman wrote:

> On Saturday, September 5, 2020 at 1:05:12 AM UTC-7, TW Tones wrote:
>>
>> Fine in 10+ time zone now thanks
>>
>
> Saq and Tony:  YAY! 
>
> I think I should open a ticket re: sameday[...] needing a full 17-digit 
> time value if not in UTC+0 zone.
>
> Note: sameday[...] works OK in the <> macro because it gets a 
> complete 17-digit date param from an existing tiddler:
> <$list 
> filter="[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]eachday[$dateField$]]">
> and then uses sameday:$dateField${!!$dateField$} to find all the other 
> tiddlers for that date.
>
> -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/27f6218b-3d9c-4391-92cd-3a1c74aa76a0n%40googlegroups.com.


[tw5] Re: Few question about using @@ construction to style the tiddlers

2020-09-06 Thread talha131


Thank you Brian. I was trying to achieve something like this 

li {list-style-type: decimal; } li li {list-style-type: lower-alpha; }

But it seems nesting rules using @@ is not possible.
​

-- 
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/f6ba4a84-c607-44c3-8563-3dd90f3e992eo%40googlegroups.com.


[tw5] Re: Code in code

2020-09-06 Thread vinvi...@gmail.com
Eric, 

I have solved the problem. Have upgraded to a new version of the plugin. 
It's working.

Many thanks for your help


Op zaterdag 5 september 2020 om 22:40:18 UTC+2 schreef Eric Shulman:

> On Saturday, September 5, 2020 at 12:58:44 PM UTC-7, vinvi...@gmail.com 
> wrote:
>>
>> I see what you mean .. Somehow that happened with cut and paste. I don't 
>> have it in my wiki that way.
>> Here's what I've got so far: (The page title will now appear as a link, 
>> the rest still doesn't work.) 
>>
>> <$macrocall $name="details" sum="<$link/>" src="""<> filter:""[tagtag[NAME-OF-TAG]]">>""" class="alert-primary"/>
>>
>
> I see TWO double-quotes immediately after *filter:* ... there should be 
> only one.
>
> -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/238943d0-c15c-462a-819d-8af1d6fed230n%40googlegroups.com.


[tw5] Re: How do I change the order of already opened tiddlers in the story river?

2020-09-06 Thread talha131
OMG. So simple. 

Thanks a lot, Eric. TW is powerful, but it is made even more robust by 
active gurus like 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3bd55ad5-b3e8-4c02-8705-0787af98o%40googlegroups.com.


[tw5] Re: How do I change the order of already opened tiddlers in the story river?

2020-09-06 Thread Eric Shulman
On Sunday, September 6, 2020 at 5:49:03 AM UTC-7, talha131 wrote:
>
> Say I have opened four tiddlers.
> Is it possible to change the order so that C comes on top? Like so
> I am not trying to keep the tiddler C always on top. I want to change the 
> order temporarily in the story river.
>

This can be done using drag-and-drop in the SideBar "open" tab (which shows 
the current contents of the $:/StoryList!!list field)
Just grab the title of a tiddler and drag it to the desired position in the 
list.
A dashed green box will show you where the title will be inserted when 
dropped.

enjoy,
-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/74a450f3-6883-49d2-a559-895527883cf2o%40googlegroups.com.


[tw5] Re: New TiddlyTools time feature: **Interactive Calendar**

2020-09-06 Thread David Gifford
I added all the various timer, clock and calendar tools you have in that 
file, to the toolmap here 
(https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM#z=KD7kUsUIFmx3Us0teMLUILMI). 
Thanks for these great tools, Eric!

On Friday, September 4, 2020 at 9:49:01 PM UTC-5 Eric Shulman wrote:

> Hi all,
>
> I'm pleased to announce a new addition to my TiddlyTools suite of 
> time-related tiddlers: *Interactive calendar display*
>
> To install, just drag-and-drop the following tiddler into your document:
> http://tiddlytools.com/timer.html#TiddlyTools%2FTimer%2FCalendar
>
> Displays a yearly or monthly calendar with popups that show links to 
>> tiddlers
>>
>>- By default, the calendar displays the current year.
>>- Enter a year number or select a month to change the view. Press [X] 
>>to reset to the current year view.
>>- Click on a month title to toggle between annual and single-month 
>>view.
>>- Press [<<] to view the previous month. Press [>>] to view the next 
>>month.
>>- Dates on which tiddlers were created or modified and dates which 
>>have a Journal tiddler are colored light blue.
>>- Click a date to show a popup with links to tiddlers created or 
>>modified on that date.
>>- Press [pencil] to create or edit a Journal tiddler for that date.
>>- You can set the colors and font styles used by the calendar (see 
>>TiddlyTools/Timer/Setup 
>>
>> below).
>>
>> With either calendar display, you can easily see on which days you have 
>> *created 
> *or *modified *tiddlers,
> giving you a yearly or monthly view of your tiddler changes.  Then, click 
> on any date to view a popup
> that lets you view/edit a Journal tiddler for that date or quickly 
> navigate to any tiddlers created/modified
> on that date.
>
> *You can also add a monthly calendar directly in the SideBar tabs!...*
> To install, just drag-and-drop the following tiddler into your document:
> http://tiddlytools.com/timer.html#TiddlyTools%2FTimer%2FSidebarCalendar
> (note: the SidebarCalendar requires the installation of Calendar tiddler 
> as well)
>
> As a test, I dropped the Calendar into http://TiddlyWiki.com, and was 
> able to instantly see
> a "year-at-a-glance" overview of all the changes that Jeremy has made 
> since January 2020.
>
> Note: the Calendar currently excludes system tiddlers, so it doesn't show 
> changes to $:/state, $:/temp,
> and TWCore shadow tiddlers.  I will soon be adding a configuration setting 
> to allow customization of
> the Calendar filter so shadows and other system tiddlers can be included 
> if desired.
>
> enjoy,
> -e
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4e9b7ce5-b836-42da-84eb-281f38efea15n%40googlegroups.com.


[tw5] Re: Code in code

2020-09-06 Thread vinvi...@gmail.com
Hi Eric Shulman, I see..   Deleted the double quote. Still not working yet. 
Been working on it for hours now, but I can't figure it out. :((


[image: 2020-09-06 (4).png][image: 2020-09-06 (3).png]. 

Op zaterdag 5 september 2020 om 22:40:18 UTC+2 schreef Eric Shulman:

> On Saturday, September 5, 2020 at 12:58:44 PM UTC-7, vinvi...@gmail.com 
> wrote:
>>
>> I see what you mean .. Somehow that happened with cut and paste. I don't 
>> have it in my wiki that way.
>> Here's what I've got so far: (The page title will now appear as a link, 
>> the rest still doesn't work.) 
>>
>> <$macrocall $name="details" sum="<$link/>" src="""<> filter:""[tagtag[NAME-OF-TAG]]">>""" class="alert-primary"/>
>>
>
> I see TWO double-quotes immediately after *filter:* ... there should be 
> only one.
>
> -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/5a4083d3-f3f1-402f-9938-1af2b9017670n%40googlegroups.com.


[tw5] Re: Global wikilink styling depending on the target "weight" field value

2020-09-06 Thread Eric Shulman
On Sunday, September 6, 2020 at 4:52:32 AM UTC-7, Shareda wrote:
>
> Hello! I want to improve link styling in my TiddlyWiki, and I need some 
> help. In my wiki almost every tiddler describes some concept. Each concept 
> (tiddler) has a numerical field "weight". I want links to any concept 
> tiddler that has a "weight" field to be displayed with style="background: 
> rgba(255,0,0,)". I found the widget link.js, but for some 
> reason my changes do not affect the display. Where exactly should I insert 
> my code so that all wikilinks follow this style. I am new to JavaScript and 
> TW inner architecture , so it would be very good to get correct code.  
>

You can achieve this styling with just a small change in the way you enter 
your links, without modifying any TWCore javascript code.

First, wherever you want to embed a weighted link instead of writing just
TiddlerTitle or [[Tiddler Title]]
you write:
{{TiddlerTitle||wlink}} or {{Tiddler Title||wlink}}
This syntax is called "Transclusion with Templates" 
(see https://tiddlywiki.com/#Transclusion%20with%20Templates).  What it 
does is to render the indicated tiddler title, using the content from 
"wlink".

Then, create the "wlink" tiddler (short for "weighted link"), containing 
this text:
<$link>
   
  <>
   


Notes:
* Within this "template" tiddler, the "currentTiddler" value is the 
TiddlerTitle you specified in the transclusion syntax
* The $link widget outputs a link (using the currentTiddler value as its 
default target)
* The span inside the $link constructs the style using an "inline filter" 
(the {{{ [...] }}} syntax)
* This inline filter starts with literal text: "
*background:rgba(255,0,0,calc(*", then appends a value retrieved from the 
"weight" field of the current tiddler, and then adds the remaining literal 
text:  "*/ 100));*"
* Thus, the resulting style is: "*background:rgba(255,0,0,calc(nnn **/ 
100));*", where "nnn" is the value from the weight field.
* Finally, inside the span, the actual tiddler title is displayed

enjoy,
-e

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


[tw5] How do I change the order of already opened tiddlers in the story river?

2020-09-06 Thread talha131
Say I have opened four tiddlers.

1. A
2. B
3. C
4. D

Is it possible to change the order so that C comes on top? Like so

1. C
2. B
3. A
4. D

I am not trying to keep the tiddler C always on top. I want to change the 
order temporarily in the story river.

-- 
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/df95549c-fe63-4490-b73f-4ce19c05db80o%40googlegroups.com.


[tw5] Global wikilink styling depending on the target "weight" field value

2020-09-06 Thread Shareda
Hello! I want to improve link styling in my TiddlyWiki, and I need some 
help. In my wiki almost every tiddler describes some concept. Each concept 
(tiddler) has a numerical field "weight". I want links to any concept 
tiddler that has a "weight" field to be displayed with style="background: 
rgba(255,0,0,)". I found the widget link.js, but for some 
reason my changes do not affect the display. Where exactly should I insert 
my code so that all wikilinks follow this style. I am new to JavaScript and 
TW inner architecture , so it would be very good to get correct code.  

-- 
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/b03179ad-b100-4501-9972-5ca39c45a126n%40googlegroups.com.


[tw5] Re: Sort tiddlers by substring?

2020-09-06 Thread amreus
Eric,

Outstanding.  Thanks for sharing your expertise.

I happen to be using 5.1.23-prerelease, so the new sortsub filter works 
perfectly.  Also thank you for the example of splitting sub-strings using 
split and rest, as well as the technique for creating a temporary list, 
sorting that, and then deconstructing the list.  It's a mini master-class.

On Sunday, September 6, 2020 at 5:45:35 AM UTC-4 amreus wrote:

> Heh, thank. That is exactly my current solution.
>
> I am wondering if there could be a new filter (or option) in the "nsort" 
> family of filters which would ignore any non-number characters.  I looked 
> at the Javascript functions in sort.js and the sortTIddlers function in 
> wiki.js for a clue but I need to study that a bit more to understand how 
> sorting works. 
>
> My initial thought would be to use Javascript's String.replace() to remove 
> any non-numeric characters from the titles and then pass them on to nsort. 
>
> Thanks.
> On Saturday, September 5, 2020 at 6:05:30 PM UTC-4 Mark S. wrote:
>
>> You will likely save yourself hours of headaches if you create separate 
>> fields for id and name.
>>
>>
>> On Saturday, September 5, 2020 at 2:10:56 PM UTC-7, amreus wrote:
>>>
>>> My "people" tiddlers consist of the person's name and an ID number to 
>>> make them unique. How can I sort the tiddlers by the ID number?
>>>
>>> example title: *Karl Roger Stanton (I234)*
>>>
>>> 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/0d1da7da-167a-42c2-b0d5-e31e01641f52n%40googlegroups.com.


Re: [tw5] Re: Adjusting IFrame Trick I would like to implement in TW

2020-09-06 Thread Ste
Could this be used with ethercalc (https://ethercalc.net/) or other node.js 
apps? 

I remember someone dropped social Calc spreadsheets into tiddlywiki ages and 
ages ago. 

-- 
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/b9e0bef2-ad6c-4738-b24f-259bf5994efdo%40googlegroups.com.


[tw5] Re: Sort tiddlers by substring?

2020-09-06 Thread amreus
Heh, thank. That is exactly my current solution.

I am wondering if there could be a new filter (or option) in the "nsort" 
family of filters which would ignore any non-number characters.  I looked 
at the Javascript functions in sort.js and the sortTIddlers function in 
wiki.js for a clue but I need to study that a bit more to understand how 
sorting works. 

My initial thought would be to use Javascript's String.replace() to remove 
any non-numeric characters from the titles and then pass them on to nsort. 

Thanks.
On Saturday, September 5, 2020 at 6:05:30 PM UTC-4 Mark S. wrote:

> You will likely save yourself hours of headaches if you create separate 
> fields for id and name.
>
>
> On Saturday, September 5, 2020 at 2:10:56 PM UTC-7, amreus wrote:
>>
>> My "people" tiddlers consist of the person's name and an ID number to 
>> make them unique. How can I sort the tiddlers by the ID number?
>>
>> example title: *Karl Roger Stanton (I234)*
>>
>> 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/ad5841f2-eabe-4bbe-b328-31f2cf1ca354n%40googlegroups.com.