From 850374b9d64a7d530dac6644f7361fbeaec47ba7 Mon Sep 17 00:00:00 2001 From: cquest Date: Fri, 24 Jan 2025 14:57:09 +0100 Subject: [PATCH] use summary in addition to title --- tootbot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tootbot.py b/tootbot.py index 49ea3e0..f234b00 100755 --- a/tootbot.py +++ b/tootbot.py @@ -256,6 +256,14 @@ if source[:4] == 'http': # remove ellipsis c = c.replace('\xa0…', ' ') + if ('marianne' in mastodon) and 'summary' in t: + c = c + '\n\n' + t.summary + if len(c)>450: + fin = c[450:].split(' ') + c = c[:450] + fin[0] + if len(fin)>1: + c = c + '…' + if 'authors' in t: c = c + '\nSource: ' + t.authors[0].name c = c + '\n\n' + t.link