Tools for converting Confluence wiki pages to Markdown for easy compatibility with GitHub wiki.
Credit: Steps submitted by user Dan Osburn here: https://answers.atlassian.com/questions/235590/export-pages-in-wiki-markup
1 In Confluence click 'Space Tools' in the bottom left and select 'Content Tools'. 2 Click the 'Export' tab > select 'HTML' > click 'Next' 3 Select 'Custom Export' > check the pages you want to export > click 'Export' 4 Wait for the pages to export, click the link to download. 5 Unzip the downloaded file. Move the resulting folder to the same directory as this file.
-
Clone the repo
$ git clone [email protected]:GeorgeNagel/confluence-markdown.git # Move into the repo $ cd confluence-markdown
-
Create a Python virtual environment
$ virtualenv -p python3 virtualenv $ source virtualenv/bin/activate
-
Install required packages
(virtualenv)$ pip install -r requirements.txt
-
Convert your Confluence export to Markdown
(virtualenv)$ python markdown.py path/to/confluence/export
-
Rename any Markdown-converted files. Note that name/of/file should be the path as it exists relative to the Markdown-converted folder. For example, if renaming a file in the top-level of the folder, just use
filename.md
.(virtualenv)$ python rename_file.py path/to/markdown/converted name/of/file.md