[TW5] Batch tagging in TiddlyWiki 5

730 views
Skip to first unread message

Fred Zelders

unread,
Jun 15, 2018, 10:40:17 AM6/15/18
to TiddlyWiki

Is it possible to add a Tag (or Tags) to all my Tiddlers? If so, where can I find information about this feature?
Thanks for your contribution/answer.

@TiddlyTweeter

unread,
Jun 15, 2018, 11:54:25 AM6/15/18
to TiddlyWiki
There are many tools related to tagging, some do bulk operations .... see https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM#z=Wb-xfQvyYKG0Uzc3ZgEXnaKB

I'm not familiar with all of them ... Mat's Batch Manipulator I have used. Its not the easiest to grasp, but its powerful: http://batchmanipulator.tiddlyspot.com/

Best wishes
Josiah

Fred Zelders

unread,
Jun 15, 2018, 12:28:51 PM6/15/18
to TiddlyWiki
I found batchmanipulator indeed. But I can't figure out how to use it. The documentation is not clear to me 😞

Mark S.

unread,
Jun 15, 2018, 1:57:13 PM6/15/18
to TiddlyWiki
This is a quick-and-dirty solution.

Anything that can change ALL your tiddlers is obviously dangerous. Be sure to make a backup! This will change all regular tiddlers to whatever tag you specify. It will also change the modification date, so don't use this tool if the mod date is important.

\define myTagSetter()
<$list filter="[all[tiddlers]!prefix[$:/]]">
<$fieldmangler>
<$action-sendmessage $message="tm-add-tag" $param={{$:/mytag}} />
</$fieldmangler>
</
$list>
\end

Your tag: <$edit-text tiddler="$:/mytag" tag="input" size=10/><br/>

<$button actions=<<myTagSetter>>>
Set tag {{$:/mytag}}!
</
$button>



-- Mark
Message has been deleted

Fred Zelders

unread,
Jun 16, 2018, 12:28:19 PM6/16/18
to TiddlyWiki
Thanks Mark,
That worked!

:-) :-)

TonyM

unread,
Jun 18, 2018, 4:23:11 AM6/18/18
to TiddlyWiki
Just for fun, and to add to my code snipits,  I extended Marks solution to be not so quick-and-dirty, Providing an enter-able filter  preview 

\define myTagSetter()
<$list filter={{$:/myfilter}}>

<$fieldmangler>
<$action-sendmessage $message="tm-add-tag" $param={{$:/
mytag}} />
</$fieldmangler>
</
$list>
\end


Your filter: <$edit-text tiddler="$:/myfilter" tag="input" size=20 default="filter"/><br/>
<$list filter={{$:/myfilter}}>


</
$list>



Your tag: <$edit-text tiddler="$:/mytag" tag="input" size=10/><br/>


<$button actions=<<myTagSetter>>>
Set tag {{$:/mytag}}!
</
$button>

Not the <$list with an empty line will display the current tiddler title.

Regards
Tony
Message has been deleted

Fred Zelders

unread,
Jun 18, 2018, 5:31:08 AM6/18/18
to TiddlyWiki
That's nice TonyM.
However how do I have to use the filter option?
When I enter a filter string it shows up under the filter-field. Thats all.

TonyM

unread,
Jun 18, 2018, 6:21:10 AM6/18/18
to TiddlyWiki
If the filter is valid it should list the tiddlers it will effect. Then with a tag set it should tag them all when you click.

Tony

Message has been deleted

Fred Zelders

unread,
Jun 18, 2018, 8:37:37 AM6/18/18
to TiddlyWiki
This is what I get. No list with filtered Tiddlers 😞

fredzelders.stackstorage.com/s/4yr1Cq1VlqcPEfz
Reply all
Reply to author
Forward
0 new messages