From cbbe8812bdaa1418eaf0059cd9a59cdf693b45be Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 25 Dec 2021 19:39:45 +0000 Subject: [PATCH] Snake case --- daemon.py | 4 ++-- epicyon.py | 14 +++++++------- newsdaemon.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/daemon.py b/daemon.py index 16c599b86..c77b6ca5e 100644 --- a/daemon.py +++ b/daemon.py @@ -18438,7 +18438,7 @@ def runDaemon(content_license_url: str, full_width_tl_button_header: bool, show_publish_as_icon: bool, max_followers: int, - maxNewsPosts: int, + max_news_posts: int, maxMirroredArticles: int, maxNewswireFeedSizeKb: int, max_newswire_postsPerSource: int, @@ -18650,7 +18650,7 @@ def runDaemon(content_license_url: str, httpd.maxMirroredArticles = maxMirroredArticles # maximum number of posts in the news timeline/outbox - httpd.maxNewsPosts = maxNewsPosts + httpd.max_news_posts = max_news_posts # The maximum number of tags per post which can be # attached to RSS feeds pulled in via the newswire diff --git a/epicyon.py b/epicyon.py index 162c1fe06..0610f5a4a 100644 --- a/epicyon.py +++ b/epicyon.py @@ -209,8 +209,8 @@ parser.add_argument('--maxMirroredArticles', default=100, help='Maximum number of news articles to mirror.' + ' Set to zero for indefinite mirroring.') -parser.add_argument('--maxNewsPosts', - dest='maxNewsPosts', type=int, +parser.add_argument('--max_news_posts', + dest='max_news_posts', type=int, default=0, help='Maximum number of news timeline posts to keep. ' + 'Zero for no expiry.') @@ -3048,10 +3048,10 @@ maxMirroredArticles = \ if maxMirroredArticles is not None: args.maxMirroredArticles = int(maxMirroredArticles) -maxNewsPosts = \ - getConfigParam(base_dir, 'maxNewsPosts') -if maxNewsPosts is not None: - args.maxNewsPosts = int(maxNewsPosts) +max_news_posts = \ + getConfigParam(base_dir, 'max_news_posts') +if max_news_posts is not None: + args.max_news_posts = int(max_news_posts) max_followers = \ getConfigParam(base_dir, 'max_followers') @@ -3233,7 +3233,7 @@ if __name__ == "__main__": args.full_width_tl_button_header, args.show_publish_as_icon, args.max_followers, - args.maxNewsPosts, + args.max_news_posts, args.maxMirroredArticles, args.maxNewswireFeedSizeKb, args.max_newswire_postsPerSource, diff --git a/newsdaemon.py b/newsdaemon.py index e6253cc78..7c3fcf322 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -840,7 +840,7 @@ def runNewswireDaemon(base_dir: str, httpd, httpd.content_license_url) print('Newswire feed converted to ActivityPub') - if httpd.maxNewsPosts > 0: + if httpd.max_news_posts > 0: archiveDir = base_dir + '/archive' archiveSubdir = \ archiveDir + '/accounts/news@' + domain + '/outbox' @@ -849,7 +849,7 @@ def runNewswireDaemon(base_dir: str, httpd, domain, base_dir, 'outbox', archiveSubdir, httpd.recentPostsCache, - httpd.maxNewsPosts) + httpd.max_news_posts) # wait a while before the next feeds update for tick in range(120):