Publish Markdown files to Confluence wiki
Project description
Publish Markdown files to Confluence wiki
Contributors to software projects typically write documentation in Markdown format and host Markdown files in collaborative version control systems (VCS) such as GitHub or GitLab to track changes and facilitate the review process. However, not everyone at a company has access to VCS, and documents are often circulated in Confluence wiki instead.
Replicating documentation to Confluence by hand is tedious, and a lack of automated synchronization with the project repositories where the documents live leads to outdated documentation.
This Python package
- parses Markdown files,
- converts Markdown content into the Confluence Storage Format (XHTML),
- invokes Confluence API endpoints to upload images and content.
Features
- Sections and subsections
- Text with bold, italic,
monospace
, underline andstrikethrough - Link to external locations
- Ordered and unordered lists
- Code blocks (e.g. Python, JSON, XML)
- Image references (uploaded as Confluence page attachments)
Getting started
In order to get started, you will need
- your organization URL (e.g.
https://instructure.atlassian.net
), - your Confluence username (e.g.
levente.hunyadi@instructure.com
), - an API key (a string of alphanumeric characters), and
- the space key (e.g.
DAP
) you are publishing content to.
These can be specified at runtime or set as Confluence environment variables (e.g. add to your ~/.profile
on Linux, or ~/.bash_profile
or ~/.zshenv
on MacOS):
export CONFLUENCE_DOMAIN='instructure.atlassian.net'
export CONFLUENCE_USER_NAME='levente.hunyadi@instructure.com'
export CONFLUENCE_API_KEY='0123456789abcdef'
export CONFLUENCE_SPACE_KEY='DAP'
On Windows, these can be set via system properties.
The tool requires appropriate permissions in Confluence in order to invoke endpoints.
Obtaining an API token
- Log in to https://id.atlassian.com/manage/api-tokens.
- Click Create API token.
- From the dialog that appears, enter a memorable and concise Label for your token and click Create.
- Click Copy to clipboard, then paste the token to your script, or elsewhere to save.
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
Hashes for markdown-to-confluence-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c5a0b31965106693c8444584d3f3969caaae1afc9b10feefc5f03635591227d |
|
MD5 | 7f72aaa0760b55306d09f5a6a1b43386 |
|
BLAKE2b-256 | eb0156c35f8860bb366447509c060074bded9144dc663e7fc6958558a6721b7b |
Hashes for markdown_to_confluence-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a18e0f90ff4ba25b32b6de28fd795b294bd1702e0fe7ecf7c924aaf64355f7d |
|
MD5 | e7b78471eb15446086b726aae4911a7c |
|
BLAKE2b-256 | 356f80ee96b6f2655b185264984a43143b5a00ba864a6ae277dc8bd17eb730a2 |