|
|
@@ -247,7 +247,7 @@ for p in reversed(s.entries): |
|
|
|
print('Dryrun: not fetching ', pic, ' and not uploading it to mastodon') |
|
|
|
|
|
|
|
poster = p.title.split(']')[0].strip('[') |
|
|
|
poster_text = "\n\nvia %s on soup.io" % poster |
|
|
|
poster_text = "\n(via %s on soup.io)" % poster |
|
|
|
# remove all html stuff - python module in use only supports markdown, not pure plaintext |
|
|
|
textsrc = h.handle(p.summary_detail.value.replace("<small>", "<br><small>")) |
|
|
|
# free text from lines without visible characters |
|
|
@@ -269,11 +269,10 @@ for p in reversed(s.entries): |
|
|
|
maximumlegth = 500 - 1 - len(poster_text) - len(source) - 50 # 50 ... just in case (if they also count attachement url and so on) |
|
|
|
text = (text[:maximumlegth] + '…') if len(text) > maximumlegth else text |
|
|
|
|
|
|
|
# add poster |
|
|
|
text += poster_text |
|
|
|
|
|
|
|
# add source |
|
|
|
text += source |
|
|
|
# add soup poster |
|
|
|
text += poster_text |
|
|
|
|
|
|
|
print(text) |
|
|
|
|
|
|
|