Sometimes, because of issues that happen to me when using the web browser on mobile devices, other times because of other reasons, I’d like to be able to edit my TiddlyWiki at any given time not only via the single-HTML-file web application, but also via normal text editors.
For example, when I’m from my desktop, or when I need to both visualize and edit some information at the same time, I could choose to open the webapp like I already do and do my work; other times, maybe when I’m on mobile or I already know that I just need to do some edits and know what kind, I may decide to open a native text editor and operate on tiddlers saved on the device’s file system.
My understanding is that if I were to use TiddlyWiki via the Node.js server, I could either use the web app as normal, and it would save to the server, or access the server’s OS (via SSH or SFTP for example) and edit the saved tiddlers there, then restart the node server to get the webapp updated… even if I was wrong on this, it’s not an acceptable solution for me, for various reasons I won’t go into detail now.
As I said, I currently just make edits from the HTML app. I get it served from my GitLab Pages repo, and use the integrated GitLab saver to sync the edited HTML file to that same repo, and everything works well, but at the same time I’m locked to only editing via the single-page-app… unless I were to do something like the following, which is the opposite of quick or comfortable:
- Download the HTML file to my device
- Open a terminal emulator and call a tiddlywiki command to export all raw tiddlers to files
- Edit the files as I want
- Use another tiddlywiki command to repack the edited tiddlers from files to the single-page HTML
- Upload the HTML file to the repo
I need an actually good solution. The only one I can really think of, which is kind of hacky but should work (I’ve not tried it in practice yet though), and it would run entirely on GitLab’s servers automatically, is to create a secondary repo (that will store raw tiddler files), and use it parallel to the primary (that stores the wiki in single HTML file).
In both repos, I will use CI workflows to first check what kind of commit is being made, to prevent infinite cycles (I could simply check the commit message ideally).
- When I commit to the primary repo (the one with the HTML wiki), the workflow will make a commit to the secondary repo, extracting all tiddlers as raw files and pushing the changed ones.
- When I manually commit to the secondary repo (the one with the .tid files), the workflow packs all files into the single HTML and pushes it to the primary repo.
That said… maybe some of you have a less complicated solution for doing what I’d like, although mine (if actually proven functioning) should work without any maintenance after the first setup. Do you? Let me know!
On a side note: do any of you people edit your wikis from an Amazon Kindle?
I’ve found that the integrated browser is an extremely ancient embedded version of WebKit, and TiddlyWiki doesn’t run on it at all, instead crashing on boot (despite the app, amazingly I’d say, working flawlessly on browsers at least as old as Firefox 36).
If I were to setup this ideally good way of being able to edit my wiki from text files, then I could even satisfy this particular one of my desires, as my Kindle is jailbroken and I have access to terminal emulators, text editors, and other goodies.