Skip to main content

CDS2MD

pip Version Build Status

Overview

This utility can be used to convert Confluence® Data Center pages to Markdown. Atlassian's Confluence Data Center is scheduled for end-of-life in 2029. This tool can be used in an attempt migrate data from Confluence Data Center instances to another location.

Requirements

Installation

This tool can be installed using pip or pipx:

pipx install cds2md
 (or)
pip install -U cds2md
 (or)
python -m pip install -U cds2md

Usage

This tool can be invoked from a command line using:

cds2md --help
 (or)
python -m cds2md --help

A minimal example run is as follows:

export CDS2MD_CONFLUENCE_TOKEN=TOKEN
export CDS2MD_CONFLUENCE_SPACE_KEY=MYSPACE
export CDS2MD_CONFLUENCE_URL=https://wiki.example.com/
cds2md

This will fetch page information from a Confluence space and store this data into a local cache folder (.cds2md-cache/). Once all pages are fetched, content will be converted to Markdown and placed in the output directory (output/).

Options

The following is a list of available options:

positional arguments:
  {all,connection-check,fetch,process}
                        action to perform (default: all)

options:
  -h, --help            show this help message and exit
  --ca-certificate CA_CERTIFICATE
                        ca certificate to use when communicating with Confluence
  --cache CACHE         path to store fetch cached data
  --conf, -C CONF       configuration file to load
  --confluence-space-key CONFLUENCE_SPACE_KEY
                        space to query for pages
  --confluence-token CONFLUENCE_TOKEN
                        token used to query the Confluence instance
  --confluence-token-file CONFLUENCE_TOKEN_FILE
                        file which holds a Confluence token to use
  --confluence-token-stdin
                        pass in the token via the standard input stream
  --confluence-url CONFLUENCE_URL
                        url of the Confluence data center instance to interact with
  --cql-mode            search for pages with cql api over content api
  --debug               enabling debugging logs
  --development         configure to operate in a development state
  --enable-jira-api-features
                        enable features that query jira api for content
  --flat                ignore any Confluence-detected hierarchy structure
  --header, -H HEADER   http headers to include in requests
  --ignore-cache        ignore any cached content
  --ignore-tls          ignore all TLS checks when communicating with Confluence
  --jira-url JIRA_URL   base url to use for any jira links
  --output OUTPUT       path to output markdown content into
  --sphinx-toctree      enable sphinx toctree generation
  --timeout TIMEOUT     timeout for connection REST requests to Confluence
  --tweak-admonition-type {default,docusaurus,github,gitlab,myst,plain}
                        admonition formatting to use (default: default)
  --tweak-anchor-all    force add all anchor entries
  --tweak-anchor-type {default,html,myst}
                        anchor formatting to use (default: default)
  --tweak-html-images   force all images to be generated as html-based images
  --tweak-html-tables   force all tables to be generated as html-based tables
  --version             show program's version number and exit
  --wrap WRAP           hint to the number of characters to wrap to

Translator Overrides

Users can perform custom translator overrides by defining a conf.py file and register a custom translator inside a cds2md_setup call. For example:

from cds2md.translator import Translator

class CustomTranslator(Translator):
    def visit_ac_structured_macro(self, node) -> None:
        macro_type = node.get('ac:name')

        match macro_type:
            case 'custom':
                content = ''
                content_node = node.find('content')
                if content_node:
                    content = content_node.text

                if content:
                    self.append('```')
                    self.newline()
                    self.append(f'{content}')
                    self.newline()
                    self.append('```')
                    self.newline(count=2)

                self.skip()

            case _:
                super().visit_ac_structured_macro(node)

def cds2md_setup(app):
    app.set_translator(CustomTranslator)

The CDS2MD project is unaffiliated with Atlassian.
Atlassian is a registered trademark of Atlassian Pty Ltd.
Confluence is a registered trademark of Atlassian Pty Ltd.

Metadata

Release files for cds2md 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cds2md 0.2.0
File Size Uploaded Provenance Actions
cds2md-0.2.0.tar.gz 28.7 kB With provenance Details for cds2md-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cds2md 0.2.0
File Interpreter ABI Platform Actions
cds2md-0.2.0-py3-none-any.whl Python 3 none any Details for cds2md-0.2.0-py3-none-any.whl

Total release size: 61.0 kB

Release files / cds2md-0.2.0.tar.gz

Download URL cds2md-0.2.0.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
20b4cffd9c872c44ab0438350a50c93c34c99c7750f4374eeaf4a70e230b2523
BLAKE2b-256 checksum
How to use checksums
3f376d24ac6f2a3e5a30edb8590990261b7e267a58c58047a3f3890905ac9d22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / cds2md-0.2.0-py3-none-any.whl

Download URL cds2md-0.2.0-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68281697e263e9893c4c1a5bdd51b2e77d9f8cfe9fc17961c8e738ef2c0eda57
BLAKE2b-256 checksum
How to use checksums
13c3ca6dc6be703da1ae05cc6b11d5f29ee208c9e4edfb782c1b8edbb5f5dbaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for cds2md 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cds2md-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page