Skip to main content

Utilities to migrate Confluence export to Sphinx, Juypter Book, etc.

Project description

PyPi PyPi Python 3.10 Python 3.9 Python 3.8 Python 3.7

Migcon: Migrate Confluence Export to Jupyter Book

This utility assists in converting Confluence content to a Jupyter Book project. Specifically, once you have a Confluence HTML export that has been converted to Markdown, run this utility against the converted source to move documents into a directory structure that mirrors the confluence page hierarchy as well as generating the Jupyter Book-isms necessary to correctly publish back to confluence.

To run:

./con2jupyterbook -i <source-dr> -o <target-dir>

Notes

When exporting from confluence, an index.md file is generated that holds the exported page hierarchy in a nested list. This utility relies on that format, so the index.md file should not be edited prior to running this utility.

What it does...

The HTML export from Confluence dumps the whole tree into a single directory. The con2jb will create a directory tree to mirror the page hierarchy from confluence and do some requisite fixup automatically. Additionally, it will generate the jupyter book table of contents to ensure that the correct page hierarchy is restored upon publication.

There are several other miscellaneous fixes that are performed including: referencing attachment and image links from the root rather than the current directory and removal of some sections that are added to a given page that are not present in the Confluence page source, e.g. Comments, Attachment Lists, Change History.

Step-by-Step Instructions

  1. Prerequisites: Node.js installed, Python installed
  2. Use Confluence to export all or a part of your wiki via HTML. (Export Content...)
  3. Create a working directory and unzip the Confluence export into that directory (sub-dir html)
  4. Clone Confluence to Markdown
  5. From within the cloned directory run npm run start <working-dir>/html <working-dir>/markdown
  6. pip install migcon
  7. Run con2jb to convert the exported markdown into a MyST, sphinx friendly markdown/dir structure con2jb -i <working-dir>/markdown -o <working-dir>/sphinx
  8. Copy the resultant jupyter book friendly markdown into the project of your choice
  9. Use jupyter book to build your desired output. Note: this will result in a few warnings that need to be addressed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

migcon-1.2.2-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file migcon-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: migcon-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for migcon-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ef1b88d88301f02d2819e3c141eb5bb6417a29ec55dd8de6309a34ee5535dee
MD5 9b6a93e23b9ae42f5d08cd7d4486f73f
BLAKE2b-256 16d5cf965922a4bea21203bd3f069aa0751cd7159d285866dc5668e4d4511dd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page