TW5 Batch Add/Remove Tags

1,104 views
Skip to first unread message

TJ Hoeft

unread,
Apr 2, 2015, 12:58:55 PM4/2/15
to tiddl...@googlegroups.com
Hello,
Firstly, I want to say that I love TW5!  Thank you! 

I'm looking for some help to write some Add/Remove buttons for batch processing tags.  I started using TW5 to manage inventory lists for trips.  I create a single tiddler to represent a single item in a list (e.g. "Skiis").  Using tags, I add each item to different lists (e.g. me, my wife, and daughter).  I also manage state using tags (e.g. "is-staged-<person name>").  Then, I use tag queries to build individual lists for people or add things to a central shopping list.  So far things are working great.

Here's where I would like some help.  I would like to host this list on something like the RedHat OpenShift cloud service so that I can edit from anywhere and bring my up-to-date shopping list with me.  Currently, I'm creating copies of the file-based wiki to reset its tag state and moving things around via Dropbox.  This is a clunky solution.  Instead, I would like to use something like a drop down combo box filled with the set of tags and I would like to select tags to either batch add/remove to a set of tiddlers selected from a tag query.

Here is my first attempt to rough out this functionality:

<$fieldmangler tiddler="Test Button">
<$set name="currentTiddler" value="SampleAlert">
<$button message="tm-add-tag" param="Hi-there">Add Tag</$button>
</$set>
</$fieldmangler>

<$fieldmangler tiddler="Test Button">
<$set name="currentTiddler" value="SampleAlert">
<$button message="tm-remove-tag" param="Hi-there">Remove Tag</$button>
</$set>
</$fieldmangler>

Any help is much appreciated.

Thank you,

TJ

Jed Carty

unread,
Apr 2, 2015, 1:13:27 PM4/2/15
to tiddl...@googlegroups.com
I am not sure if it has everything you want, but I am working on a tool to do batch add or remove tags and fields here.
The batch part only works in the current prerelease, but version 5.1.8 of tiddlywiki should be released very soon so it shouldn't be too long before this works with the normal release.

Jon

unread,
Apr 5, 2015, 11:09:41 AM4/5/15
to tiddl...@googlegroups.com
Hi Jed,

I've found this to be really useful.

Thanks
Jon

TJ Hoeft

unread,
Apr 5, 2015, 12:25:25 PM4/5/15
to tiddl...@googlegroups.com
Thank you for the response! I apologize for my late response. I am out of town. I look forward to checking out your code soon.
Thanks again,
TJ
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/3KxvZVFCt9w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7f88f0a3-656a-40cd-80c7-7fdc6a3a5f1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TJ Hoeft

unread,
Apr 5, 2015, 7:04:43 PM4/5/15
to tiddl...@googlegroups.com
Hi Jed,
This is excellent! This ability will allow for some really cool static list state management with tags.  

I added some tags to some tiddlers and I noticed that there appears to be some tag substring matching.  For example, I created a "tag family" that followed the naming convention: is-a-<item> (e.g. "is-a-dog", "is-a-cat", etc.).  Using your search, I can type "is-a" in a tag field and get a result set that contains the set of all tiddlers in this tag family.  Is there a way to remove all tags following this "is-a-<item>" pattern?

Thank you very much.  This is great work!
TJ


On Sunday, April 5, 2015 at 9:25:25 AM UTC-7, TJ Hoeft wrote:
Thank you for the response! I apologize for my late response. I am out of town. I look forward to checking out your code soon.
Thanks again,
TJ

On Sunday, April 5, 2015, Jon <five...@gmail.com> wrote:
Hi Jed,

I've found this to be really useful.

Thanks
Jon

On Thursday, 2 April 2015 18:13:27 UTC+1, Jed Carty wrote:
I am not sure if it has everything you want, but I am working on a tool to do batch add or remove tags and fields here.
The batch part only works in the current prerelease, but version 5.1.8 of tiddlywiki should be released very soon so it shouldn't be too long before this works with the normal release.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/3KxvZVFCt9w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.

TJ Hoeft

unread,
Apr 5, 2015, 11:16:26 PM4/5/15
to tiddl...@googlegroups.com
I've posted my travel preparation wiki at TiddlySpot so you can see how I'm using TW5.  Feel free to have a look: http://mammothlist.tiddlyspot.com/

I am trying to figure out how to make this list available on all devices and stay updated as family members make changes.  Any ideas how I can keep all devices updated?

Thanks,
TJ

FYI:
I built the list by creating a flat list with a single entry on each line in a text editor (e.g. TextPad) and did a regex find and replace so "item" became "* [[item]]".  I clicked each link and added appropriate tags and created tag queries for the summary views.

Jed Carty

unread,
Apr 6, 2015, 12:16:47 AM4/6/15
to tiddl...@googlegroups.com
All of the searches use the regexp list operator, so it will find substrings just fine.

And to remove all the tags that are returned from a search you should just have to click on the 'Remove from all Matches' button. If that isn't working than I broke it somehow.

TJ Hoeft

unread,
Apr 6, 2015, 1:46:45 PM4/6/15
to tiddl...@googlegroups.com
Hi Jed,
I can see that the substrings work great during a search.  If I go to the sample wiki you provided and add "is-a-fish" to a tiddler and "is-a-pencil" to another tiddler, I can go to the "Generic Add or Remove mk 2" tiddler and type "is-a" and both tiddlers are displayed.  This works great.

If I go to "Tag to remove:" and enter either "is-a" or "^is-a.*" and then click the "Remove from All Matches", nothing happens.  This would be really great functionality that would allow me to automatically reset a tag-based state machine or workflow.  Am I using the tool correctly?

TJ

Jed Carty

unread,
Apr 7, 2015, 1:29:07 PM4/7/15
to tiddl...@googlegroups.com
Oh, sorry. I misunderstood what you were asking. I agree that would be a useful feature. It will probably be a bit difficult to implement using the searching interface that I have set up, but making something else that does it shouldn't be too hard, probably something like this, but with a regular expression search instead of a select widget and a change all button. It may be a few bit before I get to it.

TJ Hoeft

unread,
Apr 8, 2015, 10:03:07 AM4/8/15
to tiddl...@googlegroups.com
Excellent! Thank you very much Jed.
TJ


On Tuesday, April 7, 2015, Jed Carty <inmy...@gmail.com> wrote:
Oh, sorry. I misunderstood what you were asking. I agree that would be a useful feature. It will probably be a bit difficult to implement using the searching interface that I have set up, but making something else that does it shouldn't be too hard, probably something like this, but with a regular expression search instead of a select widget and a change all button. It may be a few bit before I get to it.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/3KxvZVFCt9w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

Captain Packers

unread,
Mar 16, 2018, 10:51:35 AM3/16/18
to TiddlyWiki
Jed,

I imported this tiddler but the search boxes don't display. Any ideas about how I can fix this?

Mat

unread,
Mar 16, 2018, 12:05:19 PM3/16/18
to TiddlyWiki
May I propose to use the

batchmanipulator.tiddlyspot.com

<:-)

Jed Carty

unread,
Mar 16, 2018, 1:57:40 PM3/16/18
to TiddlyWiki
This isn't something I have looked at since it was posted so I am not sure. The first thing to try is to toggle the different options and see if that makes anything show up. The way that I made the options work may cause some troubles when nothing is set.

But, if you don't need the specific features in what I made, I think that Mat's suggestion is a good one. He is better at making clean and simple interfaces than I am.
Reply all
Reply to author
Forward
0 new messages