This is a plugin I’ve been working on for a while that allows you to save your wiki to the file system without downloading a new file each time and without requiring an external program besides the browser. It currently only works in Chromium (desktop) browsers such as Edge/Chrome since they are the only browsers which support the necessary APIs (though others may support it once the APIs are fully standardized).
You can see File System Access API | Can I use… Support tables for HTML5, CSS3, etc for browsers which will probably work. I have not tested it on Safari so if you try it out there, let me know how it goes.
I’ve implemented several new major features for slaymaker1907/TW5-browser-nativesaver (github.com) for those who are interested.
- By default, the plugin now checks for file consistency issues (such as having the same wiki open in multiple tabs).
- I’ve softened a bit on the security implications of saving file handles to IndexedDB when the wiki is served from file://. You can now avoid selecting the file each time via a setting.
- In addition to the default saver style, you can also have a save trail of versions under a backups folder. It’s a bit clunky though so I would still recommend using a separate backup system for your wiki.
- The plugin shows a settings modal at load time. The plugin needs an interaction event (such as a click) to use parts of the file system API and I found it takes me out of the flow to have the file picker show up after I’ve edited a tiddler.
The new API for triggering modals from JS is pretty nice, but let me know if there is a way to trigger modals in a way that works with older wikis. I’m using “$tw.modal.display(tiddlerTitle)”, but this seems to be new to 5.2.1.