Want to add a tag to multiple tiddlers -- how?

1,520 views
Skip to first unread message

Shay Shaked

unread,
Aug 13, 2016, 5:57:06 PM8/13/16
to TiddlyWiki
Hey all, 

I have customized my journal style to include background.... but now. how do I add all my old journal tiddlers to the new tag? I must have around 50 of them. I don't want to go through each individual one and add a tag manually, there must be a better way I'm not aware of? 

Jan

unread,
Aug 13, 2016, 6:31:49 PM8/13/16
to tiddl...@googlegroups.com
Hej Shay!
Create this button

<$button>Tag with xxx
<$list filter='[list[$:/StoryList]]'>
<$fieldmangler tiddler=<<currentTiddler>>>
<$action-sendmessage $message='tm-add-tag' $param=xxx/>
</$fieldmangler>
</$list>
</$button>

replace xxx with the Tag you want to apply.
Open all the Tiddlers you want to tag in the story ('cause all tiddlers in the story will be tagged...)
And here you go.

Cheers Jan





Am 13.08.2016 um 23:57 schrieb Shay Shaked:
Hey all, 

I have customized my journal style to include background.... but now. how do I add all my old journal tiddlers to the new tag? I must have around 50 of them. I don't want to go through each individual one and add a tag manually, there must be a better way I'm not aware of? 
--
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+...@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/5e53015f-ebf4-44c5-982f-da4fe2a8c9ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shay Shaked

unread,
Aug 13, 2016, 10:24:55 PM8/13/16
to TiddlyWiki
nice! somewhat of a weird solution, but worked like charm. Thanks! 

Matabele

unread,
Aug 17, 2016, 12:33:25 AM8/17/16
to tiddl...@googlegroups.com
Hi

Jan's method is more simply rendered using the ActionListops widget -- like so:

<$button>Tag with xxx
<$list filter='[list[$:/StoryList]]'>
<$action-listops $tags="xxx"/>
</$list>
</$button>

Several new tags may be added at once (and the 'xxx' tag removed) -- like so:

<$button>Remove xxx and add new tags
<$list filter='[list[$:/StoryList]]'>
<$action-listops $tags="-xxx newtag1 newtag2 newtag3"/>
</$list>
</$button>

If you wish to make generalised buttons
-- all tiddlers in the story river can be tagged with the term entered in the search box
-- like so:

<$button>Tag with term in search box
<$list filter='[list[$:/StoryList]]'>
<$action-listops $tags="[{$:/temp/search}]"/>
</$list>
</$button>

-- and all tiddlers in the story river can have the tag corresponding to the term in the search box removed (reverse of above) -- like so:

<$button>Remove tag in search box
<$list filter='[list[$:/StoryList]]'>
<$action-listops $tags="-[{$:/temp/search}]"/>
</$list>
</$button>

regards

Jed Carty

unread,
Aug 17, 2016, 4:31:09 AM8/17/16
to TiddlyWiki
It may be a bit of overkill for what you are doing, but you could check out the tiddler tool thing I made a while back http://ooktech.com/jed/ExampleWikis/TiddlerTools/

stevesuny

unread,
Mar 13, 2017, 10:14:17 AM3/13/17
to TiddlyWiki
Hey everyone, thanks for this thread. Just found it, exactly what I needed.

Here is a somewhat simplified step-by-step:

  1. Make a copy of your wiki, and play in the copy
  2. Play with filters in advanced search until you have it just right, and then copy the filter into a new tiddler called tiddlers-filter.
  3. Copy code below into a new tiddler
  4. Replace TagNameHere with the desired tag
  5. Press the button

$set name="tag" value="TagNameHere">
<$button>
Tag <$count filter={{tiddlers-filter}}/> tiddlers with <<tag>>
<$list filter={{tiddlers-filter}}>
<$action-listops $tags=<<tag>>/>
</
$list>
</$button>
</
$set>


Pit.W.

unread,
Mar 22, 2017, 2:32:33 PM3/22/17
to tiddl...@googlegroups.com

Hi, all,

here is my humble tool for the tagging of a group of tiddlers  with the name of the current tiddler, using a search function.

I call it the "collection-footer", it is part of my view template.

In order to keep my GUI clean, I have a checkbox in a tiddler which is a conditional view template. This box toggles the tag "$:/tags/ViewTemplate"

The code is "stolen" from so many people on this mailing list, that I do not remember them, so I thank U all.


Pit



<$set name="collectTagName" value=<<currentTiddler>>>


@@color:red;font-size:8pt;''Enter the searchword:''
  <$edit-text tiddler="$:/temp/CollectTags/searchWord" tag="input" type="text" size=80/>
[[(e)|$:/+PGA2015/admin/footerCollect]]@@


<$scrollable class='tc-scrollable-demo'>

__Apply the tag  @@color:grey;[<$text text=<<collectTagName>>/>]@@ to the following tiddlers (sorted by creation date):__

<$list filter="[!has[draft.of]!is[system]search{$:/temp/CollectTags/searchWord}!title{!!title}!tag<collectTagName>sort[created]]">
"""
<$checkbox tag=<<collectTagName>>> <$link to={{!!title}}><$view field="title"/></$link></$checkbox> @@color:brown;//<$view field="summary"/>//@@
"""
</$list>

</$scrollable>

----

<$scrollable class='tc-scrollable-small'>

__These tiddlers have been included in the workfile: @@color:grey;[<$text text=<<collectTagName>>/>]@@__

<$list filter="[!has[draft.of]!is[system]search{$:/temp/CollectTags/searchWord}tag<collectTagName>sort[title]]">
"""
<$checkbox tag=<<collectTagName>>> <$link to={{!!title}}><$view field="title"/></$link></$checkbox>
"""
</$list>
 
</$scrollable>

</$set>
Reply all
Reply to author
Forward
0 new messages