Convert a confluence space export in XML format to github markdown pages
Requires xsltproc to be installed, e.g. on Debian, Ubuntu or derivatives call with root permissions:
apt install xsltproc
You can run this script multiple times on your exported files: it deletes .md files in the output directory before creatting them.
- In Confluence, navigate to Space Tools / Content Tools / Export and choose XML format. Download the export zip.
- Clone this repo to your laptop.
- Unzip the Confluence export inside the cloned project dir.
- Run convert-html-entities.sh on exported files. It's only necessary to run it once.
- Run generate.sh script.
- Review generated content under out/wiki. You can copy files and commit to a GitHub code repo to verify the markdown in GitHub itself.
- Move wiki home page to Home.md.
- Clone your GitHub wiki (not the repo code!). Copy .md files from out/wiki into the wiki and add/commit/push.
# git clone git@github.com:pzzd/confluence-to-github.git
# cd confluence-to-github
# unzip ~/Downloads/Confluence-export.zip
# sh convert-html-entities.sh
# sh generate.sh