[TW5] How do I change title prefix of multiple tiddlers at once

78 views
Skip to first unread message

CL

unread,
Jun 22, 2016, 1:24:03 AM6/22/16
to TiddlyWiki
I have list of tiddlers with prefix of 'Book'. I am trying to change this prefix to 'Article'. For example,

* Book: AAAAAA
* Book: BBBBBB
* Book: CCCCCC
* Book: DDDDDD
* Book: EEEEEE

to

* Article: AAAAAA
* Article: BBBBBB
* Article: CCCCCC
* Article: DDDDDD
* Article: EEEEEE

How can I achieve this with macro?

Best wishes,
CL

Jed Carty

unread,
Jun 22, 2016, 3:05:02 AM6/22/16
to TiddlyWiki
Before trying this make sure you back up your wiki, otherwise if it breaks you would lose everything.

I am not sure if you want all tiddlers with the prefix 'Book' to be changed to 'Article' or just some subset of them. I am going to assume all of them.

Try this button:

<$button>Magical Button of Magic
<$list filter='[prefix[Book:]]' variable=OriginalTiddler>
<$list filter='[<OriginalTiddler>removeprefix[Book:]addprefix[Article:]]' variable=NewTitle>
<$action-setfield $tiddler=<<OriginalTiddler>> title=<<NewTitle>>/>
<$action-deletetiddler $tiddler=<<OriginalTiddler>>/>
</$list>
</$list>
</$button>

CL

unread,
Jun 22, 2016, 3:34:41 AM6/22/16
to TiddlyWiki
Thank you so much Jed. That was exactly what I meant to do. I really appreciate for your work!


Reply all
Reply to author
Forward
0 new messages