TWC users may be interested in this "Restore" mechanism?

190 views
Skip to first unread message

@TiddlyTweeter

unread,
May 25, 2019, 5:52:53 AM5/25/19
to tiddlywi...@googlegroups.com
Ciao Yakov & TWC community!

There is discussion on the other list about augmenting Browser specific "Save" via "Restore from Download". The advantage is it should work for ANY browser.

And, importantly, it should work for TWC JUST AS WELL as it does for TW5.

The idea is a bit different than save from TW itself.

These two threads show the work done so far and gives some idea of how it works ...

https://groups.google.com/forum/#!topic/tiddlywiki/s40q_QZUenA

https://groups.google.com/forum/#!topic/tiddlywiki/tMLfNs1K3JU

Currently its only for Windows, in early testing. But should be easy to extend to other platforms.

Please comment into either thread if you find it relevant to TWC!

Best wishes
Josiah

Yakov

unread,
May 25, 2019, 4:35:42 PM5/25/19
to TiddlyWikiClassic
Hi Josiah,

thanks for sharing, but from the first glance I didn't get what "restoring" those threads are about. Either they are a bit out-of-context (was there any intro in another thread?) or I just have to re-read them more carefully.

By the way, I'm currently preparing tests to adapt Timimi to TWC which may work nicely, although the setup will probably be a bit more complicated than I'd like it to be. Interesting mention of bob.exe, I'll probably take a look on the underlying tech.

Best regards,
Yakov.

@TiddlyTweeter

unread,
May 27, 2019, 1:11:49 AM5/27/19
to TiddlyWikiClassic
Ciao Yakov

I'll post again what it's better documented :-).

All it does is copy back from "downloads"--i.e. you save in any browser you want and an external script "restores" (i.e. copies back) the wiki.

In testing its proving good. I got it working for 5 different browers.

Best wishes,
Josiah

@TiddlyTweeter

unread,
May 27, 2019, 1:16:08 AM5/27/19
to tiddlywi...@googlegroups.com
Yakov: "I'm currently preparing tests to adapt Timimi to TWC which may work nicely..."

That would be good. Its proven very robust for Firefox with TW5. Its backup system is also excellent as it uses a version of the "Towers of Hanoi" rotation--means you get good coverage without needing excess backups keeping.

Best wishes
Josiah

Yakov

unread,
Jun 1, 2019, 9:46:48 AM6/1/19
to TiddlyWikiClassic
Hi Josiah,

as for adapting Timimi, you can check out the new thread, I've come up with a working solution, although it can certainly be improved in terms of user experience.


I'll post again what it's better documented :-)

I'd say, a minimal thing to do is to describe a reproducible way how to use that "restoring". For now, I didn't even get whether you are talking about a browser feature or something else. E.g. "how do I save my TW via "restoring"".

Best regards,
Yakov.

@TiddlyTweeter

unread,
Jun 10, 2019, 6:14:29 AM6/10/19
to tiddlywi...@googlegroups.com
Ciao Yakov

I wrote a kind of overview of the "universal restore" method (Windows only as of now) here: https://groups.google.com/d/msg/tiddlywiki/tMLfNs1K3JU/ehZZAUP9BQAJ

Maybe how it works is a bit clearer?

Best wishes
Josiah

Yakov

unread,
Jun 12, 2019, 5:44:40 AM6/12/19
to TiddlyWikiClassic
Hi Josiah,

ehm.. unfortunately, no, it's still not clear. In that post you described the advantages of the method; what I'm asking about is a step-by-step instruction how to use this method. Either a text description or a video tutorial would suffice, just describe it as if you were speaking to a stupid person and nothing is obvious for them.

Best regards,
Yakov.

@TiddlyTweeter

unread,
Jun 12, 2019, 5:47:09 AM6/12/19
to TiddlyWikiClassic
You are right.

I'll write a procedural explanation.

In a few days.

Best wishes
Josiah

Anthony Muscio

unread,
Jun 12, 2019, 6:29:41 PM6/12/19
to TiddlyWikiClassic
Josiah,

This threads title does little to promote this great idea. Which I only now understand because I spent a little time working through the conversations. I know much of this has being said but its being in discussion rather than statements.

Please let me try

When using the default save mechanism in any browser, you can save changes resulting in a download of the whole Wiki, having an automatic process on your computer, the wiki can then be copied back to your original single file wiki. There by keeping the original upto date. This is done by running a monitor and copy process in your local computer.

Open a tiddlywiki.html file (by another name) using your local file manager and it will open in your default browser. Without any other save mechanism in place, Each time you save, the browser will download the latest version of the wiki into your downloads folder. This means the updated version is not saved over the original version you opened, but you have a copy of the latest version.

(As I understand it) Mark S solution is to run a batch process on the computer to take any updated wiki copy in the downloads folder and copy it back to its source wikifile, thus keeping the original up to date.

My View on this
Josiah and Mark are right to think this could be a ground breaking way to manage wiki saves. Mark has done a good job of building a Powershell to do this. We can write batch shell scripts for every operating system and share these quite easily.

Personally I think an executable program to do the same, or even just install and help configure, may be a better option in time, allowing it to be installed Quickly and a version for each Operating system made available. These executables my just create the correct scripts.

Although this process seems somewhat universal it does expect a certain behaviour from the browser(s) which could actually change in time. We need to monitor this and add additional methods if these change.

Love your work

Regards
Tony

Mark S

unread,
Jun 12, 2019, 8:28:32 PM6/12/19
to TiddlyWikiClassic

Digression -- I'm not a great fan of videos as pedagogical tools, especially for something this simple. So I'm going with a diagram and some textual explanation.

First you, need to understand that, absent any other mechanism, when you click on the red check mark to save, your file will be saved in your default download directory. With the proper browser settings, every save will be to a new file, that typically is named in this fashion:

MyFile.html
MyFile (1).html
Myfile (2).html
... etc. ...

So, your file is saved, but to the wrong name, and in the wrong location.

A simple, looping batch file can rectify this situation. The batch script searches your download directory for the most recent version of a file matching the base name of your saved file. It then copies that file, with the correct name, back to the original location. It then goes to sleep for a few seconds, before looping again.

HTH



download-mechanism-auto-save.png

Yakov

unread,
Jun 15, 2019, 9:51:30 AM6/15/19
to TiddlyWikiClassic
Thanks Tony and Mark,

now it's quite clear, that's a nice trick. Is there a repo for this/these script(s)? (there's only cmd/power shell version or bash one too? have anybody tried to create one for Android?) Or should I refer to https://groups.google.com/d/msg/tiddlywiki/tMLfNs1K3JU/gkrGu-ubAQAJ ? A repo would be nice to have since it makes it easier to see the current state of affairs (without extensive research/asking) and to start building docs for the solution. This approach obviously has certain limitations, but it also has some potential so I think it's worth creating a github repo and exploring where it's useful. For instance, I find it interesting that the script may work on PCs where installation is forbidden.

Best regards,
Yakov.

A Sklpns

unread,
Jun 23, 2019, 12:35:52 PM6/23/19
to TiddlyWikiClassic
Hello TWC friends.
I started a thread over at the TW5 group regarding the ability to save both
TW5 and TWC files under Chrome in Windows
(https://groups.google.com/forum/#!topic/TiddlyWiki/3IR6in7Zqo4) where Mark S. suggested I tried his script.
However I got stuck at step 0 as my TWC files aren't behaving normally under Chrome.
Specifically, under Windows 10 / Google Chrome Version 75.0.3770.100 (Official Build) (64-bit):

1. TW5 version 5.1.15 saves as expected: it downloads the file in the Downloads folder
2. ''Empty'' TWC file version 2.9.2 from https://classic.tiddlywiki.com/ saves as expected: Chrome downloads the file in the Downloads folder
3. My own TWC file version 2.9.2 (size: 4.96 MB) doesn't save as expected: instead of downloading the file Chrome fails with a ''download failed - Network error'' message
4. My own TWC file version 2.6.0 (size: 4.60 MB) doesn't save as expected: instead of downloading the file Chrome fails with the following pop up
"It's not possible to save changes. Possible reasons include:- your browser doesn't support saving (Firefox, Internet Explorer, Safari and Opera all work if properly configured)- the pathname to your TiddlyWiki file contains illegal characters\n- the TiddlyWiki HTML file has been moved or renamed"

I don't know how an empty 2.6.0 file would behave as https://tiddlywiki.com/archive/ doesn't seem to work.

So I suppose Mark S. was right in suggesting that this is really a TWC problem. Why don't my above 3 and 4 TWC files behave as expected under Chrome?

btw: all of the above files save correctly under Firefox 67.0.4 (64-bit)in Windows 10 using the File Backups firefox addon (https://pmario.github.io/file-backups/, https://addons.mozilla.org/de/firefox/addon/file-backups/)

Thanks in advance
sklpns


Mark S

unread,
Jun 23, 2019, 12:59:59 PM6/23/19
to TiddlyWikiClassic
This seems to be the actual TWC archive:

https://classic.tiddlywiki.com/archive/

2.6.0 is listed and (apparently) available.

Is it possible that your 2.9.2 didn't upgrade correctly? Is it worth trying to upgrade it a 2nd time? (assuming you have backups) What plugins are you using? Is there anything about your TWC's name (spaces, non-latin characters?)

Good luck

Yakov

unread,
Jun 23, 2019, 1:06:33 PM6/23/19
to TiddlyWikiClassic
Hi Sklpns,

download saving was introduced in TWC somewhere near 2.8.1 (well, some preliminary implementations were there in 2.8.0 but those were not.. enabled, let's put it this way), so the behavior of 2.6.0 is an expected one (I'd recommend to upgrade it, let me know if that's not acceptable for you for some reason, I can provide some alternatives).


My own TWC file version 2.9.2 (size: 4.96 MB) doesn't save as expected: instead of downloading the file Chrome fails with a ''download failed - Network error'' message

That's unexpected indeed. Have you tried disabling plugins and saving without them?

By the way, if you are using FF 67, you may want to try my adaptation of Timimi. Actually, it's quite possible to adapt it to Chrome, I've already started that journey, but unfortunately haven't finished it yet and don't expect resuming it before the 15th of July (but if there's anyone willing to help, I can share the fixes I've found already).

Finally, saving in Chrome is also possible if you use one of server-side savers: there's at least MainTiddlyServer by me (discussion), Tiddly-node-saver by James (thread) and minimalistic nwTWcSaver by Okido (thread).

Thanks for sharing the thread. Mark, what do you think about creating a repo for the script and "how to"/prerequisites at GitHub? I think with a central place containing all main info we can avoid further confusion; moreover, it can evolve further (say if somebody suggests a bash implementation of the same thing).

Best regards,
Yakov.

A Sklpns

unread,
Jun 23, 2019, 5:36:33 PM6/23/19
to TiddlyWikiClassic
friends, Mark S., Yakov,

>Is it possible that your 2.9.2 didn't upgrade correctly? Is it worth trying to >upgrade it a 2nd time? (assuming you have backups)

Tried upgrading my other TWC file. The upgrade seemed to work ok but Chrome still fails with the same error. Btw by upgrading I mean opening a current TWC and importing all tiddlers from my original file as the internal upgrade mechanism doesn't work


>What plugins are you using?

A number of them, will make a list or a print screen. However I have tried disabling them all in both TWC files to no avail

>Is there anything about your TWC's name (spaces non-latin characters?)

Not really. All latin, no spaces. The tiddler content is in Greek but I don;t suppose it's relevant.


>
> download saving was introduced in TWC somewhere near 2.8.1 (well, some preliminary implementations were there in 2.8.0 but those were not.. enabled, let's put it this way), so the behavior of 2.6.0 is an expected one (I'd recommend to upgrade it, let me know if that's not acceptable for you for some reason, I can provide some alternatives).

Upgrading is not a dealbreaker.

>
> My own TWC file version 2.9.2 (size: 4.96 MB) doesn't save as expected:
> instead of downloading the file Chrome fails with a ''download failed -
> Network error'' message
>
> That's unexpected indeed. Have you tried disabling plugins and saving without them?

Yes, in both TWC files.


>
> By the way, if you are using FF 67, you may want to try my adaptation of Timimi. Actually, it's quite possible to adapt it to Chrome, I've already started that journey, but unfortunately haven't finished it yet and don't expect resuming it before the 15th of July (but if there's anyone willing to help, I can share the fixes I've found already).

Sadly I am not a programmer, just a tiddlywiki enthusiast, so I can't help with that. Thank you for picking up Timimi for Chrome, the 15th of July is just fine


>
> Finally, saving in Chrome is also possible if you use one of server-side savers: there's at least MainTiddlyServer by me (discussion), Tiddly-node-saver by James (thread) and minimalistic nwTWcSaver by Okido (thread).

Will try that

> Thanks for sharing the thread.

Thank you all!

sklpns

Yakov

unread,
Jun 24, 2019, 5:00:47 AM6/24/19
to TiddlyWikiClassic
Hi Sklpns,


the internal upgrade mechanism doesn't work

yeah, for now it doesn't work with download saving, only with some savers (but I'd like to point that it was actually repaired in 2.9.2 and I'll probably finalize it in the next releases, including support of upgrading when only download saving is available and upgrading with some savers like MTS which don't support it yet).


downloading the file Chrome fails with a ''download failed - Network error'' message

That's actually weird because TWC core doesn't contain such an error string. Is it shown as an alert or as a TW message?

If it's ok for you, you may send me your TW via a private message and I'll try to debug it. If you minimize its content and plugins (so that the problem is still reproducible), it would be even better because I'll be doing that anyway to find out the cause.

Best regards,
Yakov.

Mark S

unread,
Jun 24, 2019, 10:57:25 AM6/24/19
to TiddlyWikiClassic

Mark S

unread,
Jun 24, 2019, 11:13:46 AM6/24/19
to TiddlyWikiClassic
Yes, a repo would be a good idea eventually. But there hasn't been exactly an out-pouring of enthusiasm ;-) TT has already made some suggestions for improvements, but it's going to take some digging. Powershell is very different from Un*x shells, so their will need to be two (or more) different scripts for different machines.

Possibly a Bash script would work on Android/Termux. The problem with Android from 5+ on is an increasingly more restrictive permissions model. This is why most solutions for Android going forward will probably be actual Android apps. I don't think Timimi can run on Android, can it?


EVERY approach to saving has some limitation. For some reason, people see the limitations of this approach more readily than the limitations of a method that only works on certain versions of a particular browser, or that requires an executable to be installed on a machine (a security violation in some workplaces). This approach is only one step more complicated than the existing download saver mechanism.

Thanks!

@TiddlyTweeter

unread,
Jun 25, 2019, 3:17:50 AM6/25/19
to tiddlywi...@googlegroups.com
Yakov

>> Is there a repo for this/these script(s)?

Mark S.

>> Yes, a repo would be a good idea eventually. But there hasn't been exactly an out-pouring of enthusiasm ;-)

Ciao Yakov

Its a good idea. But I think the preliminary scoping can happen without one.

Mark S. is correct that the thread in the TW5 group has been widely read yet only 3 people have commented in it :-). So there isn't yet much incentive to make one.

Mark's script works well on Windows. I been playing with different ways of invoking it. (e.g. https://groups.google.com/d/msg/tiddlywiki/tMLfNs1K3JU/brxTjLh9AgAJ)

For my personal use it basically gives the utility I need. But for wider use there are issues that need exploration by others too.

Best wishes
Josiah

A Sklpns

unread,
Jul 18, 2019, 5:44:41 PM7/18/19
to TiddlyWikiClassic
Yakov, friends,

apologies for not responding for so long, got caught up with exams etc

Yakov



downloading the file Chrome fails with a ''download failed - Network error'' message

That's actually weird because TWC core doesn't contain such an error string. Is it shown as an alert or as a TW message?

>It seems to be an alert produced by Google Chrome-see screenshot

If it's ok for you, you may send me your TW via a private message and I'll try to debug it. If you minimize its content and plugins (so that the problem is still reproducible), it would be even better because I'll be doing that anyway to find out the cause.

>Thank you very much Yakov! I'll try to prepare a Minimal Test Case. Unfortunately the normal file contains other people's data so I can't freely share it. 90% of my wiki are tiddlers containing custom forms (using Form Tiddler Plugin). So far it seems that the file saves in Chrome if you remove all these tiddlers (!) plus all the system config files (!)

Again, thank you all very much
Best regards,
sklpns

Untitled1.png
Reply all
Reply to author
Forward
0 new messages