A tool to export Confluence pages to Markdown
Project description
confluence-markdown-exporter
The confluence-markdown-exporter exports Confluence pages in Markdown format. This exporter helps in migrating content from Confluence to platforms that support Markdown e.g. Obsidian, Foam, Dendron and more.
Features
- Converts Confluence pages to Markdown format.
- Uses the Atlassian API to export individual pages, pages including children, and whole spaces.
- Supports various Confluence elements such as headings, paragraphs, lists, tables, and more.
- Retains formatting such as bold, italic, and underline.
- Converts Confluence macros to equivalent Markdown syntax where possible.
- Handles images and attachments by linking them appropriately in the Markdown output.
- Supports extended Markdown features like tasks, alerts, and front matter.
Supported Markdown Elements
- Headings: Converts Confluence headings to Markdown headings.
- Paragraphs: Converts Confluence paragraphs to Markdown paragraphs.
- Lists: Supports both ordered and unordered lists.
- Tables: Converts Confluence tables to Markdown tables.
- Formatting: Supports bold, italic, and underline text.
- Links: Converts Confluence links to Markdown links.
- Images: Converts Confluence images to Markdown images with appropriate links.
- Code Blocks: Converts Confluence code blocks to Markdown code blocks.
- Tasks: Converts Confluence tasks to Markdown task lists.
- Alerts: Converts Confluence info panels to Markdown alert blocks.
- Front Matter: Adds front matter to the Markdown files for metadata like page properties and page labels.
Usage
To use the confluence-markdown-exporter, follow these steps:
-
Installation: Install python package via pip.
pip install confluence-markdown-exporter
-
Setting Environment Parameters
- Set
ATLASSIAN_USERNAMEto your Atlassian account email address (e.g. mike.meier@company.de) - Set
ATLASSIAN_API_TOKENto your Atlassian token that can be created on https://id.atlassian.com/manage-profile/security/api-tokens - Set
ATLASSIAN_URLto your Atlassian instance URL (e.g. https://company.atlassian.net)
export ATLASSIAN_USERNAME="work mail address" export ATLASSIAN_API_TOKEN="API token Test" export ATLASSIAN_URL="https://company.atlassian.net"
- Set
-
Exporting: Run the exporter with the desired Confluence page ID or space key.
python confluence-markdown-exporter page <page-id e.g. 645208921> <output path e.g. ./output_path/> python confluence-markdown-exporter page-with-descendants <page-id e.g. 645208921> <output path e.g. ./output_path/> python confluence-markdown-exporter space <space-key e.g. MYSPACE> <output path e.g. ./output_path/>
Instead of
confluence-markdown-exporteryou can also use the shorthandcf-export. -
Output: The exported Markdown file(s) will be saved in the specified
outputdirectory e.g.:output_path/ └── MYSPACE/ ├── MYSPACE.md └── MYSPACE/ ├── My Confluence Page.md └── My Confluence Page/ ├── My nested Confluence Page.md └── Another one.md
Contributing
If you would like to contribute, please read our contribution guideline.
License
This tool is an open source project released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file confluence_markdown_exporter-1.0.1.tar.gz.
File metadata
- Download URL: confluence_markdown_exporter-1.0.1.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bd0d7cc4bf1c8f4e492c7df79ed011e917cba0499bd8ed470c1966b88ffd1c5
|
|
| MD5 |
73c7c091b2c2953c890e1a92880075f4
|
|
| BLAKE2b-256 |
52790bae64a7103cc616c0e821c25868589f360b0116bae48532e6aa2b7171a9
|
Provenance
The following attestation bundles were made for confluence_markdown_exporter-1.0.1.tar.gz:
Publisher:
publish.yml on Spenhouet/confluence-markdown-exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
confluence_markdown_exporter-1.0.1.tar.gz -
Subject digest:
6bd0d7cc4bf1c8f4e492c7df79ed011e917cba0499bd8ed470c1966b88ffd1c5 - Sigstore transparency entry: 183567560
- Sigstore integration time:
-
Permalink:
Spenhouet/confluence-markdown-exporter@95db794f2df31e82c9535579a278164e95fa36e4 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/Spenhouet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@95db794f2df31e82c9535579a278164e95fa36e4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file confluence_markdown_exporter-1.0.1-py3-none-any.whl.
File metadata
- Download URL: confluence_markdown_exporter-1.0.1-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ee8d5af7fad640c260f8cae7fd236962b0894e838c4a343f37bd718695fa3cd
|
|
| MD5 |
ad321348b97897aca45e9cbc98c93a22
|
|
| BLAKE2b-256 |
1b2490fa3348eaa6eb74a5a190713bca8de4d07660c36667d022648371a1cc09
|
Provenance
The following attestation bundles were made for confluence_markdown_exporter-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on Spenhouet/confluence-markdown-exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
confluence_markdown_exporter-1.0.1-py3-none-any.whl -
Subject digest:
3ee8d5af7fad640c260f8cae7fd236962b0894e838c4a343f37bd718695fa3cd - Sigstore transparency entry: 183567562
- Sigstore integration time:
-
Permalink:
Spenhouet/confluence-markdown-exporter@95db794f2df31e82c9535579a278164e95fa36e4 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/Spenhouet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@95db794f2df31e82c9535579a278164e95fa36e4 -
Trigger Event:
push
-
Statement type: