From 0fd73c56adbeb4a040de1ff2dad1b36e50c41425 Mon Sep 17 00:00:00 2001 From: Johannes Garm Nielsen Date: Fri, 2 Nov 2018 14:51:26 +0100 Subject: initial commit --- wipeDocs.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 wipeDocs.py (limited to 'wipeDocs.py') diff --git a/wipeDocs.py b/wipeDocs.py new file mode 100644 index 0000000..390f167 --- /dev/null +++ b/wipeDocs.py @@ -0,0 +1,21 @@ +import pprint, json +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] + +pages = confluence.get_all_pages_from_space(spaceName) + +# jsonPages = json.loads(pages) + +for page in pages: + print(pp.pprint(page)) + resp = confluence.remove_page(page['id']) + print(pp.pprint(resp)) \ No newline at end of file -- cgit v1.1