Export Confluence page and convert to others formats
Project description
Confluence exporter
Table of Contents
Overview
Confluence exporter is a module and a script used to export pages from Confluence. All the pages exported are merged in one document.
Currently, only the Pdf exporter is fully functional but it is planned to support others formats like :
- Word
- Markdown
Installation
It is recommended to use a virtual environment :
python -m venv venv
To install the module and the main script, simply do :
pip install .
For the developers, it is useful to install extra tools like :
These tools can be installed with the following command :
pip install .[dev]
The Git hooks can be installed with :
pre-commit install
The hooks can be run manually at any time :
pre-commit run --all-file
Usage
The script with required argument can be started by executing the following command :
./confluence-export my_config.yaml
The full list of arguments supported can be displayed with the following helper :
./confluence-export.exe -h
usage: confluence-export [-h] [-v] [--user ATLASSIAN_USER]
[--password ATLASSIAN_PASSWORD]
[config.yaml]
positional arguments:
config.yaml Configuration file
optional arguments:
-h, --help show this help message and exit
-v, --verbose Verbose mode
--user ATLASSIAN_USER
Define the user to connect to Atlassian server
--password ATLASSIAN_PASSWORD
Define the password to connect to Atlassian server
Configuration
The configuration file support 2 formats :
- YAML format (Recommended format)
- JSON format
In Yaml :
Server:
Confluence: "https://my.confluence.server.com"
Pages to export:
<Space Key 1>: "Page title 1"
<Space Key 2>:
- "Page title 1"
- "Page title 2"
In Json :
{
"Server": {
"Confluence": "https://my.confluence.server.com"
},
"Pages to export": {
"<Space Key 1>": "Page title 1",
"<Space Key 2>": [
"Page title 1",
"Page title 2"
]
}
}
The space key can be found easily in the URL of any page :
https://my_confluence_url.com/display/<Space key>/...
Server configuration
The Server
node will configure the URL of the Confluence server.
For the moment, only the username/password authentication is supported but only
in the command line for security reason.
In Yaml :
Server:
Confluence: "https://my.confluence.server.com"
In Json :
{
"Server": {
"Confluence": "https://my.confluence.server.com"
}
}
Server
Main configuration node for server.
It is a mandatory field.
Confluence
Define the Confluence server URL to get the pages.
It is a mandatory field.
Pages to export configuration
The Pages to export
node will configure the list of pages to export by space.
It could be one page only or a list of pages.
In Yaml :
Pages to export:
<Space Key 1>: "Page title 1"
<Space Key 2>:
- "Page title 2"
- "Page title 3"
In Json :
{
"Pages to export": {
"<Space Key 1>": "Page title 1",
"<Space Key 2>": [
"Page title 2",
"Page title 3"
]
}
}
Pages to export
Main configuration node for exporter.
It is a mandatory field.
<Space key>
Define the space key that include the pages to export. The value associated
could be a string or a list of string corresponding to the pages title to
export.
It is a mandatory field.
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
File details
Details for the file confluence-exporter-0.1.1.tar.gz
.
File metadata
- Download URL: confluence-exporter-0.1.1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6337c6ee77093f7cdf96743cc6b8cc104f6824ff460dec69977e0ff6764e0703 |
|
MD5 | 5bdc63e5a5f3fc9c176d12846ecaa939 |
|
BLAKE2b-256 | c8c2a8c784d332d6799d83edd85b4dab5e95ed4a451b8eb27e93083a67a33aa0 |
File details
Details for the file confluence_exporter-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: confluence_exporter-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a53f1d764756feb86c5a7c6b8d1f0def36c0439e7f7e778d1678c32aad5e3b19 |
|
MD5 | 5fb733e4802ff7d6b04085e5e5713263 |
|
BLAKE2b-256 | f22897dc4993b7adb6bfb965cd8dd34d69119278b3d2bcbfbe449e4a554838dd |