A Python package to convert Markdown to Confluence format.
Project description
Convert to Confluence
Overview
The convert_to_confluence_wiki package is a utility for converting Markdown text into a format compatible with Atlassian Confluence. It handles the transformation of various Markdown elements into their Confluence equivalents, making it easier to migrate or integrate content into Confluence pages.
Features
- Converts headers (
#,##, etc.) into Confluence headers and panels. - Transforms code blocks and inline code into Confluence code macros.
- Processes nested and numbered lists for proper indentation and syntax.
- Converts bold, italic, and strikethrough text.
- Replaces Markdown-style links and images with Confluence-compatible formats.
- Handles tables, blockquotes, and horizontal rules.
- Provides support for Confluence-specific macros like notes and warnings.
- Ensures clean and well-structured formatting by removing unnecessary empty lines.
Requirements
- Python 3.6+
Usage
- Place the
convert_to_confluence.pyscript in your project directory. - Import the
markdown_to_confluencefunction into your Python script:
from convert_to_confluence_wiki.convert_to_confluence import markdown_to_confluence
- Pass your Markdown text to the function:
markdown_text = """
# Sample Header
This is a **bold text** and this is _italic text_.
- Item 1
- Sub-item 1.1
python print("Hello, World!")
"""
converted_text = markdown_to_confluence(markdown_text)
print(converted_text)
- The output will be formatted for Confluence.
Example Output
Input Markdown:
# Header 1
This is **bold** and _italic_ text.
- Item 1
- Sub-item 1.1
python print("Hello, World!")

Converted Confluence Markup:
h1. Header 1
This is *bold* and _italic_ text.
* Item 1
** Sub-item 1.1
{code:language=python|theme=Midnight}
print("Hello, World!")
{code}
!image.png|alt=Alt Text!
Functions
markdown_to_confluence(markdown_text: str) -> str
Description: Converts a Markdown string into Confluence markup.
Parameters:
markdown_text(str): The input Markdown string to be converted.
Returns:
str: The converted Confluence markup string.
Limitations
- Custom Markdown extensions or non-standard syntax may not be fully supported.
- The script assumes well-formed Markdown input; malformed Markdown may lead to unexpected results.
License
This script is open-source and can be modified as needed for personal or commercial use.
Contributing
Contributions are welcome! Feel free to submit pull requests or open issues for bugs or feature requests.
Contact
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 convert_to_confluence-1.0.0.tar.gz.
File metadata
- Download URL: convert_to_confluence-1.0.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2ff3ae7642f2df437312c93aef07226dbd1e77da45670886b9991d64cc92db3
|
|
| MD5 |
ade6f7bd4d2385d6fb16df7fd994f93a
|
|
| BLAKE2b-256 |
8610d3967f2c95d67280ed38069d5764d295470a0456f8f357622b777e5f022b
|
File details
Details for the file convert_to_confluence-1.0.0-py3-none-any.whl.
File metadata
- Download URL: convert_to_confluence-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb569d62724ce4daaf861de2ea3dff62c9870ddc18cea7d383cba64bb0c800f0
|
|
| MD5 |
8f6a06066700f2e0cc091ec868a661ad
|
|
| BLAKE2b-256 |
4daa4afaa5d3797e2b14249bbd2ddaf13724232934053fb6bc7da89b111ef8ba
|