I’ve written version 2 of Tiddlystow. Tiddlystow is a helper web page for loading and storing local TiddlyWiki files. Version 2 is in an alpha state and needs much more testing before relying on it for anything important. Please backup your work.
Tiddlystow v1 is still available at TiddlyStow - stow TiddlyWiki files locally using the browser file system api and is unchanged. Version 2 is brand new and completely different. It is available at Tiddlystow put saver.
Version 2 shares these features in common with version 1:
- Works with any single-file TiddlyWiki instance. No plugins required.
- Can load and store browser external TiddlyWiki files. This external file feature only works on Chrome/Edge desktop browsers. (Actually I just discovered it also works on my Android chrome browser. I’m pretty sure this is new)
- Works offline
Version 2 has these enhancements:
- Can load and store browser internal TiddlyWiki files (OPFS). This feature is supported by all major browsers, desktop and mobile since 2023. However, I just discovered Safari’s OPFS implementation is missing a feature I’m using, so iOS will not work
. I have tried it on Linux and Android Chrome and Firefox.
- Each stored wiki has a url which can be bookmarked in the browser or linked to by other stored wikis
Version 1 and 2 have completely different implementations
When a wiki is loaded into version 1, it replaces the page’s contents with the TiddlyWiki. It leaves behind a custom-saver javascript function which will save the file to the external filesystem. Since it uses the built-in custom-saver feature, it is “invisible” to the loaded TW and no special plugins are required.
Version 2 is also “invisible” to the loaded TW. It is implemented as a service worker. It loads and saves local TiddlyWiki files by intercepting HTTP GET and PUT calls in a way that is compatible with TiddlyWiki’s built-in PUT saver.
When the browser issues a GET, the service worker will read the file from the internal or external storage. When TiddlyWiki sends a PUT, the service worker will save the file to internal or external storage.
The service worker is not limited to storing TiddlyWiki files. It is possible, for example, to use @saqimtiaz’s File Uploader PUT version (experimental) to save large attachments to the same browser internal/external filesystem alongside your TiddlyWiki files.
Screenshot of the main page:
Screenshot of empty directory contents. Create a wiki:
Screenshot of the page to populate the wiki:
Screenshot showing the directory listing is no longer empty: