Parse confluence xml export and generate pages with mediawiki markup.
- Clone this repo and
cd xml2mw. - Use
pipenv installto install all dependencies (or ensure for yourself that you usepython3and thatlxmlandanytreeare installed). If usingpipenv, typepipenv shellafterwards to enter the virtualenv. - Place the
entities.xmlfile from the confluence export inside adatasubdirectory (or adjust theXML_PATHsetting in the script). - Optionally adjust
OUT_PATH, which specifies where result text files will be placed. - Run
python xml2mw.py.
Now, result files should be in OUT_PATH, and a file sitemap.txt should be in the base directory.
If you want to run the test suite, just run python -m unittest discover. Using pytest should work as well, if you prefer that. pytest is included in the development dependencies, which you can install with pipenv install --dev.