Is there a quick way to delete old tiddlers?(I copied from main TW)

Hello,
When I got started I saved latest TW, and added my articles on there. They included help-files etc so they were useful to learn TW. Now I would like to clear all of the tiddlers prior to 2022. Is there a command line way or some UI way to do it in batch?

Thanks
Lucas

Initially, I wanted to approach this using the modified or created date fields. Unfortunately, there are oceans of tiddlers on tiddlywiki.com that don’t have these fields. So here’s an approach using the list of tiddlers from tiddlywiki.com

Ideally you would have a copy of the original version of TW. But you can come pretty close using the current file at tiddlywiki.com.

Absolutely make a backup of your TW file before trying this! There are so many ways it might go off the rails!

Go to TiddlyWiki.com and paste this code into a tiddler:

<$button>Make list
<$action-listops $tiddler="twhelp" $filter="[all[tiddlers]!is[system]]-twhelp"/>
</$button>

Run the button. This will make a list of all non-system tiddlers. I excluded system tiddlers to be safe. This will create a tiddler “twhelp” which has a listing of all the existing tiddlers in its list field. Drag and drop twhelp into your working TW file.
In your working TW file, create a new tiddler and paste this code:

<$button>Purge Help
<$action-deletetiddler $filter="[list[twhelp]]"/>
</$button>

Save the tiddler and click on the “Purge Help” button. This should delete all the tiddlers that match the list of informational tiddlers from the current TW help file. Keep in mind that if any tiddlers have changed names since then, or been deleted, or if you changed their name in your working copy, that they’ll still be in there. So there may be some clean-up you’ll need to do by hand, but this should get the bulk of them. Also, if you made notes in any of the existing help tiddlers, obviously they will be deleted too!

Good luck!

You could go the other way around. Use this filter in the AdvancedSearch Filter tab:

[!is[system]] :filter[get[created]prefix[2023]]
or
[!is[system]] :filter[get[modified]prefix[2023]]

It will show all tiddlers, that are non-system tiddlers.

  • Export them and import them into a new wiki.
  • Do the same with prefix[2022] … done.

Also if there is a filter that can identify the tiddlers you wish to delete in the Advanced Search Filter, a delete button appears which will delete them.

  • Some of @Mohammad’s tool sets also allow very sophisticated search, list and actions.

Thank you

What about these: 2018?

I presume I need to exclude, just need to know how to add that to filter.

ps. This filter stuff is awesome!, how can I create a tiddler post “Year in Review 2022” where it just lists tiddlers created in 2022

[!is[system]] :filter[get[created]prefix[2022]]

Thanks
Lucas

Those are just documentation tiddlers.

There is an extension for that. It is called Commander Commander Plugin 2.1.4 — bulk operations on iddlers
Irreplaceable!

Always backup your wiki. Good Luck!

Thanks.
I was able to clean them all up. Yay.
Looks like the first post is been over a year ago:

@lucasmanual — Technology, Strategy, and Leadership @lucasmanual - Powered by w5hnews.com!
I guess my first post on : 10th October 2021 at 12:29pm

Thank you all for help!

1 Like

Added it the reference to the blog:
http://wwwhww.news/c/blog#Batch-Delete-Posts(Tiddlers)

Gentleman,
Since we are on this topic

How can I create a tiddler called “Year in Review 2022” that lists all posts created in 2022

I can’t seem to get filter right…

If I do this:

<<list-links filter:"[get[created]prefix[2022]]">>

I get a list of them, but the title is a date. How do I show the title instead?

If it was a tag, then I guess it could be easier, but in this case I want it by date:
<<list-links filter:"[tag[FrontPage]] +[sort[title]]">>

or should I start a new topic?
Thanks
Lucas

try this filter [!is[system]has[created]] :filter[get[created]prefix[2022]]

It filters out all system tiddlers
It checks if tiddlers have a created field
Every tiddler in the list needs to pass the :filter to be listed

this should also work: [!is[system]] :filter[get[created]prefix[2022]]

-m

I mean inside a tiddler
Press +
then
(this doesn’t work)
<<list-links [!is[system]] :filter[get[created]prefix[2022]]">>

This works, but its not 2022 only
<<list-links filter:"[tag[FrontPage]] +[sort[title]]">>

I think I figured it out

<<list-links filter:"[!is[system]] :filter[get[created]prefix[2022]] +[sort[title]]">>

Got few examples from here