• This repository has been archived on 25/May/2020
  • Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    Python
  • Created over 11 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple python script for interaction with a Atlassian Confluence Wiki

Confluence.py

Simple python script to use a Atlassian Confluence Wiki via the CLI.

Usage

$ python confluence.py --help                                                                                         
usage: confluence.py [-h] -w WIKIURL -u USERNAME -p PASSWORD
                     {addpage,updatepage,listpages,removepage,getpagecontent,getpagesummary,listspaces,addspace,removespace,adduser,removeuser,deactivateuser,reactivateuser,changeuserpassword,addgroup,removegroup,listgroups,listusers,getallpages,addusertogroup,removeusergromgroup,listusergroups}
                     ...

Confluence wiki API

positional arguments:
  {addpage,updatepage,listpages,removepage,getpagecontent,getpagesummary,listspaces,addspace,removespace,adduser,removeuser,deactivateuser,reactivateuser,changeuserpassword,addgroup,removegroup,listgroups,listusers,getallpages,addusertogroup,removeusergromgroup,listusergroups}
    addpage             Add a page
    updatepage          Update a page
    listpages           List pages in one or all spaces
    removepage          Remove a page
    getpagecontent      Get page content
    getpagesummary      Get page summary
    listspaces          List all spaces
    addspace            Add a space
    removespace         Remove a space
    adduser             Add a user
    removeuser          Remove a user
    deactivateuser      Deactivate a user
    reactivateuser      Reactivate a user
    changeuserpassword  Change user password
    addgroup            Add a goup
    removegroup         Remove a goup
    listgroups          List all goup
    listusers           List all users
    getallpages         Save all pages to local files.
    addusertogroup      Add user to a group
    removeusergromgroup
                        Remove user from a group
    listusergroups      List groups user is in

optional arguments:
  -h, --help            show this help message and exit
  -w WIKIURL, --wikiurl WIKIURL
                        Wiki URL (only FQDN, no / and such)
  -u USERNAME, --username USERNAME
                        Login Username
  -p PASSWORD, --password PASSWORD
                        Login Password

Examples

Add page:

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" addpage -f ./content.txt -n "CLI New Page" -s "RAY"
http://wiki.raymii.org/display/RAY/CLI+New+Page

Remove Page:

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" removepage -n "CLI New Page" -s "RAY"

Update Page:

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" updatepage -f ./content.txt -n "CLI New Page" -s "RAY"
http://wiki.raymii.org/display/RAY/CLI+New+Page

Get page content (HTML):

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" getpagecontent -n "CLI New Page" -s "RAY"
<h1>Table of Contents</h1>
<p><ac:macro ac:name="toc" /></p>
<h1>Information</h1>

Add Space:

./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" addspace -n "New Space" -s "NS"

Remove Space:

./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" removespace -s "NS"

List all spaces:

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" listspaces
NS, New Space, http://wiki.raymii.org/display/NS
ITS, IT Staff, http://wiki.raymii.org/display/ITS

Add user:

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" adduser -U "newuser" -N "New user" -E "[email protected]" -X "password"

Remove user:

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" removeuser -U newuser

Deactivate user:

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" deactivateuser -U newuser

Reactivate user:

$ ./confluence.py --wikiurl="http://wiki.raymii.org" -u "api" -p "" reactivateuser -U newuser

For more actions, run ./confluence.py -h or see the usage section above.

More info

Raymii.org

More Repositories

1

bash-http-monitoring

HTTP(s) monitoring webpage via shell script
Shell
573
star
2

ssl-decoder

Simple PHP script which decodes an SSL connection and displays the information.
PHP
449
star
3

certificate-expiry-monitor

https://certificatemonitor.org
PHP
432
star
4

NoPriv

NoPriv.py is a python script to backup any IMAP capable email account to a HTML archive, nicely browsable, instead of weird folders (Maildir), one huge file (mbox), only needing a web browser to view (thunderbird) and no propritary code, so you can make sure I don't steal your password.
Python
344
star
5

cipherli.st

Ciplerli.st - strong ciphers for NGINX, Apache and Lighttpd
HTML
315
star
6

ansible

My ansible playbooks
PHP
175
star
7

simple-nagios-dashboard

Simple PHP 5 Nagios Dashboard.
PHP
57
star
8

to-text.py

Convert URL or RSS feed to text with readability
Python
49
star
9

ansible-vmware

Simple python script which uses PySphere to fill the Ansible inventory from VMWare vCenter.
Python
45
star
10

CertInfo

Which Root Certificates should you trust?
C++
42
star
11

openssl-modern-cpp

Examples showing OpenSSL C API usage with Modern C++ (smart pointers, RAII)
C++
39
star
12

cpp-qr-to-png

A bridge between two great libraries, QR-Code-Generator and Tiny-PNG-Out.
C++
31
star
13

boa-diminish-restricted-shell

A shell where you whitelist commands and only those commands can be executed. Either via ssh, as an interactive shell or launched with commands. Logs everything and escapes "dangerous" characters.
Python
24
star
14

nagios

My Nagios scripts and configs
Shell
20
star
15

restrict_ssh

This bash script restricts ssh to a set of commands via .ssh/authorized_keys
Shell
18
star
16

cpp-command-output

Execute commands and get exit status and stdout
C++
16
star
17

c_ookieclicker

c++ console cookie clicker (linux)
C++
15
star
18

raymiiorg.github.io

Raymii.org
HTML
14
star
19

librenms-api-alerts

Python script to talk to LibreNMS API and get alerts and hosts
Python
9
star
20

securecrt-arch-linux

VanDyke SecureCRT PKGBUILD for Arch Linux
Shell
9
star
21

qml-cpp-integration-example

QML
7
star
22

ScreenSaverStopper

Stop system from going to screensaver by sending F24 keystroke every 40 seconds.
C++
7
star
23

nutsmanager

Power/Water/Gas overview manager written in PHP/JSON
JavaScript
6
star
24

openstack-nova-snapshot

Easy OpenStack Nova snapshots from inside instances
Shell
5
star
25

rasplayer-fm

https://raymii.org/s/articles/Raspberry_Pi_FM_Radio_With_Buttons.html
C
5
star
26

ponify.nl

Lock your workstation or spread the Pony love!
Shell
4
star
27

browsa

Little Python script which browses random websites, to make it harder for spying entities to extract data points and signals from monitoring.
Python
4
star
28

log_vcs

Ansible callback plugin that creates a VCS branch every time you run Ansible. If you ever need to go back to a certain state or environment, check out that branch and be sure nothing has changed.
Python
4
star
29

lobsters-hn-post-compare

Hacker News vs Lobste.rs in C++, an exercise in parsing json http api's and date/time/timezones
C++
4
star
30

apt-update-mailer

This is a bash script which can be ran from a cronjob. It mails which packages can be updated, the current version you have installed, the version you are updating to and an URL to the Ubuntu package archive with more info on the update.
Shell
4
star
31

marktplaats-parser-with-filter

Marktplaats parser with filters
Python
3
star
32

CloudVPS-Boss

https://www.cloudvps.nl/blog/cloudvps-boss-linux-backup-naar-object-store
Shell
3
star
33

munin-plugins

My Munin Plugins, who doens't like nice graphs?
Shell
3
star
34

bind-gnuplot-reports

A very simple script which uses GNUplot to create graphs of Bind Query logs.
3
star
35

hash-check-mail

check-file.py - Python script to monitor a file for changes and then mail the report with the file attached.
Python
3
star
36

qt-http-get-request-qml-cpp

Example Qt code showing HTTP get request in C++ and Qml
C++
3
star
37

ansible-openstack-horizon-dashboard

Installs Horizon on Ubuntu
2
star
38

ckermit-snap

Snap package of Ubuntu 18.04's version of ckermit, because 20.04 repo doesn't have ckermit
Shell
2
star
39

QtQrcSourceCodeToDisk

Embed the source code directly in your application
C++
2
star
40

pygopherdstats

Simple log analyzer for pygopherd. Fun if you have a gopherhole and want statistics.
Shell
2
star
41

qml-responsive-layout-example

QML
2
star
42

WeatherTerminalPart1

QML
1
star
43

Win10KDESplashScreen

Windows 10 KDE Splash Screen
QML
1
star
44

qml_cpp_signal_example

QML
1
star
45

YouLessQt

Helpt de YouLess energiemeter goed op de analoge (draaischijf) meter plakken
QML
1
star
46

openscad

OpenSCAD
1
star
47

cookienumberprinter

C++ class to print idle / incremental style numbers.
C++
1
star