[help][tw5] Synchronizing TiddlyWikis - a single file and separate tiddlers configuration

Hi there!

I’m still struggling with a mobile workflow (Android) and playing with a few ideas so I’d appreciate any input. Thanks in advance!

Context:

  • I prefer using the separate tiddlers configuration
  • having one file feels like I’m locked in if I’d want to migrate later
  • it’s easier to use a file browser to view entries if there is an emergency
  • starting to rely on one “index.html” file feels a bit irreversible (there are export functions, but they support specific formats, not e.g. plugin specific extensions seem to be diregarded (e.g. .md for markdown tiddlers)
  • I’d love to be able to use the share to android app feature to save notes in my TW on my phone

At first my assumption is:

  • There is no Android app which is capable of serving a locally saved TiddlyWiky in the separate tiddlers format.
  • I’d love to be wrong, if there is one - the only approach I’ve found was running a node server on my phone which is a bit overkill IMO

This leads me to my questions:

  • Is there a way to generate consistently individual tiddlers from a single file “index.html” respecting the original format?
  • Is there a way to use TW on Android in the separate tiddlers format?

More outlandish ideas/workarounds:

  • Can I send a note via email into the TW (or another 3rd party channel)?
  • Save a “.tid” / “.md” file which is synchronised (I already use SyncThing) file which is automatically loaded into the TW

Thanks a lot in advance!

Welcome @Andy_Filan to help you with terminology there are these to ways to use tiddlywiki;

  • Single file wiki - use as a file, at a URL or in an app such as tiddloid/quine (iOS)
  • Node wiki - node acts as a server - this is your separate tiddler configuration. Yes this is the only way on android to store each tiddler independently.

If you want to use the node version and server on a mobile device you need to install something like termux and install node an tiddlywiki within that.

I personally and respectfully I think your reasoning is misguided. We can help you export data from a single file wiki just as easily, it is “reversable”, if not more easily than the node version and there is no lock in,. You can move a wiki between both methods, and export tiddlers from both versions in other formats. Single file wikis are easier to move.

My recommendation is to start with single file wikis, tiddlyhost.com is a good way to start and you can access them (public or private wikis) from both mobile and desktop with internet access. Until you have an essential reason and start with node on a desktop until you are more familiar.

Also once loaded in your android browser you can use it offline, and save again once online.

We are always here to help.

Thanks for the warm welcome and answer! Much appreciated.

So my assumption is correct:

  • There is no Android app which is capable of serving a locally saved TiddlyWiky in the separate tiddlers format.(aka node wiki) - without running a node server on the the phone.

I see a bigger benefit in storing the wiki in the Node Wiki format, to add to my list of PROS for it:

  • Another benefit I see in using separate tiddlers is synchronization size
  • The ability to roll-back a tiddler to a given time without rolling-back the whole wiki. (I have scheduled daily backups of the file system where the TW is stored).

Thanks for suggesting tiddlyhost, I did have a look, but as per my requirements, this doesn’t solve the below requirement:

  • I’d love to be able to use the share to android app feature to save notes in my TW on my phone
  • (+) it’s nicer to have a local copy not reliant on internet access

I understand some users prefer the portability of a one-file wiki. The portability I refer to is switching to a different wiki (aka vendor lock-in), not “file portability”. which is definitely easier when you only have one file. But let’s assume I’d switch to a single-file wiki. For the sake of an exercise:

  • what’s the process of converting a one file wiki to a node wiki?
  • can it be automated (via a bash script or similar)?

I’d attempt to convert my node wiki to a single file wiki and back to see if there are inconsistencies in the process and if it can be automated.

Thanks for the help!

EDIT: Just to clarify, I’ve been using a node wiki for 6 months now. This node wiki is build into a single file wiki and synchronised to my device via Syncthing where I have at least a read-only copy for reference purposes (accessed via Tiddloid).

EDIT2: Probably got an answer in a different thread: I will have a look at: https://tiddlywiki.com/#SaveWikiFolderCommand

Andy,

welcome to TW – Talk TW. i’m not the total newbie here but still fell like it. in your “context” section, your “starting to rely …” notion is a little premature. I was surprised how easy it was to deposit the single file TW into the node.js format. but since I am comfortable where I am my notes are incomplete on offering help with that. though there is plenty here.

I use Quine on my iPhone, iPad for “small-device” tiddling.

I’m in the process of moving my life from Dropbox to a ~/Sync folder.

Welcome to the Community

That is correct. However, it should be possible, I think, to create an Android app that starts a Node.js process in the background and opens a WebView against that. I haven’t seen this for TW yet, though.

Yes, that would be great. Tiddloid actually supports “sharing”, but the only thing you can “share” to it is another TW html file, which is unfortunate. It shouldn’t be impossible for the developers to allow sharing stuff into a TW instead.


My workflow has been to share a single html file with Syncthing between my computer and phone. It works most of the time, but I have had conflicts a number of times, and it’s always annoying and actually a bit stressful not to be able to trust the system fully.

I just tried running Node.js as a Windows service and convert my html file to “wiki folder”, as the command says. The upside of this is that

  • I don’t have to run a Timimi extension in the browser
  • I can e.g. use applications to compress all PNG image files (saved 1 MB!)
  • The git log is tidier with only changes to the tiddler files that were changed (I have a scheduled task that auto-commits all changes to a local git repo, for backup)

The downsides, however, are

  • Loading my 15 MB TW via Node.js is much slower than via single html file (6 vs 3 seconds)
  • I have to create and configure a TW service in Windows

So, I’m not really convinced that the Node.js way is better.

I have another scheduled job that generates a single html file from the Node.js folder, which is synced to the phone via Syncthing. But I’m not really sure how to sync the single file back to the Node.js folder without overwriting newer changes on the computer – so this workflow seems worse from all angles now.


I know there is another workflow using TidGi Desktop and some Android app? But I just don’t understand how that works, so I haven’t tried it.

1 Like

Tiddiloid does have add to tiddloid option - I was able to send text to tiddloid from another app and it will create a new draft tiddler everytime some text is send to tiddloid. Only app with which this was working was GitHub mobile app. GitHub app was the only app which showed a pop up with add to tiddloid option on selecting a text. In all other apps, I had to use the add to tiddloid option in android share button and with all those apps it was showing error loading page message on sharing.

I am thinking the same - not to be able to trust the system 100% is stressful. I’m still in the thinking phase, but I’m considering trying out the following setup:

  1. Have a single-file wiki for mobile synchronised via syncthing (already in place)
  2. Have a node wiki on my NAS server (already in place)
  3. Synchronise the mobile single-file wiki back to the NAS (already in place)
  4. Run a scheduled task executing the https://tiddlywiki.com/#SaveWikiFolderCommand to extract tiddlers from the mobile single-file wiki on the NAS (not tested):
    • Synchronising individual tiddlers gives me better conflict resolution granularity
    • Synchronise the newly generated tiddlers with the original node wiki (rclone?)
    • Target the original folder with the tiddlers of the node wiki (feels more prone to data loss)
    • Reload the Node server to pick up the changes

I’m considering putting all this into a single docker container, but I’m not sure if this improves my workflow or if I’ll be facing other issues. I’ve even considered different note taking apps on mobile and just saving those (or converting their output) into predefined tiddlers, with a similar workflow as above, but that workflow still needs the Node server to pickup new tiddlers/changes which existing containers don’t support.

So still in the ideation phase…