Strategies for starting "fresh"

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.

Jack

HTML file can convert to nodejs folder

tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder
1 Like

First of all. Make a backup :slight_smile:

  • You can download empty.html
  • Import the plugins you want to use
  • Make sure they work to your liking.
  • Backup this one too … so you can use it again if the import in the next step doesn’t work.

  • Open your new wiki in the browser
  • From the file explorer drag and drop import your “old” wiki into the new one opened in the browser
  • Make sure you only select your content tiddlers — not the broken stuff.

Done.

2 Likes

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.

  1. Go to advanced search.
  2. Click filters tab
  3. Write [tag[your tag]]
  4. 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.

Now comes the core of the solution. See this part of the doc.

If you have a system tiddler, $:/config/FileSystemPaths with rule,

[is[system]!has[draft.of]removeprefix[$:/]addprefix[_system/]]

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.

1 Like

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.

1 Like

Cool!

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.

Anyway, best of luck!

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.

Strategies for starting “fresh”

“Fresh” is a bit of a mixed metaphor in English? :slight_smile:

Care to share an example of this?

I did not face this issue. There were missing tiddlers, but they got populated in subsequent import batches.

Hi,

Care to share an example of this?

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.
1 Like

There are some great tools out there. I like the bundler plugin.

That way I can create bundles with:

  • code
  • content
    • sorted in different groups if applicable
  • plugins

It does so by using filters. That makes for great customized flexibility.

The exported code and plugin bundles are also my backups. If a new release is available I can simply drag and drop the exported files and start fresh.

2 Likes

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 :slight_smile: )

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.

Thanks again.