Script that updates Confluence articles from files written locally
Project description
Description
Supplementary script for writing confluence wiki articles in vim. Uses information from config.toml to post the article content to confluence.
Usage:
$ confluence_poster [OPTIONS] COMMAND [ARGS]...
General Options:
--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. Applicable if the author is different.--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
.
Commands:
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]
Options:
--upload-files PATH
: Files to upload as attachments to page.--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.
Installation
Currently the project is installable through
$ pip install confluence-poster
Config format
By default the confluence_poster tries to look for config file config.toml
in the directory where it is invoked. The 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"
[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.1.0-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fcfeffe20b2ebb9988454d433f4db1c224313c03b927f3695d9dba7455ba6ee |
|
MD5 | 583bd79d6319c491436df3b810a23e28 |
|
BLAKE2b-256 | 991a0fefaf0bc7d222b7f393dcb8c9ff48c518a14094f91e1adcc431ce71a876 |
Hashes for confluence_poster-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35c9ac42ffa3431272d74dad32eb53baf0f5f6f225c39bca2265605f3f8d19a7 |
|
MD5 | df3f95aaec944a0a51deb81aa7a9058e |
|
BLAKE2b-256 | e2675c9f16b4c01f080649dd1a2615da8f469b3b38a2fc4cff5dc4702e21a104 |