Snake case

merge-requests/30/head
Bob Mottram 2021-12-25 19:34:20 +00:00
parent 13e87f91b6
commit a08044f4c9
6 changed files with 65 additions and 65 deletions

View File

@ -2232,9 +2232,9 @@ class PubServer(BaseHTTPRequestHandler):
self.server.publish_button_at_top = False
if 'newswire-publish-icon' in themeDesignerParams:
if themeDesignerParams['newswire-publish-icon'].lower() == 'true':
self.server.showPublishAsIcon = True
self.server.show_publish_as_icon = True
else:
self.server.showPublishAsIcon = False
self.server.show_publish_as_icon = False
if 'icons-as-buttons' in themeDesignerParams:
if themeDesignerParams['icons-as-buttons'].lower() == 'true':
self.server.icons_as_buttons = True
@ -5015,9 +5015,9 @@ class PubServer(BaseHTTPRequestHandler):
getTextModeBanner(self.server.base_dir)
self.server.iconsCache = {}
self.server.fontsCache = {}
self.server.showPublishAsIcon = \
self.server.show_publish_as_icon = \
getConfigParam(self.server.base_dir,
'showPublishAsIcon')
'show_publish_as_icon')
self.server.full_width_tl_button_header = \
getConfigParam(self.server.base_dir,
'full_width_tl_button_header')
@ -5955,9 +5955,9 @@ class PubServer(BaseHTTPRequestHandler):
getTextModeBanner(base_dir)
self.server.iconsCache = {}
self.server.fontsCache = {}
self.server.showPublishAsIcon = \
self.server.show_publish_as_icon = \
getConfigParam(base_dir,
'showPublishAsIcon')
'show_publish_as_icon')
self.server.full_width_tl_button_header = \
getConfigParam(base_dir,
'fullWidthTimeline' +
@ -10247,7 +10247,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -10398,7 +10398,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -10541,7 +10541,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -10682,7 +10682,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -10824,7 +10824,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -10976,7 +10976,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.newswire,
moderator, editor, artist,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -11125,7 +11125,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -11234,7 +11234,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -11319,7 +11319,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -11441,7 +11441,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -11579,7 +11579,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -11711,7 +11711,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.showPublishedDateOnly,
self.server.newswire,
self.server.positiveVoting,
self.server.showPublishAsIcon,
self.server.show_publish_as_icon,
full_width_tl_button_header,
self.server.icons_as_buttons,
self.server.rss_icon_at_top,
@ -14960,7 +14960,7 @@ class PubServer(BaseHTTPRequestHandler):
return
timelinePath = \
'/users/' + nickname + '/' + self.server.defaultTimeline
showPublishAsIcon = self.server.showPublishAsIcon
show_publish_as_icon = self.server.show_publish_as_icon
rss_icon_at_top = self.server.rss_icon_at_top
icons_as_buttons = self.server.icons_as_buttons
defaultTimeline = self.server.defaultTimeline
@ -14977,7 +14977,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.newswire,
self.server.positiveVoting,
timelinePath,
showPublishAsIcon,
show_publish_as_icon,
authorized,
rss_icon_at_top,
icons_as_buttons,
@ -18436,7 +18436,7 @@ def runDaemon(content_license_url: str,
rss_icon_at_top: bool,
icons_as_buttons: bool,
full_width_tl_button_header: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
maxFollowers: int,
maxNewsPosts: int,
maxMirroredArticles: int,
@ -18661,7 +18661,7 @@ def runDaemon(content_license_url: str,
# whether to show an icon for publish on the
# newswire, or a 'Publish' button
httpd.showPublishAsIcon = showPublishAsIcon
httpd.show_publish_as_icon = show_publish_as_icon
# Whether to show the timeline header containing inbox, outbox
# calendar, etc as the full width of the screen or not

View File

@ -324,8 +324,8 @@ parser.add_argument("--repliesEnabled", "--commentsEnabled",
type=str2bool, nargs='?',
const=True, default=True,
help="Enable replies to a post")
parser.add_argument("--showPublishAsIcon",
dest='showPublishAsIcon',
parser.add_argument("--show_publish_as_icon",
dest='show_publish_as_icon',
type=str2bool, nargs='?',
const=True, default=True,
help="Whether to show newswire publish " +
@ -3078,10 +3078,10 @@ max_like_count = \
if max_like_count is not None:
args.max_like_count = int(max_like_count)
showPublishAsIcon = \
getConfigParam(base_dir, 'showPublishAsIcon')
if showPublishAsIcon is not None:
args.showPublishAsIcon = bool(showPublishAsIcon)
show_publish_as_icon = \
getConfigParam(base_dir, 'show_publish_as_icon')
if show_publish_as_icon is not None:
args.show_publish_as_icon = bool(show_publish_as_icon)
icons_as_buttons = \
getConfigParam(base_dir, 'icons_as_buttons')
@ -3231,7 +3231,7 @@ if __name__ == "__main__":
args.rss_icon_at_top,
args.icons_as_buttons,
args.full_width_tl_button_header,
args.showPublishAsIcon,
args.show_publish_as_icon,
args.maxFollowers,
args.maxNewsPosts,
args.maxMirroredArticles,

View File

@ -183,7 +183,7 @@ def _setNewswirePublishAsIcon(base_dir: str, useIcon: bool) -> bool:
configJson = loadJson(configFilename, 0)
if not configJson:
return False
configJson['showPublishAsIcon'] = useIcon
configJson['show_publish_as_icon'] = useIcon
return saveJson(configJson, configFilename)

View File

@ -53,7 +53,7 @@ def getRightColumnContent(base_dir: str, nickname: str, domainFull: str,
newswire: {}, positiveVoting: bool,
showBackButton: bool, timelinePath: str,
showPublishButton: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
rss_icon_at_top: bool,
publish_button_at_top: bool,
authorized: bool,
@ -124,7 +124,7 @@ def getRightColumnContent(base_dir: str, nickname: str, domainFull: str,
translate['Go Back'] + '</button></a>\n'
if showPublishButton and not publish_button_at_top:
if not showPublishAsIcon:
if not show_publish_as_icon:
htmlStr += publishButtonStr
# show the edit icon
@ -172,7 +172,7 @@ def getRightColumnContent(base_dir: str, nickname: str, domainFull: str,
# show publish icon at top
if showPublishButton:
if showPublishAsIcon:
if show_publish_as_icon:
titleStr = translate['Publish a blog article']
if defaultTimeline == 'tlfeatures':
titleStr = translate['Publish a news article']
@ -450,7 +450,7 @@ def htmlNewswireMobile(cssCache: {}, base_dir: str, nickname: str,
newswire: {},
positiveVoting: bool,
timelinePath: str,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
authorized: bool,
rss_icon_at_top: bool,
icons_as_buttons: bool,
@ -503,7 +503,7 @@ def htmlNewswireMobile(cssCache: {}, base_dir: str, nickname: str,
moderator, editor,
newswire, positiveVoting,
False, timelinePath, showPublishButton,
showPublishAsIcon, rss_icon_at_top, False,
show_publish_as_icon, rss_icon_at_top, False,
authorized, False, theme,
defaultTimeline, accessKeys)
if editor and not newswire:

View File

@ -41,7 +41,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -71,7 +71,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist, positiveVoting,
showPublishAsIcon,
show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,

View File

@ -360,7 +360,7 @@ def _htmlTimelineEnd(base_dir: str, nickname: str, domainFull: str,
http_prefix: str, translate: {},
moderator: bool, editor: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
rss_icon_at_top: bool, publish_button_at_top: bool,
authorized: bool, theme: str,
defaultTimeline: str, accessKeys: {},
@ -380,7 +380,7 @@ def _htmlTimelineEnd(base_dir: str, nickname: str, domainFull: str,
moderator, editor,
newswire, positiveVoting,
False, None, True,
showPublishAsIcon,
show_publish_as_icon,
rss_icon_at_top,
publish_button_at_top,
authorized, True, theme,
@ -434,7 +434,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
newswire: {}, moderator: bool,
editor: bool, artist: bool,
positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -792,7 +792,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
http_prefix, translate,
moderator, editor,
newswire, positiveVoting,
showPublishAsIcon,
show_publish_as_icon,
rss_icon_at_top, publish_button_at_top,
authorized, theme,
defaultTimeline, accessKeys,
@ -810,7 +810,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
http_prefix, translate,
moderator, editor,
newswire, positiveVoting,
showPublishAsIcon,
show_publish_as_icon,
rss_icon_at_top, publish_button_at_top,
authorized, theme,
defaultTimeline, accessKeys,
@ -958,7 +958,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
http_prefix, translate,
moderator, editor,
newswire, positiveVoting,
showPublishAsIcon,
show_publish_as_icon,
rss_icon_at_top, publish_button_at_top,
authorized, theme,
defaultTimeline, accessKeys,
@ -1130,7 +1130,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1164,7 +1164,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1188,7 +1188,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1222,7 +1222,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1247,7 +1247,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1281,7 +1281,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1306,7 +1306,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1340,7 +1340,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1364,7 +1364,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1392,7 +1392,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist, positiveVoting,
showPublishAsIcon,
show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1416,7 +1416,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1445,7 +1445,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1469,7 +1469,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1498,7 +1498,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1522,7 +1522,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1551,7 +1551,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1575,7 +1575,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1604,7 +1604,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, False,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1628,7 +1628,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, moderator: bool, editor: bool, artist: bool,
positiveVoting: bool, showPublishAsIcon: bool,
positiveVoting: bool, show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1656,7 +1656,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, moderator, editor, artist,
positiveVoting, showPublishAsIcon,
positiveVoting, show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,
@ -1680,7 +1680,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain: str,
showPublishedDateOnly: bool,
newswire: {}, positiveVoting: bool,
showPublishAsIcon: bool,
show_publish_as_icon: bool,
full_width_tl_button_header: bool,
icons_as_buttons: bool,
rss_icon_at_top: bool,
@ -1711,7 +1711,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
twitterReplacementDomain,
showPublishedDateOnly,
newswire, False, False, artist, positiveVoting,
showPublishAsIcon,
show_publish_as_icon,
full_width_tl_button_header,
icons_as_buttons, rss_icon_at_top,
publish_button_at_top,