New tiddlywiki, same setup

270 views
Skip to first unread message

Sara

unread,
Jul 3, 2020, 10:46:43 PM7/3/20
to TiddlyWiki
Hi all,
Firstly, many thanks for an extraordinary resource! I'm relatively new to TW and I'm sure I'm only using a fraction of it's ability but I love it!

Something I want to do but cannot find anywhere, is to start a new tiddlywiki with the same setup as my old. I really like the theme, plugins and what I have set up works just right for me. If I want to start a new TW and keep all those setting (some of which are tags) how do I get rid of all the tiddlers in the old one?

Hopefully that makes sense and that there's a straightforward solution that somebody can help me with...

Many thanks (again!)

Sara

Eric Shulman

unread,
Jul 3, 2020, 11:39:10 PM7/3/20
to TiddlyWiki
On Friday, July 3, 2020 at 7:46:43 PM UTC-7, Sara wrote:
Something I want to do but cannot find anywhere, is to start a new tiddlywiki with the same setup as my old. I really like the theme, plugins and what I have set up works just right for me. If I want to start a new TW and keep all those setting (some of which are tags) how do I get rid of all the tiddlers in the old one?

If you can write a *filter* that lists all the tiddlers you want to delete,
then you can use the $:/AdvancedSearch filter tab to list those tiddlers
and then press the delete ("trash can") button.  You will be asked to
confirm before the tiddlers are deleted.

However... since you are new to TW, it might be difficult for you to
compose the needed filter syntax to get the list you want.  It could
also be difficult (if not impossible) to compose a suitable filter if
there isn't a consistent pattern that can be used to recognize which
tiddlers you want to select.

Instead, the following wiki syntax can be used:

<$select tiddler="$:/temp/selected" multiple="yes" size="10">
<$list filter="[all[tiddlers]!prefix[$:/]]">
   <option value=<
<currentTiddler>>><$text text=<<currentTiddler>>/></option>
</$list>
</$select>

!!There are <$count filter={{$:/temp/selected}}/> selected tiddlers: <$button> delete
   <$action-deletetiddler $filter={{$:/temp/selected}}/>
   <$action-deletetiddler $tiddler="$:/temp/selected"/>
</$button>
<ol><$list filter={{$:/temp/selected}}><li><$link /></li></$list></ol>

Just copy/paste the above into a tiddler (e.g., "DeleteSelectedTiddlers").

The first part of the above code generates a <$select> (listbox) that shows all
the tiddlers in your document (except for the ones starting with "$:/", which are
not usually "content" tiddlers).

This listbox allows *multiple selections*:
  * click an item to choose one tiddler
  * shift-click to choose a range of tiddlers (from the last click to the current one)
  * ctrl-click toggles selection of the tiddler you click on  

The second part of the code shows the total number of tiddlers you have selected,
followed by a "delete" button, and a numbered list of the selected tiddlers.  Each item
in the list is a link to that tiddler, so you can easily click on the link to open the tiddler
if you need to review/confirm that it really should be deleted.

Start by MAKING A COPY of the TiddlyWiki file you want to duplicate.  If you are using
the "default download saver", then you can use the "save changes" button in TW to
create a new copy of the existing TiddlyWiki file.  If you are using some other saver
that defaults to overwriting the current TiddlyWiki, then use your computer's normal
method for making a duplicate of an existing file.

Then, open the duplicated file and view the "DeleteSelectedTiddlers" tiddler.  Use
the listbox as described above to select all the tiddlers you want to delete.  Once you
are satisfied with your selection(s), just press the "delete" button, and those
tiddlers will be removed from your document.

Note that this action cannot be "undone" so be sure you have the right tiddlers selected
before you press the button!  Of course, if you make a mistake and delete something
you didn't mean to, you can always start over, as long as you haven't saved the current
TiddlyWiki!

If you have any questions about the above instructions, please ask!

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

Sara

unread,
Jul 3, 2020, 11:49:45 PM7/3/20
to TiddlyWiki
Wow!

Thanks so much Eric!! I tried it and it works perfectly :)

Thanks you so so much for taking the time to respond so fully! And giving an explanation of how it works me keen to explore more of the functionality and know-how in this great piece of code!

It's so cool when people can share and give so freely. You've made my day :)

Sara

Sara

unread,
Jul 4, 2020, 12:38:28 AM7/4/20
to TiddlyWiki
PS. Apologies for my over exuberance... I'd spent too much time with so little success... so your quick response and solution was deeply appreciated!

Eric Shulman

unread,
Jul 4, 2020, 12:40:45 AM7/4/20
to TiddlyWiki
On Friday, July 3, 2020 at 9:38:28 PM UTC-7, Sara wrote:
PS. Apologies for my over exuberance... I'd spent too much time with so little success... so your quick response and solution was deeply appreciated!

No apologies are needed!  It feels good to know that my help is so resoundingly appreciated.  So, thank YOU!

-e

Jon

unread,
Jul 4, 2020, 2:11:33 AM7/4/20
to TiddlyWiki
Going forward Sara, you might also find Tiddler Commander useful for doing batch operations. 

Regards
Jon

passingby

unread,
Jul 4, 2020, 3:08:39 AM7/4/20
to TiddlyWiki
Well if you stick around this group, you will realize that this group is totally unlike other groups. You can ask a question, any question, any level, and nobody ever chides you or give you  'show your efforts first' or 'we are not here for your homework' type of responses. People here are very helpful, honestly. And of course, Eric is a total master of his craft, I respect him a lot.

Sara

unread,
Jul 4, 2020, 6:05:03 PM7/4/20
to TiddlyWiki
thanks Jon (and all) I'll check it out.

If this group is a reflection of TW itself, it's no supirse it's full of heart!

Eric Shulman

unread,
Jul 4, 2020, 8:25:35 PM7/4/20
to TiddlyWiki
On Saturday, July 4, 2020 at 3:05:03 PM UTC-7, Sara wrote:
If this group is a reflection of TW itself, it's no surprise it's full of heart!

Along with Jeremy Ruston (creator of TiddlyWiki), I have been the administrator of this GoogleGroup for over 15 years.  Very early on, we established a policy of "positiveness" to guide all communication about TiddlyWiki.  Working by example, both Jeremy and I have encouraged people to maintain a focus on the technology itself and avoid injecting any judgmental negativity into the conversations.

Over the years, there have been a few moments when aggressive attitudes or snarky tones have arisen.  In most cases, these have been quickly and politely remedied, and only in a handful of instances have we had to remove people from the group for persistently hostile personalities.  The result is that the TiddlyWiki groups are all friendly, welcoming places to get help and share our ideas and individual achievements with others.

I like to think that, in addition to the truly awesome technology that Jeremy has created, it is the nature and tone of these groups that has made TiddlyWiki a success for so long.

-e

Sara

unread,
Jul 4, 2020, 10:46:39 PM7/4/20
to TiddlyWiki


On Sunday, 5 July 2020 10:25:35 UTC+10, Eric Shulman wrote:

I like to think that, in addition to the truly awesome technology that Jeremy has created, it is the nature and tone of these groups that has made TiddlyWiki a success for so long.

-e

This whole exchange shows they clearly go hand in hand! :)

Jon

unread,
Jul 5, 2020, 3:57:04 AM7/5/20
to TiddlyWiki
The positive approach something that I've always observed on the forum - interesting to read that it is not just by accident.

Regards
Jon

Eric Shulman

unread,
Jul 5, 2020, 4:22:14 AM7/5/20
to TiddlyWiki
On Sunday, July 5, 2020 at 12:57:04 AM UTC-7, Jon wrote:
The positive approach something that I've always observed on the forum - interesting to read that it is not just by accident.

The key to constructive discussions is this:

"It is possible to disagree, without being disagreeable."

 -e

Jon

unread,
Jul 5, 2020, 9:46:35 AM7/5/20
to TiddlyWiki
I'll try and remember that next time I'm talking to my boss!

danraymond

unread,
Jul 15, 2020, 2:40:16 AM7/15/20
to TiddlyWiki
Hi Eric;

I was looking at this solution for Sara and realised it may help me with an issue I have been trying to solve. I am a very long term TiddlyWiki Classic (Thank you Jeremy!) user and am now learning the internals of TW5 and loving it.

I am trying to develop some ZettelKasten bits so I can move away from Zettlr (which is fabulous by the way worth exploring). Zettlr and other similar programs offer a list of existing MD files in the same folder when you type the [[ to start a link, you can select one and the link inserts or ESC and type your own link details.

Whilst I think its impossible to do that directly when editing a tiddler, I thought I could add a toolbar button in the editor that:
1. produced a selectable list of existing tiddlers (similar to your solution here) and
2. When selected inserted it in the text area of the tiddler.

I am trying to modify the first part of your code to do the dropdown list of tiddlers, but not sure how to have it insert the tiddler name as a [[my selected tiddler]]?

Can you help me please?

Saq Imtiaz

unread,
Jul 15, 2020, 4:58:26 AM7/15/20
to TiddlyWiki
Reply all
Reply to author
Forward
0 new messages