Joshua Flanagan’s FlexWiki–>OneNote

It looks like Joshua has been at it again, fresh off his OneNote DevPal release he has posted his own FlexWiki to OneNote tool! You can read about it here: Migrate from FlexWiki to OneNote

Here are some excerpts:

Then Microsoft OneNote 2007 was released, sporting a new "shared notebook" feature. With OneNote, you get the same ease of access and ease of editing that a wiki provides, but with a much smoother experience. To mirror the history log functionality of a wiki, you can store your shared notebook in a versioned SharePoint document library. The only disadvantage of OneNote compared to a wiki is the requirement for all of your users to have OneNote. If that requirement is already met, I believe OneNote is a far superior experience. OneNote advantages at a glance:

  • Easier editing. Toolbar buttons and shortcut keys instead of funky markup syntax to learn. No need to switch to "edit mode".
  • Richer formatting. Text can be many styles, sizes, colors. Screenshots and other images can be easily pasted inline. Documents and audio clips can be attached to a page.
  • Easier searching. Searches find words in any page text, image, or audio clip!
  • Offline access. All data is synchronized to your local machine when you are connected to the network, so you can access it when you are disconnected. Any edits you (or others) make are automatically synchronized to and from the shared location when you reconnect.

My team was sold on the benefits, but we had a sizable investment in our existing FlexWiki installation. Thankfully, OneNote has a nice API that makes it easy to get data in and out. I was able to put together an application that migrated our entire wiki to a OneNote notebook, with all formatting and hyperlinks intact.

Command-line syntax:

wiki2one <wikiRoot> [Notebook] [SectionName]

wikiRoot is the full path to the directory containing your *.wiki files. This is the only required parameter.

Notebook can be either just a name or a full path to a Notebook folder. If the notebook does not exist, it will be created. If a path is not provided, it will be created in the same location as your first existing notebook. If a value is not specified, the default is Wiki2One.

SectionName is the name of the OneNote section that will contain the migrated pages. If it does not exist, it will be created. If not specified, a default is generated based on the current time.

Note that all pages are imported into a single OneNote section. It is very easy (and highly recommended) to then organize the pages into logical sections once the migration is complete.

If you make improvements to the code, let me know, and I'd be happy to host it, or link to it from this post.

Download the source code

Download the executable (requires the .NET Framework 2.0 runtime)

What I love is that you can download the source yourself and modify it accordingly. Nice work Joshua and please keep up the great work! For everyone else if you modify this code please let me and Joshua know.

Skip to main content