A Python package to convert Markdown to Confluence format.
Project description
Convert to Confluence Wiki Formate
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 import MarkdownToConfluenceConverter
- 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!")
# add stoping statement also(i.e. ```)
"""
converter = MarkdownToConfluenceConverter(markdown_text)
confluence_text = converter.convert()
print(confluence_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
#Added as comment for readme ```
python
print("Hello, World!")
#Added as comment for readme ```

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!
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
Email: aryamangurjar6@gmail.com
Github: https://github.com/AryamanGurjar
Linkedin: https://www.linkedin.com/in/aryaman-gurjar-251ab2201/
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.1.tar.gz.
File metadata
- Download URL: convert_to_confluence-1.0.1.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 |
2046b5a4c3913cda9c63f90dfb55a6c1e47c26b3e938ede3d42f11aacdc8e05d
|
|
| MD5 |
81269bbb6e8c6570c0d157e31c2b3810
|
|
| BLAKE2b-256 |
1b3e113de35386a669184325d7b2cf68db842208a30e625bdb27de221266d32e
|
File details
Details for the file convert_to_confluence-1.0.1-py3-none-any.whl.
File metadata
- Download URL: convert_to_confluence-1.0.1-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 |
84c1d3af3253f4e5fa4e13dc17aa9e834c5cea26c8dcb28e746dc77738b14f5d
|
|
| MD5 |
c74c9bb8d2b4128ead2b3bcd9bfd7425
|
|
| BLAKE2b-256 |
b6860bb7c35fdca9ff35ce5fec3b63dccaa9dcf8ed585d2b2afad4cbff8618aa
|