From 9bdac8a8fd370e288831174f11469d1a0adf7def Mon Sep 17 00:00:00 2001 From: David Leutgeb Date: Tue, 17 Aug 2021 22:14:50 +0200 Subject: [PATCH] formatting python script --- src/bookstackCreate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bookstackCreate.py b/src/bookstackCreate.py index b159a8d..83af019 100644 --- a/src/bookstackCreate.py +++ b/src/bookstackCreate.py @@ -5,20 +5,20 @@ import json bookstack_url = "https://wiki.bookstack.local" # Bookstack Base URL header = {'Authorization': 'Token <>:<>'} # API Token -verify_ssl = True # Set to False if you have a selfsigned certificate +verify_ssl = True # Set to False if you have a selfsigned certificate # create the structure of the book chapters = { "Chapter 1": { "Page 1": "No content yet", - }, + }, "Chapter 2": { "Page 1": "No content yet", "Page 2": "No content yet", "Page 3": "No content yet", "Page 4": "No content yet", - }, + }, } # Initialize variables @@ -43,7 +43,7 @@ for chapter in chapters: chapter_create = requests.post(chapter_create_url, data={"book_id": book_data_loads['id'], "name": chapter}, headers=header, verify=verify_ssl) chapter_data = json.dumps(chapter_create.json(), separators=(',', ':')) chapter_data_loads = json.loads(chapter_data) - + for sites in chapters[chapter]: # Create pages print("Create page " + sites)