Compare commits

...

6 Commits

Author SHA1 Message Date
jeancf
6cd4057f9f Pedantism 2022-12-01 10:42:43 +01:00
jeancf
62073f5d2a Improved INFO messages 2022-12-01 10:33:30 +01:00
jeancf
314ca28202 Adjusted logging level 2022-12-01 10:30:10 +01:00
jeancf
a6b30d3037 Typos 2022-12-01 10:27:59 +01:00
jeancf
de6e44be18 Almost there. logging to INFO 2022-12-01 10:20:42 +01:00
jeancf
143be70608 Added missing info line 2022-12-01 10:14:42 +01:00

View File

@ -40,7 +40,7 @@ MAX_REC_COUNT = 50
# Set the desired verbosity of logging # Set the desired verbosity of logging
# One of logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL # One of logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL
LOGGING_LEVEL = logging.DEBUG LOGGING_LEVEL = logging.INFO
# How many seconds to wait before giving up on a download (except video download) # How many seconds to wait before giving up on a download (except video download)
HTTPS_REQ_TIMEOUT = 10 HTTPS_REQ_TIMEOUT = 10
@ -577,21 +577,23 @@ def main(argv):
) )
logging.info('Running with the following configuration:') logging.info('Running with the following configuration:')
logging.info(' Config file : ' + str(args['f'])) logging.info(' Config File : ' + str(args['f']))
logging.info(' twitter_account : ' + TOML['config']['twitter_account']) logging.info(' twitter_account : ' + TOML['config']['twitter_account'])
logging.info(' mastodon_instance : ' + TOML['config']['mastodon_instance']) logging.info(' mastodon_instance : ' + TOML['config']['mastodon_instance'])
logging.info(' mastodon_user : ' + TOML['config']['mastodon_user']) logging.info(' mastodon_user : ' + TOML['config']['mastodon_user'])
logging.info(' upload_videos : ' + str(TOML['options']['upload_videos']))
logging.info(' post_reply_to : ' + str(TOML['options']['post_reply_to'])) logging.info(' post_reply_to : ' + str(TOML['options']['post_reply_to']))
logging.info(' skip_retweets : ' + str(TOML['options']['skip_retweets'])) logging.info(' skip_retweets : ' + str(TOML['options']['skip_retweets']))
logging.info(' remove_link_redirections : ' + str(TOML['options']['remove_link_redirections'])) logging.info(' remove_link_redirections : ' + str(TOML['options']['remove_link_redirections']))
logging.info(' remove_trackers_from_urls: ' + str(TOML['options']['remove_trackers_from_urls'])) logging.info(' remove_trackers_from_urls: ' + str(TOML['options']['remove_trackers_from_urls']))
logging.info(' upload_videos : ' + str(TOML['options']['upload_videos'])) logging.info(' footer : ' + TOML['options']['footer'])
logging.info(' remove_original_tweet_ref: ' + str(TOML['options']['remove_original_tweet_ref']))
logging.info(' tweet_max_age : ' + str(TOML['options']['tweet_max_age'])) logging.info(' tweet_max_age : ' + str(TOML['options']['tweet_max_age']))
logging.info(' tweet_delay : ' + str(TOML['options']['tweet_delay'])) logging.info(' tweet_delay : ' + str(TOML['options']['tweet_delay']))
logging.info(' toot_cap : ' + str(TOML['options']['toot_cap'])) logging.info(' toot_cap : ' + str(TOML['options']['toot_cap']))
logging.info(' twitter substitution : ' + str(TOML['options']['subst_twitter'])) logging.info(' subst_twitter : ' + str(TOML['options']['subst_twitter']))
logging.info(' youtube substitution : ' + str(TOML['options']['subst_youtube'])) logging.info(' subst_twitter : ' + str(TOML['options']['subst_youtube']))
logging.info(' reddit substitution : ' + str(TOML['options']['subst_reddit'])) logging.info(' subst_twitter : ' + str(TOML['options']['subst_reddit']))
# Try to open database. If it does not exist, create it # Try to open database. If it does not exist, create it
sql = sqlite3.connect('twoot.db') sql = sqlite3.connect('twoot.db')
@ -646,7 +648,7 @@ def main(argv):
twit_account_page.status_code) + '). Aborting') twit_account_page.status_code) + '). Aborting')
exit(-1) exit(-1)
logging.info('Nitter page downloaded successfully from ' + url) logging.debug('Nitter page downloaded successfully from ' + url)
# DEBUG: Save page to file # DEBUG: Save page to file
# of = open(toml['config']['twitter_account'] + '.html', 'w') # of = open(toml['config']['twitter_account'] + '.html', 'w')