If post > 280 first tweet must be almost 280 characters

This commit is contained in:
spla 2021-09-15 12:27:09 +02:00
pare e098fac88c
commit f6b59b4de8

Veure arxiu

@ -167,11 +167,12 @@ if __name__ == '__main__':
if publish == 1:
toot_text = str(title)+'\n'
toot_text += str(link)
toot_text = cleanhtml(toot_text)
toot_text = unescape(toot_text)
toot_text += '\n' + str(link) + '\n'
print("Tooting...")
print(toot_text)
@ -191,8 +192,8 @@ if __name__ == '__main__':
else:
toot_text1 = toot_text[:int(len(toot_text)/2)].rsplit(' ', 1)[0]
toot_text2 = toot_text[int(len(toot_text1)):]
toot_text1 = toot_text[:275].rsplit(' ', 1)[0] + ' (1/2)'
toot_text2 = toot_text[int(len(toot_text1)-6):] + ' (2/2)'
try: