Confluence Universal Wiki Converter (UWC) for ScrewTurn

My company recently started a corporate wiki. We initially used ScrewTurn, an excellent open source ASP.NET application. It worked great for our department, but it wasn’t taking off for the rest of the company. Non-technical users just couldn’t get wiki markup and weren’t able to manage edits with the visual editor. So we turned to Confluence, an enterprise class commercial wiki. I won’t get into a feature comparison here. There are plenty of other sites devoted to that.

Since we had been using ScrewTurn for several months, we had a few hundred pages that we needed to migrate to Confluence. We hoped to find a utility to take care of the migration, but we were unable to find one. So in the end, I wrote my own UWC implementation for ScrewTurn.

The Confluence Universal Wiki Converter (UWC) is defined as

… a standalone application which converts pages from other wikis to Confluence. It’s also an extensible framework, allowing users with wikis that aren’t currently supported to add their own converters.

Here are the general steps I took to implement a wiki converter for ScrewTurn.

  1. Implement a Wiki Converter for ScrewTurn. I used MediaWiki’s Syntax Converter as a base since the basic wiki syntax is very similar. I also implemented a few Converter classes, UserDateConverter (requires the Confluence UDMF plugin), PagenameConverter, AttachmentsConverter, MetaDataCleaner (to remove the first three lines in ScrewTurn page files that include page name, date, and ##PAGE##).
  2. In ScrewTurn, change the page storage provider to Local Pages Provider (if its using a different provider such as SQL).
  3. Run the customized UWC implemented in step 1 and convert one namespace at a time.

You can also view my StackOverflow question and answer that inspired this post.