Turning a wiki into a virtual file system

@Shane_Ashby asked an interesting question. And while I don’t think what he wants is possible, it does suggest to me an intriguing possibility for a useful bit of tooling. Could we make a wiki into a virtual file system that could be mounted in an OS? Lots of tools do this. Dropbox acts like a file system I could simply drop files into, rearrange, etc. (Or at least it used to; I haven’t used it in years.) Windows sometimes uses zip files like this. Linux seems to be able to mount anything. Could Tiddlywiki do the same thing, either with an individual wiki or a collection of them?

It might be an entirely flat system, the way Tiddlywiki has a single tiddler namespace. But we could make it virtually hierarchical, with the / treated as a folder separator. (There’s one minor catch here. Most hierarchical file systems allow a name to represent either a folder or a file, but Tiddlywiki’s namespace would probably insist it could be both: foo/bar is a tiddler name, and so is foo/bar/baz. But I think we could deal with that.)

This would of course solve @Shane_Ashby’s issue, but seems to have larger implications for another powerful way to use TW.

I don’t know how to do this; I’ve never written a virtual file system; I’m sure doing so is at least moderately complex, but are the fundamental flaws in the idea? And if we could do it, are there good reasons we shouldn’t? Would people use this? We already have a workable drag-and-drop solution for non-TW content; is another really useful? Are there other serious objections?

I’m not volunteering. If we do decide to do this, and no one else steps up, I might be willing to try this, but not while I’m working on my Periodic Table, and that’s likely to last many more spare-time months before I get to a beta version. Plus I have two plugins that need some love to get to version 1.0; and one of those may take some substantial work. But it sounds interesting, and if the community wants this, I would be interested in eventually trying this should no one else step forward.

What do you think?

Is this related to what you have posted

1 Like

Why not just transform html wiki to nodejs wiki? Then tiddlers will be on the os, and you can transform back at any time.

To some extent. I’ve only haphazardly followed saq’s work here. But while I think the ideas would overlap, I think they would also be substantially different.

Think about desktop File Explorers, such as Nautilus or Dolphin on Ubuntu, Windows Explorer, or Mac’s Finder. They used to start with, “here’s /home (or C:\) and you can navigate from there.” These days, the physical file system is deemphasized, and they focus on virtual ones such as Desktop, Documents, Downloads, Music, Pictures, Video, Trash/Recycling. While these systems may simply be pointers to folders within the file system, they don’t have to be, and the users don’t have to care. They can drag and drop files within and between them, open documents from within them and save files to them What if we also offered, say, Wikis?

If I would prefer to edit my CSS inside VS Code, I could navigate to Wikis/path/to/MyWiki/stylesheets/mainStyles.css (or some similar syntax, perhaps with a special separator after the specific wiki, like Wikis/path/to/MyWiki::stylesheets/mainStyles.css ), edit the file, and on save, it’s now in the wiki. I don’t know if there would have to be a manual refresh or if the host could send a signal to the browser that it’s changed. I can create and delete new files the same way, could clone tiddlers or whole “folders” full of them by dragging them between wikis. If I want to store my MS Project files inside my TW (the impetus for Shane’s question), it would feel just like storing it on the file system.

As I said, I’ve never written anything like this before. I can’t see any logical obstacle, but there could be all sorts of technical ones, and some might be insurmountable. My question now is more whether this sounds like something people would use.

The trick is to make this same idea more seamless. What if when you wanted to edit a tiddler inside a separate tool, you simply clicked “edit” and that tool loaded your file; that when you clicked “save” from that tool, your edits are loaded back into your wiki? Again, I don’t know just how possible this might be, but does it seem worth pursuing?

I’ve been doing my own digging as well, and I think tiddlyserver does this. As described:

“TiddlyServer takes the server command of TiddlyWiki on NodeJS and adds it to a static file server.”

on the page here: https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/Arlen22/TiddlyServer&ved=2ahUKEwifyJe078f9AhUbm2oFHf-MDqMQFnoECA0QAQ&usg=AOvVaw0M_BFLhBLn4LDCMUSq6tlu

It might. I played with it once some time ago. It didn’t do quite what I wanted, and I’ve mostly ignored it since.

But the documentation mainly suggests that it’s a way to work with full wikis in a useful manner. What I’m imagining here is something that treats your wiki – while it still works fine as a wiki – as also a collection of files on the file system that you could use just like you would any other parts of the file system. If you want to change a MS Project tiddler, you click it from your file manager, edit it, save it, and when you next look at it inside the wiki (well maybe you can’t for Project), the resulting changes are available.

Not only do I not know if this is possible from a Tiddlywiki standpoint, I also don’t know if it would be useful to anyone or if it would be a good idea to try. But I find it at least a bit intriguing.

1 Like