Script that updates Confluence articles from files written locally
Project description
Description
Supplementary script for writing confluence wiki articles in vim. Uses information from the config to post the article content to confluence.
Usage:
$ confluence_poster [OPTIONS] COMMAND [ARGS]...
General Options:
--version
: Show version and exit--config PATH
: The file containing configuration. If not specified - config.toml from the same directory is used [default: config.toml]--page-title TEXT
: Override page title from config. Applicable if there is only one page.--parent-page-title TEXT
: Provide a parent title to search for. Applicable if there is only one page.--password TEXT
: Supply the password in command line. [env var: CONFLUENCE_PASSWORD]--force
: Force overwrite the pages. Skips all checks for different author of the updated page. To set for individual pages you can specify field 'force_overwrite' in config--force-create
: Disable prompts to create pages. Script could still prompt for a parent page.--minor-edit
: Do not notify watchers of pages updates. Not enabled by default.--report
: Print report at the end of the run. Not enabled by default.--debug
: Enable debug logging. Not enabled by default.--install-completion
: Install completion for the current shell.--show-completion
: Show completion for the current shell, to copy it or customize the installation.--help
: Show this message and exit.
These options can be specified for any COMMAND
except for create-config
which ignores these options.
Commands:
create-config
: Runs configuration wizard.post-page
: Posts the content of the pages.validate
: Validates the provided settings.
Commands
confluence_poster post-page
Posts the content of the pages.
Usage:
$ confluence_poster post-page [OPTIONS] [FILES]...
Options:
--upload-files
: Upload list of files--version-comment TEXT
: Provider version comment.--help
: Show this message and exit.
confluence_poster validate
Validates the provided settings. If 'online' is true - tries to fetch the space from the config using the supplied credentials.
Usage:
$ confluence_poster validate [OPTIONS]
Options:
--online
: Test the provided authentication settings on the actual instance of confluence.--help
: Show this message and exit.
confluence_poster create-config
Runs configuration wizard. The wizard guides through setting up values for config.
Options:
--local-only
: Create config only in the local folder [default: False]--home-only
: Create config only in the $XDG_CONFIG_HOME [default: False]--help
: Show this message and exit.
Installation
Install the project from PyPI:
$ pip install confluence-poster
To start using confluence_poster
either create the config manually or run confluence_poster create-config
to start
configuration wizard which will guide you through the configuration.
Config format
By default the confluence_poster tries to look for config file config.toml
in the directory where it is invoked and in
XDG_CONFIG_HOME. The config format is as follows:
# If the page was not updated by the username specified here, throw an error.
# If this setting is omitted - username from auth section is used for checks.
author = "author_username"
[pages]
[pages.default]
# Space key. E.g. for space "local-dev" the space key is "LOC"
# Space defined here will be used if a page section below does not specify it
page_space = "DEFAULT_SPACE_KEY"
[pages.page1]
# The title of the page
page_title = "Some page title"
# The filename with page content
page_file = "some_file.confluencewiki"
# If specified - overrides the default page_space
page_space = "some_space_key"
# If specified as "true" - username check is always skipped for this page
force_overwrite = false
# If specified - the page will be created without looking for a parent under specified parent
page_parent_title = "Parent page title"
[pages.page2]
page_title = "Some other page title"
page_file = "some_other_file.confluencewiki"
[auth]
# URL of confluence instance
confluence_url = "https://confluence.local"
# Username for authentication
username = "confluence_username"
# Password may also be supplied through --password option or from an environment variable CONFLUENCE_PASSWORD
password = "confluence_password"
# Whether the confluence instance is a "cloud" one
is_cloud = false
Note on password and Cloud instances: if confluence is hosted by Atlassian, the password is the API token. Follow instructions at this link.
Contrib directory
There are shell completions for bash and zsh as well as a sample of git post-commit hook.
See also
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for confluence_poster-1.3.0-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f431235614141f9e2162b27673502cb8029de871eda7bfe96be6b807dbd0136 |
|
MD5 | b966b8a9132d64c5a82c52feff825796 |
|
BLAKE2b-256 | d3e95442a6fc4df29a708a58267dc36a26f29c2c9b2e51ed04c00db12a0130fc |
Hashes for confluence_poster-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4156113a2ce0282c37207fd3e6b946e27342f6d8f67b6683fd2a9b4b9d48d21b |
|
MD5 | 58946b0a52d997113fdb56b860c4c718 |
|
BLAKE2b-256 | baf3e9168f463870f68db8f8e7bd7f369b0e212cd0427725fead027be5447b61 |