I’d love to be able to edit the .tid files in wikis initialized using Node with the server version, see those changes reflected in the actual wiki running on localhost in the browser, edit those tiddlers from the browser, and have the changes written back to the directory, modifying and creating the .tid files, etc.
Not quite possible, I think. What is possible, what I have done, is to use a script to restart the server on any change to any of the .tid files in the wiki’s directory. That makes for a reliable method to build a TiddlyWiki from a file system, giving access to the sort of interface that people praise Obsidian for, for example, but with actually effective data structures. But there are a couple recurrent problems such that it doesn’t seem possible to save modifications back to the filesystem while watching the tiddler directory for changes.
I guess the workflow has to be broken up, such that you have to decided whether you’ll be using TiddlyWiki from the browser or editing it from the filesystem. Either can be done to the same wiki, but not both at the same time.
Any thoughts?
edited to add
I’ve now tried running two instances of TiddlyWiki in two browser tabs running on two different ports.
-
for browser editing: I run an instance of Node.js TiddlyWiki server:
tiddlywiki ~/Documents/wikis/scripts --listen port=8989
-
for .tid file editing: I also run my watcher script on the same directory. The watcher script runs tiddlywiki --listen on port 8080, but it reloads with every change of any file in the /tiddlers directory.
This works. I can change tiddlers in the server running on port 8989, and then the sync script picks up on the changed files, reloads port 8080, and I can see the changes there, though it pops up lots of complaints.
…but this effectively results in the version on port 8989 being write-only. I can use port 8989 or a text editor to make changes to the version being hosted at port 8080, but port 8989 will not display the changes.