confluence.md
Push markdown files straight to a Confluence page.
What it does?
confluence.md allows you to push any markdown file to Confluence. You can create
a new page (under given parent) or update an existing one.
How to install?
It's as easy as:
$ pip install confluence.md
# If the above doesn't work, your `pip` command points to different
# python than installation than `python` command. If so, run:
$ python -m pip install confluence.md
How to use it in command-line?
Markdown to Confluence
Example workflow:
1. Create page
Create a new page under --parent_id:
$ confluence.md --user user@name.net \ # Atlassian username
--token 9a8dsadsh \ # API token or --password
--url https://your-domain.atlassian.net \ # Confluence instance URL
create \ # create or update
--file README.md \ # markdown file
--parent_id 182371 \ # parent page
--title "new title" # title for a new page
--add_meta # adds meta to source.md file
2. Verify markdown
The page is created and the file is decorated with metadata:
$ head -n 3 markdown.md
---
confluence-url: https://your-domain.atlassian.net/wiki/spaces/SP/pages/18237182/new+title
---
3. Update page
Performing an update does not require providing --page_id and --url:
$ confluence.md --user user@name.net --token 9a8dsadsh update --file README.md
Doing an update with --page_id and --url is still possible.
Consider adding useful --add_info option.
To create Atlassian API Token go to api-tokens.
Command line arguments
Actions:
updateUpdates page content based on givenpage_idor metadata in Markdown filecreateCreates new page under givenparent_id
positional arguments:
{update,create}Action to run
optional arguments:
-h,--helpshow this help message and exit--file FILEinput markdown file to process--add_metaadds metadata to .md file for easy editing--add_infoadds info panel automatic content do not edit on top of the page--add_labelADD_LABELadds label to page--convert_jiraconvert all Jira links to issue snippets (either short [KEY-ID] format or full URL) note: this options works only in Cloud instances with Secure Markdown installed-v,--verboseverbose mode-q,--quietquiet mode
required auth parameters:
-uUSER,--userUSERAtlassian username/email-tTOKEN,--tokenTOKENAtlassian API token-pPWD,--passwordPWDAtlassian password (used in on-prem instances)-lURL,--urlURLAtlassian instance URL-n,--no_verify_ssldon't verify SSL cert (useful in on-prem instances)
create page parameters:
--parent_idPARENT_IDdefine parent page id while creating a new page--titleTITLEdefine page title while creating a new page--overwriteforce overwrite if page with this title already exists
update page arguments:
--page_idPAGE_IDdefine (or override) page id while updating a page
How to use it in a Python script?
ConfluenceMD wasn't designed to be used this way, but it's fairly simple to embed it in a Python script. See this example:
from md2cf.utils.confluencemd import ConfluenceMD
conf_md = ConfluenceMD(username=user,
md_file=md_file,
token=token,
url=url,
convert_jira=convert_jira)
# create new page under parent_id
new_page_id = conf_md.create_new("parent_id", "title")
# update existing page with given page_id
page_id = conf_md.update_existing("page_id")
Metadata
Release files for confluence.md 0.4.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| confluence_md-0.4.9.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| confluence_md-0.4.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.4 kB
Release files / confluence_md-0.4.9.tar.gz
| Download URL | confluence_md-0.4.9.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f4f73fc9b50bb4f4c5ae96689728a04a4747b3ffd42fe8278042fc8bb51f4bb
|
|
BLAKE2b-256 checksum How to use checksums |
60960c2800c65a38afdd90a6fc0ab41db3e0b301a6460a588b890e2251ce4281
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / confluence_md-0.4.9-py3-none-any.whl
| Download URL | confluence_md-0.4.9-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c0412c1acc04110c5b25555dfe5598884f2a4fab1ab542d066289c28d0394ac
|
|
BLAKE2b-256 checksum How to use checksums |
ac5961f29b38dd924d5595e5314a34cdc01318358252f928cced44025997460e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|