Snake case

main
Bob Mottram 2021-12-25 19:39:45 +00:00
parent 438f06aea9
commit cbbe8812bd
3 changed files with 11 additions and 11 deletions

View File

@ -18438,7 +18438,7 @@ def runDaemon(content_license_url: str,
full_width_tl_button_header: bool, full_width_tl_button_header: bool,
show_publish_as_icon: bool, show_publish_as_icon: bool,
max_followers: int, max_followers: int,
maxNewsPosts: int, max_news_posts: int,
maxMirroredArticles: int, maxMirroredArticles: int,
maxNewswireFeedSizeKb: int, maxNewswireFeedSizeKb: int,
max_newswire_postsPerSource: int, max_newswire_postsPerSource: int,
@ -18650,7 +18650,7 @@ def runDaemon(content_license_url: str,
httpd.maxMirroredArticles = maxMirroredArticles httpd.maxMirroredArticles = maxMirroredArticles
# maximum number of posts in the news timeline/outbox # 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 # The maximum number of tags per post which can be
# attached to RSS feeds pulled in via the newswire # attached to RSS feeds pulled in via the newswire

View File

@ -209,8 +209,8 @@ parser.add_argument('--maxMirroredArticles',
default=100, default=100,
help='Maximum number of news articles to mirror.' + help='Maximum number of news articles to mirror.' +
' Set to zero for indefinite mirroring.') ' Set to zero for indefinite mirroring.')
parser.add_argument('--maxNewsPosts', parser.add_argument('--max_news_posts',
dest='maxNewsPosts', type=int, dest='max_news_posts', type=int,
default=0, default=0,
help='Maximum number of news timeline posts to keep. ' + help='Maximum number of news timeline posts to keep. ' +
'Zero for no expiry.') 'Zero for no expiry.')
@ -3048,10 +3048,10 @@ maxMirroredArticles = \
if maxMirroredArticles is not None: if maxMirroredArticles is not None:
args.maxMirroredArticles = int(maxMirroredArticles) args.maxMirroredArticles = int(maxMirroredArticles)
maxNewsPosts = \ max_news_posts = \
getConfigParam(base_dir, 'maxNewsPosts') getConfigParam(base_dir, 'max_news_posts')
if maxNewsPosts is not None: if max_news_posts is not None:
args.maxNewsPosts = int(maxNewsPosts) args.max_news_posts = int(max_news_posts)
max_followers = \ max_followers = \
getConfigParam(base_dir, 'max_followers') getConfigParam(base_dir, 'max_followers')
@ -3233,7 +3233,7 @@ if __name__ == "__main__":
args.full_width_tl_button_header, args.full_width_tl_button_header,
args.show_publish_as_icon, args.show_publish_as_icon,
args.max_followers, args.max_followers,
args.maxNewsPosts, args.max_news_posts,
args.maxMirroredArticles, args.maxMirroredArticles,
args.maxNewswireFeedSizeKb, args.maxNewswireFeedSizeKb,
args.max_newswire_postsPerSource, args.max_newswire_postsPerSource,

View File

@ -840,7 +840,7 @@ def runNewswireDaemon(base_dir: str, httpd,
httpd.content_license_url) httpd.content_license_url)
print('Newswire feed converted to ActivityPub') print('Newswire feed converted to ActivityPub')
if httpd.maxNewsPosts > 0: if httpd.max_news_posts > 0:
archiveDir = base_dir + '/archive' archiveDir = base_dir + '/archive'
archiveSubdir = \ archiveSubdir = \
archiveDir + '/accounts/news@' + domain + '/outbox' archiveDir + '/accounts/news@' + domain + '/outbox'
@ -849,7 +849,7 @@ def runNewswireDaemon(base_dir: str, httpd,
domain, base_dir, 'outbox', domain, base_dir, 'outbox',
archiveSubdir, archiveSubdir,
httpd.recentPostsCache, httpd.recentPostsCache,
httpd.maxNewsPosts) httpd.max_news_posts)
# wait a while before the next feeds update # wait a while before the next feeds update
for tick in range(120): for tick in range(120):