From e6caa303dc7d11895645c7c1dd6881cb486f11dc Mon Sep 17 00:00:00 2001 From: mail Date: Sat, 27 Jan 2018 10:01:43 +0100 Subject: [PATCH] Added project logo, fixed a spelling error. --- config.py-template | 2 +- tweet.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.py-template b/config.py-template index 811b3a6..b0e0719 100644 --- a/config.py-template +++ b/config.py-template @@ -9,7 +9,7 @@ conf_twitter_msg_preamble = "#feinstaub" conf_twitter_tag_bot = "bot" conf_twitter_user_id = 'my-account' conf_limit_pm_10_0 = 40 -conf_quit_period_in_hours = 6 +conf_quiet_period_in_hours = 6 # tweeter diff --git a/tweet.py b/tweet.py index 8c9baba..aabf19a 100644 --- a/tweet.py +++ b/tweet.py @@ -76,11 +76,11 @@ def has_bot_marker(timeline_item): def may_tweet_again(): - reference_timestamp = datetime.datetime.now() - datetime.timedelta(hours=conf_quit_period_in_hours) + reference_timestamp = datetime.datetime.now() - datetime.timedelta(hours=conf_quiet_period_in_hours) tweet_ts = [item.created_at for item in last_bot_tweets()] allowed = len(tweet_ts) == 0 or max(tweet_ts) < reference_timestamp - print("Quit period NOT exceeded", allowed) + print("may_tweet_again reference={}, tweets_ts{} -> {}".format( reference_timestamp, [str(item) for item in tweet_ts], allowed)) return allowed