My long relationship with MediaWiki is over. It’s been over for a while if I’m honest.
Anyway, there’s no trivial way to import MediaWiki data into Bookstack but here’s what I did:
- First I installed Bookstack.
- Then export MediaWiki data to xml:
php maintenance/dumpBackup.php –current –include-files > /tmp/all_pages.xml
- Clone https://github.com/outofcontrol/mediawiki-to-gfm
./convert.php –filename=/tmp/all_pages.xml –output=/path/to/converted/files
- Find where your images went:
php maintenance/dumpUploads.php
- Clone
https://github.com/Yetangitu/bs
- Go to your bookstack implementation and get an API key.
- Follow the instructions for ‘bs’ to configure it with your API key.
- use ‘bs’ to create books/chapters/pages using the data from step 3.
- Upload the images from step 4.
- A bunch of manual cleanup and reorganizing.
This is not for the faint of heart but it’s also not difficult. Just a bit tedious.