[TW5] Delete tiddler on click/mass delete

1,717 views
Skip to first unread message

Joe Bush

unread,
May 10, 2014, 3:53:05 PM5/10/14
to tiddl...@googlegroups.com
Hello all, is there a way to set up a list with a link to delete the tiddler in question? I'm trying to set up a way to delete lots of tiddlers in a specific tag (similar to Stephan's RenameTags tool) so that I can clean out a TW and reuse it without having to reimport a bunch of tiddlers I want to reuse. I'm thinking of something like <$link to="delete"> or something like that, so that I can include it in a list.

Stephan Hradek

unread,
May 10, 2014, 6:45:40 PM5/10/14
to tiddl...@googlegroups.com
2 clicks per tiddler:

<$list filter="[tag[myTag]]">

<$button message="tw-delete-tiddler" param={{!!title}}><$view field="title"></$button>
</$list>


Joe Bush

unread,
May 10, 2014, 7:28:27 PM5/10/14
to tiddl...@googlegroups.com
Wow, thanks, that was exactly what I needed.

Matabele

unread,
May 11, 2014, 2:28:14 AM5/11/14
to tiddl...@googlegroups.com
Hi

Adding to Stephan's code -- put this in a tiddler (called, for example: 'Clean'):

<table>
<tr><th>Filter </th><td><$edit-text tiddler="$:/temp/filter"/></td></tr>
</table>


<$list filter={{$:/temp/filter!!text}}>


<$button message="tw-delete-tiddler" param={{!!title}} class="btn-invisible btn-mini">{{$:/core/images/delete-button}}</$button> <$link to={{!!title}}>{{!!title}}</$link>
</$list>

When you wish to review a list of tiddlers:
-- open the tiddler 'Clean'
-- enter your filter expression (for example [tag[mytag]])
-- click the buttons to review
-- click the trash can to delete

regards 

Matabele

unread,
May 11, 2014, 3:01:27 AM5/11/14
to tiddl...@googlegroups.com
Hi

P.S. Filters like [tag[mytag]search[mytext]] are more specific and will shorten the list for review.

regards 

On Saturday, May 10, 2014 9:53:05 PM UTC+2, Joe Bush wrote:

Michael Wiktowy

unread,
Dec 9, 2014, 8:31:21 AM12/9/14
to tiddl...@googlegroups.com

On Sunday, May 11, 2014 2:28:14 AM UTC-4, Matabele wrote:
Hi

Adding to Stephan's code -- put this in a tiddler (called, for example: 'Clean'):

<table>
<tr><th>Filter </th><td><$edit-text tiddler="$:/temp/filter"/></td></tr>
</table>


<$list filter={{$:/temp/filter!!text}}>


<$button message="tw-delete-tiddler" param={{!!title}} class="btn-invisible btn-mini">{{$:/core/images/delete-button}}</$button> <$link to={{!!title}}>{{!!title}}</$link>
</$list>


FYI: the syntax of this has changed slightly in post-beta versions of TiddlyWiki5: "tw-delete-tiddler" is now "tm-delete-tiddler"

/Mike

Tobias Beer

unread,
Dec 9, 2014, 8:47:56 AM12/9/14
to tiddl...@googlegroups.com
FYI: the syntax of this has changed slightly in post-beta versions of TiddlyWiki5: "tw-delete-tiddler" is now "tm-delete-tiddler"

Danielo Rodríguez

unread,
Dec 11, 2014, 8:50:53 AM12/11/14
to tiddl...@googlegroups.com

Hello Tobias, maybe you want to update your example for:
use
class="tc-btn-invisible tc-btn-mini"
instead of
class="btn-invisible btn-mini"

And to put the >> inside a button that actually reveals the tiddler content. Currently it does nothing, but you have a button to close the reveal, which will never be opened.

 

Tobias Beer

unread,
Dec 11, 2014, 11:14:05 AM12/11/14
to tiddl...@googlegroups.com
Hi Danielo,
 
maybe you want to update your example for: 
class="tc-btn-invisible tc-btn-mini"
instead of
class="btn-invisible btn-mini"

Ah, thanks for that. I actually deleted the classes now, since I don't quite like the look of that bin in b/w. I think it would be reasonable to have the toolbar button styles, except size and margins applied to any tc-image-button without being restricted to the toobar itself.

And to put the >> inside a button that actually reveals the tiddler content. Currently it does nothing, but you have a button to close the reveal, which will never be opened.

Not sure what you mean, the button in that template only clears the filter bar as is done in the advanced search templates.
Would you want to preview the tiddlers, too?

Best wishes, Tobias.

Marc J. Cawood

unread,
Mar 6, 2024, 2:53:58 AMMar 6
to TiddlyWiki
Found this thread searching for "mass delete tiddlywiki".
Does anyone know how we can mass delete a list of tiddlers without clicking (and confirming) on 1000's of delete icons?

Marc J. Cawood

unread,
Mar 6, 2024, 3:38:31 AMMar 6
to TiddlyWiki
OK, solved it using this info: https://talk.tiddlywiki.org/t/is-there-a-quick-way-to-delete-old-tiddlers-i-copied-from-main-tw/6143

Make a tiddler called Purge1 with this content (making sure to adapt the filter on the Make Purge2 List button):


1. Edit this Purge1 tiddler and set the filter
1. Click this "Make Purge2 List" button
1. Edit the [[Purge2]] tiddler and verify the list is correct
1. Click the "Delete Purge2 List" button

<$button>Make Purge2 List
<$action-listops $tiddler="Purge2" $filter="[search[foo]!is[system]!search[Purge]]-twhelp"/>
</$button>


<$button>Delete Purge2 List
<$action-deletetiddler $filter="[list[Purge2]]"/>
</$button>


In this example all tiddlers containing the word foo (except the word Purge so this tiddler isn't also deleted) are listed into Purge2 and can then be deleted.

Eric Shulman

unread,
Mar 6, 2024, 3:41:51 AMMar 6
to TiddlyWiki
If you can use a filter to get the list the tiddlers you want to delete, then you can use the delete button (“trash can”) in $:/AdvancedSearch > Filters tab to bulk delete all matching tiddlers.

If you want to exclude a few specific tiddlers from your filtered list, you can add -[[NameOfTiddler]] to the filter.

Alternatively, if you install https://tiddlytools.com/#TiddlyTools%2FSearch%2FFilters, you can enter your desired filter and press the delete tiddlers button (“trash can” - upper right of the TiddlyTools/Search/Filters interface). This will then display a modal dialog with a checkboxes for all matching tiddler titles. You can then clear the checkmarks for any tiddlers you want to keep, and then press the “delete” button to delete the rest of the listed tiddlers.

enjoy,
-e
Reply all
Reply to author
Forward
0 new messages