From a77383bf9633491ebe7dcbb7237c6628ca15ee5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20G=C3=BCne=C5=9F?= Date: Sun, 14 Oct 2018 02:16:47 +0300 Subject: [PATCH] Add bullets and indentation to show output, #21 --- redmine/journal.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/redmine/journal.py b/redmine/journal.py index 2d0f72f..8d5b48d 100644 --- a/redmine/journal.py +++ b/redmine/journal.py @@ -36,14 +36,14 @@ def get_header(self): created_on = datetime.strptime(self.created_on, "%Y-%m-%dT%H:%M:%SZ") created_on = created_on.strftime("%Y-%m-%d %H:%M") - return f"\n{created_on} {self.user['name']}\n\n" + return f"\n• {created_on} {self.user['name']}\n\n" def get_notes(self): notes = "" for note in self.notes.splitlines(): for n in wrap(note, width=79): - notes += f"{n}\n" + notes += f"\t{n}\n" return notes @@ -72,12 +72,12 @@ def get_details(self): detail["old_value"] = self.users[detail["old_value"]] detail["new_value"] = self.users[detail["new_value"]] - update_detail += f"{prefix} changed from " \ + update_detail += f"\t‣ {prefix} changed from " \ f"{detail['old_value']} to " \ f"{detail['new_value']}\n" elif detail.get("new_value"): - update_detail += f"{prefix} set to {detail['new_value']}\n" + update_detail += f"\t‣ {prefix} set to {detail['new_value']}\n" else: - update_detail += f"{prefix} deleted {detail['old_value']}\n" + update_detail += f"\t‣ {prefix} deleted {detail['old_value']}\n" return update_detail