From 0ab49c28d4ecd9ccf02db34c72d4f9d3cded3395 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 15 Mar 2021 18:25:49 +0000 Subject: [PATCH] Truncation --- notifications_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notifications_client.py b/notifications_client.py index fbc854508..bfedd25db 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -457,14 +457,14 @@ def _showLocalBox(notifyJson: {}, boxName: str, name = '' while len(name) < 16: name += ' ' - name = (name[:16]) if len(name) > 16 else name + name = (name[:16]) if len(name) >= 16 else name content = speakerJson['content'] while len(content) < 40: content += ' ' if speakerJson.get('detectedLinks'): if len(speakerJson['detectedLinks']) > 0: content = '🔗' + content - content = (content[:40]) if len(content) > 40 else content + content = (content[:40]) if len(content) >= 40 else content print(indent + str(posStr) + ' | ' + str(name) + ' | ' + str(published) + ' | ' + str(content) + ' |') ctr += 1