A CLI tool to automate common Confluence maintenance tasks and content publishing.
The confluencer
command line tool (or cfr
for short) allows you to
control your Confluence installation from a shell prompt, and thus automate
(mass) content changes and reports.
For example, cfr tidy
applies rules to remove artifacts from a page's body
left behind if you cut© content from other sources (especially FosWiki pages).
The confluencer.api
Python package can be used in your own scripts to implement
more complex custom use-cases that are not covered by the provided commands.
It provides helpers like converting an URL as found in the web interface (i.e.
your browser's location bar) into an API one, and abstractions for typical
Confluence objects like pages and spaces.
Confluencer can be installed via pip install confluencer
as usual,
see releases for an overview of available versions.
To get a bleeding-edge version from source, use these commands:
repo="1and1/confluencer"
pip install -r "https://raw.githubusercontent.com/$repo/master/requirements.txt"
pip install -U -e "git+https://github.com/$repo.git#egg=${repo#*/}"
See Contributing on how to create a full development environment.
To add bash completion, read the Click docs about it, or just follow these instructions:
cmdname=confluencer
mkdir -p ~/.bash_completion.d
( export _$(tr a-z- A-Z_ <<<"$cmdname")_COMPLETE=source ; \
$cmdname >~/.bash_completion.d/$cmdname.sh )
grep /.bash_completion.d/$cmdname.sh ~/.bash_completion >/dev/null \
|| echo >>~/.bash_completion ". ~/.bash_completion.d/$cmdname.sh"
. "/etc/bash_completion"
See the main documentation at Read the Docs.
Contributing to this project is easy, and reporting an issue or adding to the documentation also improves things for every user. You don’t need to be a developer to contribute. See CONTRIBUTING for more.
As a documentation author or developer, to create a working directory for this project, call these commands:
git clone "https://github.com/1and1/confluencer.git"
cd "confluencer"
. .env --yes --develop
invoke build --docs test check
You might also need to follow some setup procedures to make the necessary basic commands available on Linux, Mac OS X, and Windows.
Tools
Packages
- Conflence.py – A 1:1 mapping of the REST API to a command line tool.
- PythonConfluenceAPI - A Pythonic API wrapper over the Confluence REST API.
- pyconfluence – PyConfluence is designed for automated documentation, with convenience in mind and easy interaction with the numerous services Confluence offers.
- rst2confluence – Convert reStructuredText to Confluence style wiki markup.
…