How do you save?

I am thinking, we can even do some kind of multi-user TiddlyWiki by using gitolite, with each user in its own branch.

There seems a lot of synchrony with @Yaisog’s work on https://yaisog-patches.tiddlyhost.com/, recently discussed in In-Wiki Incremental Revisions -- Now Even Better!.

I think my ideal workflow would be a bit different:

  • On every save (which is damned frequent with Node), I would like for the server to do a git add . and git commit -m "Generic (timestamped) save message"
  • The TW save button has an additional option that allows me to create a commit message that gets passed back to the server, which then merges the time-stamped commits into a single commit, and does a git push with the result.
  • Alongside the commit message would be a checkbox that lets me choose whether to publish the result as well, and another that lets me create a tag for a new version. These are passed along to the server, and the right git commands are performed for these.

That would reduce all sorts of manual tasks I perform.

I could see combining this with some of Yaisog’s work if I wanted to turn this into a publicly available tool. For my own part, I have no problem using the git command line on those occasions when I want to look at diffs. But an inline viewer such as Yaisog created, tied to an external diff from the server, might be a really nice feature.

1 Like

I set up a custom server route that responds to a request triggered by a widget message (and corresponding button and keyboard shortcuts) and creates a new git commit and pushes it. I haven’t yet had the need to fetch back older versions into the wiki but it would not be difficult to add a route that fetches the appropriate diffs.

1 Like

I’d love to hear more, if you’re willing to share. I haven’t tried any of these thoughts yet, and don’t know how to implement them, as I don’t yet know how TW messages get back to the server.

The automated bit on save I can probably do with some file-watching, but if I have actual events, it would all be cleaner.

1 Like

Yes, I really like the idea to merge the last automatic commits with a button, which also allow to add a useful commit message !

I like how doing something like that would follow some kind of Unix philosophy :

  • TiddlyWiki for the actual wiki
  • The browser for the IHM
  • Git for the history and managing versions
  • Gitolite for users permissions

In short, two ways to get messages to the server:

  • add a tiddler that a plugin listening to tiddler changes on the server responds to, or
  • add a HTTP route that you make a request to.

I can share some code but am currently on the road and wont be home until after the Easter holidays.

Is that a plugin-mechanism on the Node side? I think I asked about this at one point and don’t recall learning that there was such a thing. That would definitely be easiest for me. Else I’d have to either extend my own server, or write something that delegates most of its work to the node server.

Again, is this an extension of the normal Node server or a different tool?

I, for one, am in absolutely no hurry on this. It’s still in my “one day” bucket.

Enjoy your travels!

TiddlyDesktop on macOS, Windows and Linux, Tiddloid on Android. Cloud storage to sync the single file wiki among devices.

You can write plugins that run under node.js only and not in the browser. See for example the Filesystem plugin. In this particular case you want a change listener in the node.js only plugin.

Extension of the node.js server to add a route via a route module-type. Example here.

2 Likes

Thank you so much everyone. I will be reading and implementing things over the upcoming week. I hope to add TW5 back into my daily routine as it is simply the best.

Ah, I entirely missed that fact. Thank you, for this and for all the great advice. This is very helpful.

– Scott

This is super-exciting. I confess I followed the link and don’t understand it at all.

But I’m guessing it might mean that my github account (set up in the gap era between tiddlyspot and tiddlyhost), and the tw5 files hosted there, would suddenly become more useful??

1 Like

gitolite is not directly used in combination with GitHub. … Except that the source code is stored there.

GitHub is the company and the space, where users can store open-source projects. The underlaying software used is git.

Gitolite will allow you to manage your own git hosting service on a command line basis using git.


Gitolite is an access control layer on top of git.

gitolite (Wikipedia)

Gitolite allows you to setup git hosting on a central server, with fine-grained access control and many more powerful features.

git is a “version control” software.

git (Wikipedia)

Git is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows (thousands of parallel branches running on different systems)

GitHub is a hosting-service and a company.

GitHub (Wikipedia)

GitHub, Inc. is an Internet hosting service for software development and version control using Git.

Hope that makes it clearer.

2 Likes

As @pmario explains, no, this probably would not help you do what you want. Tools layered atop it might help you, and the sorts of things that @dionisos, @saqimtiaz, and I were discussing (and that you and I have discussed separately) would probably go a long way toward meeting your needs, whether or not they were built on gitolite. I don’t know if there’s any appetite in the community for building any such thing. I know that I’m not currently in the position to even consider it… and likely won’t be for months.

I use Timimi with Chrome/Edge/Firefox on Windows 10 and they works great! If your TiddlyWIki saving is automatic, then most of the changes is saved automatically.
I also use Wbdav (having dashboard and file upload to server features thanks to @saqimtiaz) and Node.JS for development and have no problem.

I think Timimi is the simple route for most non-technical users and newcomers. Some people also recommend TiddlyDesktop as it is portable.

You may also like the TW native saver if your browser is Chrome/Edge. For me this works on Windows 10.

slaymaker1907/TW5-browser-nativesaver (github.com)

1 Like

This is pretty much the only way to save that doesn’t require some tool outside the browser. Everything else requires an extension, a binary executable, or shell script to run. For people using a locked-down computer this may be the only viable saver.

Along the same lines as the TW5-browser-nativefilesaver that @Mohammad referenced, I like to use TiddlyStow: Tiddlystow a(nother) native file saver

It uses the same mechanism but you use it by opening the TiddlyStow html file and then load a single-file Tiddlywiki through that loader. Then you can save in place (at least in Chorme-based browsers).

Just another option.
/Mike

I wrote a python server for serving and saving tiddlywiki html files called tiddlysaver-python. I run the docker container on a home server, and point my browser at it.

1 Like

I use tiddlystow for saving single HTML TiddlyWiki for work and hosted node.js TiddlyWiki for my personal wiki and digital garden. They both work well.