Truncation

merge-requests/21/head
Bob Mottram 2021-03-15 18:27:53 +00:00
parent 0ab49c28d4
commit 62b90a4633
1 changed files with 2 additions and 2 deletions

View File

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