Skip to content

Commit 07634fa

Browse files
Gonchik TsymzhitovGonchik Tsymzhitov
authored andcommitted
Confluence: update examples
1 parent 34b0ff7 commit 07634fa

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/confluence-draft-page-cleaner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def clean_draft_pages_from_space(confluence, space_key, count, date_now):
2727
last_date = datetime.datetime.strptime(last_date_string.replace(".000", "")[:-6], "%Y-%m-%dT%H:%M:%S")
2828
if (date_now - last_date) > datetime.timedelta(days=DRAFT_DAYS):
2929
count += 1
30-
print("Removed page with date {}".format(last_date_string))
30+
print("Removing page with page id: " + page_id)
31+
confluence.remove_page_as_draft(page_id=page_id)
32+
print("Removed page with date " + last_date_string)
3133
return count
3234

3335

examples/confluence-trash-cleaner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ def clean_pages_from_space(confluence, space_key, limit=500):
2424
flag = False
2525
print("For space {} trash is empty".format(space_key))
2626
else:
27+
print("Founded in space {} pages as trashed {}".format(space_key, len(values)))
2728
for value in values:
28-
print(value['title'])
29+
print("Removing page with title: " + value['title'])
2930
confluence.remove_page_from_trash(value['id'])
3031

3132

0 commit comments

Comments
 (0)