Truncation

merge-requests/21/head
Bob Mottram 2021-03-15 18:47:14 +00:00
parent 8c591ee55e
commit 1f65c33f60
1 changed files with 10 additions and 6 deletions

View File

@ -455,14 +455,18 @@ def _showLocalBox(notifyJson: {}, boxName: str,
name = speakerJson['name']
else:
name = ''
name = (name[:14]) if len(name) > 14 else name
if len(name) > 16:
name = name[:16]
else:
while len(name) < 16:
name += ' '
content = speakerJson['content']
if speakerJson.get('detectedLinks'):
if len(speakerJson['detectedLinks']) > 0:
content = '🔗' + content
content = (content[:38]) if len(content) > 38 else content
if len(content) > 40:
content = content[:40]
else:
while len(content) < 40:
content += ' '
print(indent + str(posStr) + ' | ' + name + ' | ' +