Using a filter to return a list of tiddlers, and then tagging several tiddlers in one go, and setting their caption field?

181 views
Skip to first unread message

leeand00

unread,
Dec 3, 2015, 12:21:22 PM12/3/15
to TiddlyWiki
The new version of TW5 is great, I especially like the new tab tagging feature...

However setting that up becomes laborious on occasion since I have to go to each tiddler in the gui and set it and it's number manually.

I'm thinking it would be neat to try this in Javascript as a plugin or something, but I was wondering if there's a way to do this with the existing functionality.

Thank you,
   Andrew J. Leer

Jed Carty

unread,
Dec 3, 2015, 12:45:14 PM12/3/15
to TiddlyWiki
I don't know what you mean by tab tagging feature, but it sounds like this may be helpful. If that isn't what you want then please give a bit more information about what you are looking for.

Tobias Beer

unread,
Dec 3, 2015, 6:32:51 PM12/3/15
to TiddlyWiki
Hi Andrew,
 
the new tab tagging feature

Which one would that be? 
 
I'm thinking it would be neat to try this in Javascript as a plugin or something, but I was wondering if there's a way to do this with the existing functionality.

It would be great if you could break down what you are trying to achieve to the most simple of terms.
Right now, I would not know, what caption(s) or tag(s) you would want to set and how and why.
Are you suggesting a feature whereby you...
  1. specify a filter
  2. select any/all items matching the filter
  3. have an edit box to edit the caption of each
  4. assign / or perhaps also remove a given tag
?

Best wishes,

Tobias.

Matabele

unread,
Dec 4, 2015, 5:28:14 AM12/4/15
to TiddlyWiki
Hi

Don't know exactly what you are looking for, but it is possible to place a $list widget containing action-widgets within a $button widget -- like this:

<$button tooltip="Modify All">
<$list filter="[tag[MyTag]]">
<$action-setfield $tiddler=<
<currentTiddler>> tags="[[tag one]] [[tag two]]" caption="something"/>
</$list>
Modify All

</$button>

regards

leeand00

unread,
Dec 4, 2015, 10:10:51 AM12/4/15
to TiddlyWiki

Matabele, that's almost perfect! 

To clear up the confusion, I put alot of examples in my wikis; and it's easier to view these on tabs, they make a great reference.  However, I get annoyed when I have to scroll up; and then scroll down, and then scroll up...etc... to set all of the tags on all of the tiddlers. 

When I use the <<tabs>> macro I use a filter to gather together all of the fields based on a common tag (usually sorting them, but not always)...Note that in your code example, using the <$action-setfield>'s tag attribute, I had to put a in it to tag it using a tag with spaces. 

Now what you have in the code here is great; it allows me to use a [prefix[]] or [sufix[]] in the filter to gather the tiddlers and add tags to them...

Now I only have three issues left...generating new tiddlers with a similar name (but not the same name) programmatically....automatically adding an edit link to bring up the tiddler in the tab..., and optionally setting the caption to a substring or regex of the <<currentTiddler>>'s title; or setting the caption programmatically to an incrementing sequence of numbers...being able to do this combined with your example, will allow me to create my tabs without scrolling up and down all the time...

Sorry I'm such a noob with the new syntax...there are alot of things in TW5 it's a little difficult to know where to look without talking to someone about it first.

Making the example tabs manually instead of programmatically really slows me down; when I used TW Classic, I used to make these using PhraseExpress macros, but I personally am not crazy about using a free tool that's basically a keylogger.

Thank you for your example!

leeand00

unread,
Dec 4, 2015, 10:19:03 AM12/4/15
to TiddlyWiki

Honestly I think in sequence it could work like this:

1. Create a Tiddler with a title that is somewhat common to all the tabs...we'll call this the parentTiddler
2. Click a <$button> of some sort....that you click on and it will request either a list of suffixes to create, or the number of tiddlers you wish to have tabs for...
3. Create each of the new tiddlers with a title of "parentTiddler + [ suffix[x] or x ]" and set the caption to "suffix[x] or x"; and also set an [edit|Tiddler Title] in the content of the new Tiddler so we can edit it later.
4. In parentTiddler set the content to <<tabs [tags[parentTiddlerTitle]sort[]]>> to sort the tabs.
5. Done.



On Friday, 4 December 2015 05:28:14 UTC-5, Matabele wrote:

Matabele

unread,
Dec 4, 2015, 10:53:27 AM12/4/15
to TiddlyWiki
Hi

To create a number of tiddlers with similar names, have a look at my $x-maketid widget from here. Each successive call of the widget will generate a unique title -- using either a date/time stamp or an integer index. 

A number of tiddlers with different root titles may be created using a $list filter with the filter expression including entries from a list (of titles) as a wrapper around the $x-maketid widget (passing the title via the <<currentTiddler>> variable.)

regards

leeand00

unread,
Dec 7, 2015, 7:54:18 AM12/7/15
to TiddlyWiki
These widgets are great!!!  Thank you for creating them!  But how do I pull them into my own wiki?

Matabele

unread,
Dec 7, 2015, 8:33:53 AM12/7/15
to tiddl...@googlegroups.com
Hi

There's a link at the bottom of the page:
-- drag the link $:/plugins/matabele/extended-button-widgets over to your wiki
-- save your wiki
-- refresh your wiki
and you're good to go.

The plugin is in need of updating as the $x-mangletags widget has now been superseded by the $action-listops widget (now added to the core.)

Currently, it might be preferable to first update your wiki to 5.1.10-pre-release (or fetch the $action-listops widget from here) -- then open the link above and drag across only the $x-maketid widget itself ($:/plugins/matabele/x-maketid.js)

regards
Reply all
Reply to author
Forward
0 new messages