[TW5] New SaveTrail plugin, for everyone suitably paranoid about data loss

317 views
Skip to first unread message

Jeremy Ruston

unread,
Feb 4, 2017, 12:48:44 PM2/4/17
to TiddlyWiki
Inspired by Thomas Elmiger, I’ve just pushed a new plugin that causes TiddlyWiki to continuously save the contents of each tiddler that is changed as a JSON file. Configured correctly, the browser will download the files silently in the background, and they can be used as a backup in case of accidental data loss.

The files are saved with filenames of the form “HelloThere.20170204171837889.json”. It works with the single file edition or under Node.js.

There are settings to temporarily disable the plugin and to adjust the filter used to determine which tiddlers are saved. There’s also a setting to enable automatic saving for draft tiddlers; this setting should be considered for the truly paranoid because it is liable to save a large number of files while you are typing.

The plugin is installed but disabled on the prerelease (it won’t be loaded by default in the final release). Give it a try there:


Just be sure to configure your browser to download files silently, and visit the control panel to enable the setting (see below).

Questions or thoughts welcome.

Best wishes

Jeremy

Danielo Rodríguez

unread,
Feb 4, 2017, 1:42:13 PM2/4/17
to TiddlyWiki, Tiddl...@googlegroups.com
This is a great addition!!!

Personally I will not use it, but I know that there is a lot of paranoid people around there :D
Also this will satisfy the wet dreams of all those persons that wants to use TW online while keeping the ability to save tiddlers individually.


Xavier Cazin

unread,
Feb 4, 2017, 1:54:52 PM2/4/17
to tiddl...@googlegroups.com
Hi Jeremy, 

I am wondering if this shouldn't be disabled in node.js mode when the lazy loading is enforced. 

In this situation, I've experienced that opening a tiddler for edition sometimes displays a blank draft. I fear that enabling this plugin in this case lead to saving a blank tiddler. 

Regards, 
Xavier. 

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9B0FB3E6-B47E-40EB-929A-1C9935C0BCC2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Elmiger

unread,
Feb 5, 2017, 2:39:21 PM2/5/17
to TiddlyWiki, Tiddl...@googlegroups.com
Hi Jeremy,

Great to see this implemented! I downloded empty.html from tiddlywiki.com/prerelease and drag-dropped the new plugin together with some of the others and reloaded. Then I dropped one of my existing tiddlers – and was prompted to download a file immediately. So …
 
The plugin is installed but disabled on the prerelease

It seems that it is enabled and active immediately after importing and reload. I would suggest it should be inactive here too.

The next thing I did, was adding -[[$:/Import]] to my settings to exclude the import tiddler itself. Here the documentation was not clear for me: Do I have to reload after changeing the filter? The answer is yes. Suggestion: Append a hint to "Filter used to determine tiddlers that should be autosaved (reload wiki after changes):"

(I also excluded -[[$:/DefaultTiddlers]] and wondered, why this tiddler is not prefixed $:/config/.)

I imported another of my plugins and was prompted again after hitting "Import". I added -[prefix[$:/plugins/]] to my list. Would there be a way to avoid saving freshly imported tiddlers in general? Obviously they come from another relatively safe place where I could find them again.

The next point that could be clearer in the settings panel is the second checkbox: I can check it alone?! Shouldn’t this be visually and logically subordinate to the first checkbox?

Last but not least it would be ingenious if one could choose the modes (one or both) "activate when TiddlyFox is missing" and "activate when working under http…" – thus I would realize that I am working in the wrong browser or with the online version of my wiki after editing the first tiddler. And have the opportunity to download my work.

Just stop me if this is too much inspiration ;–)

All the best,
Thomas
 

Thomas Elmiger

unread,
Feb 5, 2017, 2:43:00 PM2/5/17
to TiddlyWiki, Tiddl...@googlegroups.com
"Filter used to determine tiddlers that should be autosaved (reload wiki after changes):"
This should possibly read … save and reload wiki after changes…

Josiah

unread,
Feb 7, 2017, 9:52:19 AM2/7/17
to TiddlyWiki, Tiddl...@googlegroups.com
Ciao Jeremy

PLEASE don't limit this to the Paranoid. The Terminally Lazy, Do It Later, Backup Crowd, like me, could benefit too.

Josiah 

Jeremy Ruston

unread,
Feb 9, 2017, 11:27:44 AM2/9/17
to tiddl...@googlegroups.com
Thanks for the feedback. I haven’t had a chance to incorporate it all, but I’ve made a major update that addresses a couple of points that Thomas raised.


Now the plugin hooks into (newly added) high level UI events such as saving, importing, renaming  and deleting a tiddler. This enables it to download the value of a tiddler before it is deleted, or the previous text of a tiddler before it is overwritten with an edit.

The filename format has changed too, to incorporate a “reason”. For example:

HelloThere.20170209153100096.overwritten.json
HelloThere.20170209153100097.saved.json
Motovun_Jack.jpg.20170209150505860.overwritten.json
Motovun_Jack.jpg.20170209150505860.saved.json
$__DefaultTiddlers.20170209125341645.overwritten.json
$__DefaultTiddlers.20170209125341646.imported.json
$__SiteSubtitle.20170209125341647.overwritten.json
$__SiteSubtitle.20170209125341648.imported.json
$__SiteTitle.20170209125341648.imported.json
$__SiteTitle.20170209125341648.overwritten.json

I’ve updated the prerelease for you to try. As before, you’ll need to visit control panel, open the savetrail plugin, switch to the settings tab, and click the checkbox.


Best wishes

Jeremy

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
Reply all
Reply to author
Forward
0 new messages