summaryrefslogtreecommitdiff
path: root/wipeDocs.py
diff options
context:
space:
mode:
Diffstat (limited to 'wipeDocs.py')
-rw-r--r--wipeDocs.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/wipeDocs.py b/wipeDocs.py
index 390f167..11e04de 100644
--- a/wipeDocs.py
+++ b/wipeDocs.py
@@ -1,19 +1,18 @@
-import pprint, json
+import pprint, json, yaml, sys
from atlassian import Confluence
-from base64 import b64encode
pp = pprint.PrettyPrinter(indent=2)
-confluence = Confluence(
- url='http://localhost:8090',
- username='apiuser',
- password='apiuserpass')
-
-spaceName = sys.argv[1]
+configuration = yaml.load(open("pythonDocUpload.yml", "r").read())
-pages = confluence.get_all_pages_from_space(spaceName)
+confluence = Confluence(
+ url=configuration.get('confluenceUrl'),
+ username=configuration.get('confluenceUser'),
+ password=configuration.get('confluencePass'))
-# jsonPages = json.loads(pages)
+pages = confluence.get_all_pages_from_space(configuration.get('spaceName'))
+if (len(sys.argv) > 0 && sys.argv[1] != "force"):
+ input("You are about to wipe everything in the space " + configuration.get('spaceName') + " - press Enter to continue.")
for page in pages:
print(pp.pprint(page))