There are more than 3,000 tiddlers in my public wiki. This is great. But, I also have lots and lots of half-implemented ideas, unused plugins, macros that are broken, CSS that stopped working, etc. In other words, I’ve made quite a mess of things and it’s causing unnecessary friction.
I’m considering a fresh start with a bare tiddlywiki.html file, but I’d like to bring over all of the original content. I’ll re-implement any custom features as needed.
Can anyone recommend an approach I should take for this migration? I’m running a standalone HTML wiki, not Node.js. My thought was that I’d (via CLI?) do some sort of export/import, but don’t know if that would include unwanted tiddlers or what.
This seems like something that would come up occasionally, but I haven’t found much.
It all boils down to how you extract your content tiddlers from the configuration or system tiddlers.
Backup is critical. Ideally, you should back up your files through each step of migration.
Now you have two ways of extracting content tiddlers.
HTML Wiki
If you insist on using the HTML version of TW, then you can export your content using filter queries. See this link for examples. You can export tiddlers that match criteria in JSON format and then import them to your new TW.
Go to advanced search.
Click filters tab
Write [tag[your tag]]
Or write [search:title[some part of the title]]
You can then use the export option in the filters tab to export the tiddlers in JSON. And import them.
You might have to use different filter queries to cover all your content.
NodeJS-backed Wiki
If you are open to using NodeJS, you must first convert your old TW to NodeJS format. @oeyoews has mentioned a way.
Or you can create a new wiki running from NodeJS and drag and drop your old wiki on it.
You can trigger TW to move all the system tiddlers to the _system folder. Then all the tiddlers left outside will be your content tiddlers. But it also depends on how well you had organized your configuration tiddlers. If you have consistently named them with a prefix like $:/my-name/, then you are good.
Now, how to trigger TW to move system tiddlers to _system? See this.
Sometimes I find TiddlyWiki to be so clever that I never think of the obvious since nothing else makes difficult things so easy.
I’m embarrassed to admit that I had forgotten one can just drag any wiki.html file to import everything. This is the approach I took. So far, so good, thanks!
Now to dig through everything to find what I’ve missed or broken.
Thanks for this, but I’m more comfortable with the plain HTML version. Part of the thrill of using TiddlyWiki for me is that it’s just an HTML file, so I stopped using the Note.js version. I realize I can convert things from one to the other, which is handy, but I prefer fewer dependencies in day-to-day use.
I think you will still need filters because trying to separate content from the broken stuff in the import tiddler gets difficult especially when you have 3000 tiddlers. Cool thing is for exporting via filters, you don’t need NodeJS.
Don’t import your main content tiddlers in batches - if you batched it up for any reason then tiddlers imported in batch A will not have links to tiddlers imported in batch B.
Sounds obvious but it might be tempting for one reason or another to split the import.
Experience many times from hand importing small numbers of tiddlers. When tiddlers in first batch are processed any links to tiddlers that are not currently in the Tiddlywiki or in the batch being imported are reduced down to plain (non-active) text - if links refer to tiddlers intended for a second import then those links become plain text.
ie a link to tiddler “my tiddler” as follows [[my tiddler|my tiddler]] becomes plain text (non-link) “my tiddler”.
Discourse Note: Even deleted posts stop one posting similar content else where?
A few quick comments;
HTML Wiki is the wrong terminology, both “Single File” and “Node Based Wikis” are HTML
If you have not already separated your content from your code such as wiki-text and widgets consider doing this on either side of your migration to a new wiki. Although on a copy of the source may be the best place.
Various tools for batch tiddler manipulation are available including this and Mohammads Commander to prepare your content.
You can always gradually bring over plugins and features rather than on one hit, just try not to loose information eg; tags or links.
Thanks for all of the advice. Other than a few loose ends, I believe I have things cleaned up nicely. Now I’m working on consolidating tags and updating older titles that don’t match my newer conventions.
It’s still a bit of a mess, but it’s a clean mess (which actually makes sense to me )
The Commander plugin is a great help, and I’ll take a look at the Bundler plugin, since I’d not heard of that one.