From e8eb69428427e8fac9ba5994d54e6a495f184330 Mon Sep 17 00:00:00 2001 From: Fotoente Date: Tue, 29 Mar 2022 11:36:02 +0200 Subject: [PATCH] Won't post if there is no note or the only note is a MiCECo one --- miceco.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/miceco.py b/miceco.py index b6d978c..3d5f05f 100644 --- a/miceco.py +++ b/miceco.py @@ -150,6 +150,16 @@ while True: else: break +if len(noeList) == =: + print("Nothing to count, exiting script.") + sys.exit(1) + +if len(noteList) == 1: + if noteList[0]["text"].find(chr(8203) + chr(8203) + chr(8203)) > 0: + print("Only note is MiCECo note.") + print("Nothing to count, exiting script") + sys.exit(1) + for element in noteList: if element["text"] is None: # Skip Notes without text print("Skip Note " + element["id"] + " without Text\nTime noted: " + element["createdAt"])