From 6a5dd85774defb10dbd22525eb657d273e5713ea Mon Sep 17 00:00:00 2001 From: spla Date: Fri, 17 Sep 2021 13:04:53 +0200 Subject: [PATCH] some cosmetics --- mastotuit.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/mastotuit.py b/mastotuit.py index fdd2fe7..978bda1 100644 --- a/mastotuit.py +++ b/mastotuit.py @@ -113,7 +113,7 @@ if __name__ == '__main__': api_key, api_key_secret, access_token, access_token_secret = twitter_config() - publish = 0 + publish = False logged_in = False try: @@ -146,9 +146,7 @@ if __name__ == '__main__': row = cur.fetchone() if row == None: - publish = 1 - else: - publish = 0 + publish = True cur.close() @@ -163,14 +161,14 @@ if __name__ == '__main__': conn.close() ########################################################### - if publish == 1: + if publish: - toot_text = str(title)+'\n' + toot_text = f'{title}\n' toot_text = cleanhtml(toot_text) toot_text = unescape(toot_text) - toot_text += ' ' + str(link) + toot_text = f'{toot_text} {link}' print("Tooting...") print(toot_text)