change generated text trimming fix 1

This commit is contained in:
Łukasz Jędyk 2022-01-31 23:31:11 +01:00
parent 2b1f3405a0
commit 7a2f9f832d

View File

@ -68,9 +68,9 @@ def add_twitter_account():
dot_index = trimmed_text.rfind(".")
space_index = trimmed_text.rfind(" ")
if dot_index > 0:
tweet_text = trimmed_text[:dot_index]
tweet_text = trimmed_text[:dot_index].capitalize()
else:
tweet_text = trimmed_text[:space_index]
tweet_text = trimmed_text[:space_index].capitalize()
# create post on twitter
oauth = OAuth1Session(