I’m contemplating switching my wikis from MoinMoin to Deki.  In order to be able to do this, I need to import MoinMoin pages and attachments into Deki.

What my scripts will do:

  • Import MoinMoin pages into Deki.
  • Import MoinMoin attachments into Deki.
  • Import MoinMoin users into Deki.
  • Create a mail-new-pw shell script you can run to notify all users of their user-ID and password on the new wiki.

Known limitations:

  • All page text is imported, but it may look a little different in Deki than in Moin.
  • All attachments and embedded images will be moved to the end of their respective pages, and the embedded references to them will be changed to a message directing the user to the attachments at the end of the page.
  • Embedded URLs will not be rewritten.  This means that if your wiki is hosted at wiki.example.com, an url such as http://wiki.example.com/SomePage/Attached.file will NOT be adjusted to reference the relocated attachment.
  • Users will be imported, but passwords will not.  The Deki password 'recovery' process is available to users to gain access to their migrated account, as well as the email-password script generated by this upgrade process.


  • A Deki wiki (can be empty).
  • A MoinMoin wiki.
  • A Windows PC with
    • Python 2.5
    • MoinMoin 1.5.8
    • Cygwin
  • The instructions below assume that you have a MoinMoin wiki at www.example.com, that you've been evaluating Deki at wiki.example.com, and that you want your new wiki to be available at www.example.com.
  • Patience!

It does all the Deki I/O via curl, so you can use it for samples of the curl commands for:

  • Authorization (login)
  • Page creation
  • Subpage creation
  • User creation
  • Attachments

Please note: I prefer to keep these instructions on my site, and that people download the scripts via this page.  That way, there is a slight chance that I’ll pick up some extra cents from the ads.

Step-by-step instructions:


  1. Download my scripts to a Windows PC, and unzip them into a directory.
  2. Download the MoinMoin data directory to a Windows PC.
  3. Shut down your MoinMoin wiki and bring up your new Deki wiki at the old URL.
    1. Edit your httpd.conf:
      1. Comment out your MoinMoin VirtualHost at www.example.com.
      2. Locate your entry for wiki.example.com, and change its server name to use www instead of wiki.
    2. Restart Apache 
    3. Make sure your (possibly empty) Deki wiki works at the new URL.
  4. Edit myoptions.py to contain values relevant to your Deki wiki.
    1. Note: You may wish to create a special wiki user ID named something like "imported-from-old-wiki".
  5. From a CMD prompt, run: python builder.py C:\path\to\your\wiki\data-directory
    1. You now have a 'listfiles' subdirectory, containing content that is ready for importing into Deki, plus a 'load2deki.sh' shell script.
  6. From a Cygwin prompt, run: bash load2deki.sh
    1. Your pages have been loaded into your Deki wiki.  Note that it is safe to re-run this script, if needed.  It will overwrite any previous editions of the pages.
  7. From a CMD prompt, run: python builder2.py C:\path\to\your\wiki\data-directory
  8. From a Cygwin prompt, run: bash load2deki2.sh
    1. Your attachments have been loaded into your Deki wiki.
  9. From a CMD prompt, run: python builder3.py C:\path\to\your\wiki\data-directory
  10. From a Cygwin prompt, run: bash load2deki3.sh
    1. Your users have been loaded into your Deki Wiki.
  11. Optional: Run mail-new-pw.sh on a server that supports the Unix/Linux 'mail' command.  This will send email to each of your users, with their new ID/password.