Giter Club home page Giter Club logo

doputconfluence's Introduction

putConfluence

Setup

  1. Add Basic Authentification information to your putConfluence.conf file
  2. Ready!

Usage Examples

./putConfluence.py get SPLUNK cisas.conf
./putConfluence.py -c ./putConfluence.conf get SPLUNK cisas.conf
./putConfluence.py put -p "Konfigurierte Logfiles" SPLUNK cisas.conf cisas.html
cat cisas.html | ./putConfluence.py put -p "Konfigurierte Logfiles" SPLUNK cisas.conf
./putConfluence.py put -p "Konfigurierte Logfiles" SPLUNK cisas.conf < cisas.html

where

  • SPLUNK is the Space
  • cisas.conf is the name of the page
  • cisas.html is the file with the desired content
  • putconfluence.conf is a valid configuration file of format seen in next chapter

Configuration File Specification sofar

# The auth stanza contains login information of the technical user
[auth]
username=<username>
password=<password>

# The request stanza contains information on how the connection should be built
[request]
truststore=<path to truststore>
# If a valid path to a truststore was set, the ssl connection to the Confluence
# webserver will be verified. If no truststore was set, the connection will not
# be verified. This is the standard behaviour.

# The confluence stanza contains connection information for confluence
[confluence]
restapi=https://confluence.example.com/rest/api/content

Daily Update

Make a Cronjob like this:

0 6 * * * /opt/splunk/bin/doPutConfluence.sh -c

The script doPutConfluence.sh may be found in the src directory of this repository.

Known Issues

  • Special Characters can't be sent by POST or PUT
  • Error occurs when updating a page without -p option, when it was created with -p option
  • Can't use -x option in conjunction with STDIN file

References

Confluence REST API & Examples

Python ArgParse

Python File Object

Python Configuration Parser

Python Requests

JSON Formatter

doputconfluence's People

Contributors

muryoutaisuu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.