Add Tag to Multiple Tiddlers Easily?

79 views
Skip to first unread message

David

unread,
Apr 3, 2020, 1:23:36 PM4/3/20
to TiddlyWiki
HOw can I add a tag to multiple Tiddlers easily?

I have a bunch of shopping items as tiddlers and they are already tagged with "ShoppingItem", and they are my SamsClub shopping list.  Now that I've gotten that working nicely, I'd like to bring in a couple more stores.  So I need to tag all the ShoppingItem tiddlers with a SamsClub tag.

As a workaround, I have a tiddler with this code in it, to identify the ShoppingItems that do NOT yet have the SamsClub tag.  It makes it easy to open them, edit them, and then save them.  To this maybe we could make it open up the tiddler in edit mode?  That would make things somewhat quick, though not as quick as a bulk tagger.

<$list filter="[tag[ShoppingItem]!tag[SamsClub]]" variable="item">
  <$link to=<
<item>> /><br>
</$list>


Eric Shulman

unread,
Apr 3, 2020, 1:41:54 PM4/3/20
to TiddlyWiki
On Friday, April 3, 2020 at 10:23:36 AM UTC-7, David wrote:
HOw can I add a tag to multiple Tiddlers easily?
I have a bunch of shopping items as tiddlers and they are already tagged with "ShoppingItem", and they are my SamsClub shopping list.  Now that I've gotten that working nicely, I'd like to bring in a couple more stores.  So I need to tag all the ShoppingItem tiddlers with a SamsClub tag.

This will do what you want:
\define addTag(tagged,newtag)
<$button> add ''<$text text="""$newtag$""" />'' to ''<$text text="""$tagged$""" />'' tiddlers
   
<$list filter="[tag[$tagged$]!tag[$newtag$]]">
     
<$action-listops $field="tags" $subfilter="[[$newtag$]]" />
   
</$list>
</
$button>
\end

<<addTag ShoppingItem SamsClub>>

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)

 

David

unread,
Apr 3, 2020, 1:50:52 PM4/3/20
to TiddlyWiki
Perfect!  Saving that one away in my snippets!

Thanks
Reply all
Reply to author
Forward
0 new messages