Trashbin Pluging: Simply delete your tiddlers and restore them

117 views
Skip to first unread message

Mohammad

unread,
Jul 10, 2019, 12:06:28 PM7/10/19
to tiddl...@googlegroups.com
Announcement: Trashbin Plugin release candidate

Date: July 11, 2019
Release: 0.5 beta


Major improvement, Trashbin is now much more safer than previous release. It prevents overwriting in both directions (moving to trash bin and restoring)
When moving to trashbin, it checks if there exists another tiddler with the same name and it makes unique title with numeric suffix!
When restoring from trashbin, it checks if there exists another tiddler with the same name and it notifies 

Change log

  • 0.5.0 beta – optimized release.
  1. [NEW] restore button in fronts of each trashed tiddler in Trash Bin sidebar tab
  2. [NEW] prevent overwriting existing tiddlers when restoring from trash bin
  3. [NEW] move to trash bin check for duplicate tiddlers in trash bin and prevent overwriting by making it unique with a numeric suffix



I highly appreciate to receive your feedback, comments and idea



Best wishes
Mohammad






_________________________



Announcement: Trashbin Plugin

Date: July 10, 2019
Release: 0.1 beta



Following to previous discussion on Trash bin idea, please find below the beta release of Trashbin plugin

Trashbin implements the trash application and provide a temporary space to keep deleted tiddlers and restore them on demand or delete them from trashbin forever.


I highly appreciate to receive your feedback, comments and idea



Best wishes
Mohammad

Watt

unread,
Jul 10, 2019, 2:07:34 PM7/10/19
to TiddlyWiki
That is a beautiful thing Mohammad. I really like the mechanism for converting from 'tiddler with fields' to data tiddler and back again. I can see a lot of uses for it besides the trashbin - a slightly easier 'export' method from Quinoid on mobile for example.
My only suggestion is to prevent the trashbin appearing on system tiddlers. Thanks a lot.

Mohammad

unread,
Jul 10, 2019, 2:21:28 PM7/10/19
to TiddlyWiki
Hi Watt,
 I did not understand your request! do you mean not to use $:/trashbin?
I used it to hide trashed tiddlers from search results and also common filters.

--Mohammad

Watt

unread,
Jul 10, 2019, 2:29:26 PM7/10/19
to TiddlyWiki
No the trashbin button also appears on system tiddlers. For example I can send $:/core to the trashbin.
I could delete $:/core using the existing, traditional, delete button as well I suppose, but it's marginally harder to do on a phone. Just a 'heads up' in case it wasn't what you intended.

TonyM

unread,
Jul 10, 2019, 7:17:03 PM7/10/19
to TiddlyWiki
Mohammad,

looks nice and very neat as always with your work. Thanks so much for your ongoing contributions.

Do you realise you could clone your plugin and change the icons to provide a way to take other tiddlers offline or what I like to call nearline.

For example as a designer I may have macros or test data installed as I build the wiki and as I finish designing I can take these tiddlers offline and when I am ready remove them altogether. Such a near line tiddlers could also be designed to be preloaded and made utility tiddlers or components made online as needed

A slightly modified version could act like a one off tiddler backup of say a complex macro tiddler before you make changes.

I suppose the question is should I feed these ideas and requirements to you or build my own from your code and share back?

Thanks again for great work Mohammad.
Tont

TonyM

unread,
Jul 10, 2019, 7:22:35 PM7/10/19
to TiddlyWiki
Mohammad,

Another thing I would like to see eventually is to be able to "copy" or "Move" a set selected tiddlers to a json tiddler that can itself be a tiddler bundle and can be dragged and dropped into another wiki, or exported as a file.

This would be a way to archive and export tiddlers like completed tasks and superseded references.

This is somewhat beyond the scope of your current trashbin but the techniques for that could also be used by trashbin.

Regards
Tony

TonyM

unread,
Jul 10, 2019, 7:37:53 PM7/10/19
to TiddlyWiki
Mohammad,

FYI I just modified the last paragraph in as an experiment. Note I reverted to using currentTiddler then transcluded

{{||$:/plugins/kookma/trashbin/viewtoolbar-button}}

To add the restore button to each item in the sidebar trashbin

<ol>
<$list filter="[tag[trash]search:title[$:/trashbin/]]" emptyMessage="Trash bin is empty">
<li><$link to=<<currentTiddler>> ><$text text={{{ [<currentTiddler>removeprefix[$:/trashbin/]] }}} /></$link> {{||$:/plugins/kookma/trashbin/viewtoolbar-button}} </li>
</$list>
</ol>


Use if you wish

Regards
Tony

Mohammad

unread,
Jul 10, 2019, 10:56:33 PM7/10/19
to TiddlyWiki
Hi Tony,
 I like your idea! I will add this to the next beta 2 release.

Cheers
Mohammad

Mohammad

unread,
Jul 10, 2019, 11:04:04 PM7/10/19
to TiddlyWiki
Hello Tony,
Thank you for your feedback and support.

Feel free to modify and reshare trashbin or create a pro version with another name!
I really appreciate to have your contribution and I always learn more things for such contribution.

Cheers
Mohammad 


On Thursday, July 11, 2019 at 3:47:03 AM UTC+4:30, TonyM wrote:
Mohammad,

looks nice and very neat as always with your work. Thanks so much for your ongoing contributions.

Do you realise you could clone your plugin and change the icons to provide a way to take other tiddlers offline or what I like to call nearline.

For example as a designer I may have macros or test data installed as I build the wiki and as I finish designing I can take these tiddlers offline and when I am ready remove them altogether. Such a near line tiddlers could also be designed to be preloaded and made utility tiddlers or components made online as needed


Yes, this is great idea I have the same problem at design phase and beta release.

 

A slightly modified version could act like a one off tiddler backup of say a complex macro tiddler before you make changes.

I suppose the question is should I feed these ideas and requirements to you or build my own from your code and share back?


Please go ahead and kindly share your result
 

Thanks again for great work Mohammad.


I always enjoy your neat and innovative idea and comments in this forum! 

Tont

Mohammad

unread,
Jul 10, 2019, 11:27:20 PM7/10/19
to TiddlyWiki
Watt,
 Thank you for your feedback!
As I know both edit and delete button are available on system and plugin tiddlers!
I will elaborate to see if I can do this! But for myself when developing plugins there are such system tiddler I like to move to trashbin!

Lets see

Cheers
Mohammad

Watt

unread,
Jul 11, 2019, 10:01:16 AM7/11/19
to TiddlyWiki
It's ok, no need to do anything Mohammad, I worked it out. I just added !is[system] to the first list filter in $:/plugins/kookma/trashbin/viewtoolbar-button

Now it looks like this;

<$list filter="[all[current]!is[system]!tag[trash]!search:title[$:/trashbin/]]">

The trashcan now only appears on my non-system tiddlers.

(Big thumbs on a phone screen made it easy to add things to the trash list by mistake.)

If I become a developer I'll change it back. ;)

Mohammad

unread,
Jul 11, 2019, 10:24:19 AM7/11/19
to TiddlyWiki
Great customization!
Feel free to hack and customize it as you like!

Cheers
Mohammad

@TiddlyTweeter

unread,
Jul 11, 2019, 11:15:13 AM7/11/19
to TiddlyWiki
Very good piece of work! It addresses a serious limitation in TW.

One suggestion (derived from trash-bins on tools like Gmail) -- "Auto-destroy anything over X numbers of days old."

Not sure its possible?

Very best wishes
Josiah

Mohammad

unread,
Jul 11, 2019, 11:17:11 AM7/11/19
to TiddlyWiki

Mohammad

unread,
Jul 11, 2019, 11:22:33 AM7/11/19
to TiddlyWiki
Hi Josiah!

Please have a look at new release. It has major improvement and much more safer!
About your suggestion, it is possible to customize the "Empty trashbin" button to empty trashbin from tiddlers older than x days! but I don't now how to automate it!
I know it is possible to write some startup action to do it!

If I find spare time I will improve it to have some tabs under settings/control panel for example to remove move to trash button from system tiddler as proposed by Watt!

Cheers
Mohammad
Reply all
Reply to author
Forward
0 new messages