mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
50ce448667
commit
a8138d6401
150
daemon.py
150
daemon.py
|
@ -278,7 +278,7 @@ from utils import is_editor
|
|||
from utils import is_artist
|
||||
from utils import get_image_extensions
|
||||
from utils import media_file_mime_type
|
||||
from utils import getCSS
|
||||
from utils import get_css
|
||||
from utils import first_paragraph_from_string
|
||||
from utils import clear_from_post_caches
|
||||
from utils import contains_invalid_chars
|
||||
|
@ -1751,7 +1751,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
del self.server.login_failure_count[ipAddress]
|
||||
if is_suspended(base_dir, loginNickname):
|
||||
msg = \
|
||||
htmlSuspended(self.server.cssCache,
|
||||
htmlSuspended(self.server.css_cache,
|
||||
base_dir).encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._login_headers('text/html',
|
||||
|
@ -1907,7 +1907,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
searchHandle = None
|
||||
if searchHandle:
|
||||
msg = \
|
||||
htmlAccountInfo(self.server.cssCache,
|
||||
htmlAccountInfo(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir, http_prefix,
|
||||
nickname,
|
||||
|
@ -1919,7 +1919,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.signing_priv_key_pem)
|
||||
else:
|
||||
msg = \
|
||||
htmlModerationInfo(self.server.cssCache,
|
||||
htmlModerationInfo(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir, http_prefix,
|
||||
nickname)
|
||||
|
@ -2631,7 +2631,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if debug:
|
||||
print('Unblocking ' + optionsActor)
|
||||
msg = \
|
||||
htmlConfirmUnblock(self.server.cssCache,
|
||||
htmlConfirmUnblock(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
usersPath,
|
||||
|
@ -2651,7 +2651,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if debug:
|
||||
print('Following ' + optionsActor)
|
||||
msg = \
|
||||
htmlConfirmFollow(self.server.cssCache,
|
||||
htmlConfirmFollow(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
usersPath,
|
||||
|
@ -2670,7 +2670,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
'&submitLeave=' in optionsConfirmParams:
|
||||
print('Unfollowing ' + optionsActor)
|
||||
msg = \
|
||||
htmlConfirmUnfollow(self.server.cssCache,
|
||||
htmlConfirmUnfollow(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
usersPath,
|
||||
|
@ -2700,7 +2700,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
customSubmitText = get_config_param(base_dir, 'customSubmitText')
|
||||
conversationId = None
|
||||
msg = htmlNewPost(self.server.cssCache,
|
||||
msg = htmlNewPost(self.server.css_cache,
|
||||
False, self.server.translate,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
|
@ -2750,7 +2750,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
print('Showing info for ' + optionsActor)
|
||||
signing_priv_key_pem = self.server.signing_priv_key_pem
|
||||
msg = \
|
||||
htmlAccountInfo(self.server.cssCache,
|
||||
htmlAccountInfo(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
|
@ -2835,7 +2835,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
customSubmitText = get_config_param(base_dir, 'customSubmitText')
|
||||
conversationId = None
|
||||
msg = htmlNewPost(self.server.cssCache,
|
||||
msg = htmlNewPost(self.server.css_cache,
|
||||
False, self.server.translate,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
|
@ -3295,7 +3295,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
nickname = get_nickname_from_actor(actorStr)
|
||||
# hashtag search
|
||||
hashtagStr = \
|
||||
htmlHashtagSearch(self.server.cssCache,
|
||||
htmlHashtagSearch(self.server.css_cache,
|
||||
nickname, domain, port,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -3340,7 +3340,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
searchStr = searchStr.replace('*', '').strip()
|
||||
skillStr = \
|
||||
htmlSkillsSearch(actorStr,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
|
@ -3387,7 +3387,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
nickname = get_nickname_from_actor(actorStr)
|
||||
searchStr = searchStr.replace("'", '', 1).strip()
|
||||
historyStr = \
|
||||
htmlHistorySearch(self.server.cssCache,
|
||||
htmlHistorySearch(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
|
@ -3455,7 +3455,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
nickname = get_nickname_from_actor(actorStr)
|
||||
searchStr = searchStr.replace('-', '', 1).strip()
|
||||
bookmarksStr = \
|
||||
htmlHistorySearch(self.server.cssCache,
|
||||
htmlHistorySearch(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
|
@ -3554,7 +3554,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
twitter_replacement_domain = \
|
||||
self.server.twitter_replacement_domain
|
||||
profileStr = \
|
||||
htmlProfileAfterSearch(self.server.cssCache,
|
||||
htmlProfileAfterSearch(self.server.css_cache,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
|
@ -3606,7 +3606,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
searchStr.replace(' emoji', '')
|
||||
# emoji search
|
||||
emojiStr = \
|
||||
htmlSearchEmoji(self.server.cssCache,
|
||||
htmlSearchEmoji(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
|
@ -3624,7 +3624,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
shared_items_federated_domains = \
|
||||
self.server.shared_items_federated_domains
|
||||
wantedItemsStr = \
|
||||
htmlSearchSharedItems(self.server.cssCache,
|
||||
htmlSearchSharedItems(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
searchStr[1:], pageNumber,
|
||||
|
@ -3647,7 +3647,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
shared_items_federated_domains = \
|
||||
self.server.shared_items_federated_domains
|
||||
sharedItemsStr = \
|
||||
htmlSearchSharedItems(self.server.cssCache,
|
||||
htmlSearchSharedItems(self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir,
|
||||
searchStr, pageNumber,
|
||||
|
@ -7160,7 +7160,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if self.server.keyShortcuts.get(nickname):
|
||||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
msg = htmlPersonOptions(self.server.defaultTimeline,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
self.server.translate,
|
||||
base_dir, domain,
|
||||
domain_full,
|
||||
|
@ -7533,7 +7533,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
hashtag = urllib.parse.unquote_plus(hashtag)
|
||||
if isBlockedHashtag(base_dir, hashtag):
|
||||
print('BLOCK: hashtag #' + hashtag)
|
||||
msg = htmlHashtagBlocked(self.server.cssCache, base_dir,
|
||||
msg = htmlHashtagBlocked(self.server.css_cache, base_dir,
|
||||
self.server.translate).encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._login_headers('text/html', msglen, calling_domain)
|
||||
|
@ -7547,7 +7547,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if '?' in nickname:
|
||||
nickname = nickname.split('?')[0]
|
||||
hashtagStr = \
|
||||
htmlHashtagSearch(self.server.cssCache,
|
||||
htmlHashtagSearch(self.server.css_cache,
|
||||
nickname, domain, port,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -8831,7 +8831,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
return
|
||||
|
||||
msg = \
|
||||
htmlEmojiReactionPicker(self.server.cssCache,
|
||||
htmlEmojiReactionPicker(self.server.css_cache,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
|
@ -9181,7 +9181,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
return
|
||||
|
||||
deleteStr = \
|
||||
htmlConfirmDelete(self.server.cssCache,
|
||||
htmlConfirmDelete(self.server.css_cache,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate, pageNumber,
|
||||
|
@ -9513,7 +9513,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.twitter_replacement_domain
|
||||
peertube_instances = self.server.peertube_instances
|
||||
msg = \
|
||||
htmlPostReplies(self.server.cssCache,
|
||||
htmlPostReplies(self.server.css_cache,
|
||||
recent_posts_cache,
|
||||
max_recent_posts,
|
||||
translate,
|
||||
|
@ -9605,7 +9605,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.twitter_replacement_domain
|
||||
peertube_instances = self.server.peertube_instances
|
||||
msg = \
|
||||
htmlPostReplies(self.server.cssCache,
|
||||
htmlPostReplies(self.server.css_cache,
|
||||
recent_posts_cache,
|
||||
max_recent_posts,
|
||||
translate,
|
||||
|
@ -9710,7 +9710,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlProfile(self.server.signing_priv_key_pem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recent_posts_cache,
|
||||
|
@ -9826,7 +9826,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlProfile(signing_priv_key_pem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recent_posts_cache,
|
||||
|
@ -9996,7 +9996,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
removePostInteractions(pjo, True)
|
||||
if self._requestHTTP():
|
||||
msg = \
|
||||
htmlIndividualPost(self.server.cssCache,
|
||||
htmlIndividualPost(self.server.css_cache,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
|
@ -10247,7 +10247,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
shared_items_federated_domains = \
|
||||
self.server.shared_items_federated_domains
|
||||
msg = htmlInbox(self.server.cssCache,
|
||||
msg = htmlInbox(self.server.css_cache,
|
||||
defaultTimeline,
|
||||
recent_posts_cache,
|
||||
max_recent_posts,
|
||||
|
@ -10400,7 +10400,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
twitter_replacement_domain = \
|
||||
self.server.twitter_replacement_domain
|
||||
msg = \
|
||||
htmlInboxDMs(self.server.cssCache,
|
||||
htmlInboxDMs(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -10545,7 +10545,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
twitter_replacement_domain = \
|
||||
self.server.twitter_replacement_domain
|
||||
msg = \
|
||||
htmlInboxReplies(self.server.cssCache,
|
||||
htmlInboxReplies(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -10686,7 +10686,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.shared_items_federated_domains
|
||||
|
||||
msg = \
|
||||
htmlInboxMedia(self.server.cssCache,
|
||||
htmlInboxMedia(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -10828,7 +10828,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.shared_items_federated_domains
|
||||
|
||||
msg = \
|
||||
htmlInboxBlogs(self.server.cssCache,
|
||||
htmlInboxBlogs(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -10979,7 +10979,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.shared_items_federated_domains
|
||||
|
||||
msg = \
|
||||
htmlInboxNews(self.server.cssCache,
|
||||
htmlInboxNews(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -11131,7 +11131,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
twitter_replacement_domain = \
|
||||
self.server.twitter_replacement_domain
|
||||
msg = \
|
||||
htmlInboxFeatures(self.server.cssCache,
|
||||
htmlInboxFeatures(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -11242,7 +11242,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.full_width_tl_button_header
|
||||
|
||||
msg = \
|
||||
htmlShares(self.server.cssCache,
|
||||
htmlShares(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -11327,7 +11327,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
full_width_tl_button_header = \
|
||||
self.server.full_width_tl_button_header
|
||||
msg = \
|
||||
htmlWanted(self.server.cssCache,
|
||||
htmlWanted(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -11449,7 +11449,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
twitter_replacement_domain = \
|
||||
self.server.twitter_replacement_domain
|
||||
msg = \
|
||||
htmlBookmarks(self.server.cssCache,
|
||||
htmlBookmarks(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -11589,7 +11589,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.keyShortcuts[nickname]
|
||||
|
||||
msg = \
|
||||
htmlOutbox(self.server.cssCache,
|
||||
htmlOutbox(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -11722,7 +11722,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
show_published_date_only = \
|
||||
self.server.show_published_date_only
|
||||
msg = \
|
||||
htmlModeration(self.server.cssCache,
|
||||
htmlModeration(self.server.css_cache,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
|
@ -11852,7 +11852,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlProfile(self.server.signing_priv_key_pem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
|
@ -11973,7 +11973,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlProfile(self.server.signing_priv_key_pem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
|
@ -12092,7 +12092,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlProfile(self.server.signing_priv_key_pem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
|
@ -12228,7 +12228,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
msg = \
|
||||
htmlProfile(self.server.signing_priv_key_pem,
|
||||
self.server.rss_icon_at_top,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
self.server.icons_as_buttons,
|
||||
self.server.defaultTimeline,
|
||||
self.server.recent_posts_cache,
|
||||
|
@ -12502,8 +12502,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
tries = 0
|
||||
while tries < 5:
|
||||
try:
|
||||
css = getCSS(self.server.base_dir, path,
|
||||
self.server.cssCache)
|
||||
css = get_css(self.server.base_dir, path,
|
||||
self.server.css_cache)
|
||||
if css:
|
||||
break
|
||||
except Exception as ex:
|
||||
|
@ -12902,7 +12902,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if '?' in postDay:
|
||||
postDay = postDay.split('?')[0]
|
||||
# show the confirmation screen screen
|
||||
msg = htmlCalendarDeleteConfirm(self.server.cssCache,
|
||||
msg = htmlCalendarDeleteConfirm(self.server.css_cache,
|
||||
translate,
|
||||
base_dir, path,
|
||||
http_prefix,
|
||||
|
@ -12984,7 +12984,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if replyPostFilename:
|
||||
post_json_object = load_json(replyPostFilename)
|
||||
|
||||
msg = htmlNewPost(self.server.cssCache,
|
||||
msg = htmlNewPost(self.server.css_cache,
|
||||
media_instance,
|
||||
translate,
|
||||
base_dir,
|
||||
|
@ -13088,7 +13088,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
|
||||
default_reply_interval_hrs = self.server.default_reply_interval_hrs
|
||||
msg = htmlEditProfile(self.server.cssCache,
|
||||
msg = htmlEditProfile(self.server.css_cache,
|
||||
translate,
|
||||
base_dir,
|
||||
path, domain,
|
||||
|
@ -13129,7 +13129,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if self.server.keyShortcuts.get(nickname):
|
||||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
|
||||
msg = htmlEditLinks(self.server.cssCache,
|
||||
msg = htmlEditLinks(self.server.css_cache,
|
||||
translate,
|
||||
base_dir,
|
||||
path, domain,
|
||||
|
@ -13162,7 +13162,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if self.server.keyShortcuts.get(nickname):
|
||||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
|
||||
msg = htmlEditNewswire(self.server.cssCache,
|
||||
msg = htmlEditNewswire(self.server.css_cache,
|
||||
translate,
|
||||
base_dir,
|
||||
path, domain,
|
||||
|
@ -13200,7 +13200,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
postUrl = local_actor_url(http_prefix, postActor, domain_full) + \
|
||||
'/statuses/' + post_id
|
||||
path = path.split('/editnewspost=')[0]
|
||||
msg = htmlEditNewsPost(self.server.cssCache,
|
||||
msg = htmlEditNewsPost(self.server.css_cache,
|
||||
translate, base_dir,
|
||||
path, domain, port,
|
||||
http_prefix,
|
||||
|
@ -13377,7 +13377,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if self.path == '/logout':
|
||||
if not self.server.news_instance:
|
||||
msg = \
|
||||
htmlLogin(self.server.cssCache,
|
||||
htmlLogin(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
|
@ -14294,7 +14294,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
actor = \
|
||||
self.server.http_prefix + '://' + \
|
||||
self.server.domain_full + usersPath
|
||||
msg = htmlConfirmRemoveSharedItem(self.server.cssCache,
|
||||
msg = htmlConfirmRemoveSharedItem(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
actor, itemID,
|
||||
|
@ -14327,7 +14327,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
actor = \
|
||||
self.server.http_prefix + '://' + \
|
||||
self.server.domain_full + usersPath
|
||||
msg = htmlConfirmRemoveSharedItem(self.server.cssCache,
|
||||
msg = htmlConfirmRemoveSharedItem(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
actor, itemID,
|
||||
|
@ -14359,16 +14359,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if self.path.startswith('/terms'):
|
||||
if calling_domain.endswith('.onion') and \
|
||||
self.server.onion_domain:
|
||||
msg = htmlTermsOfService(self.server.cssCache,
|
||||
msg = htmlTermsOfService(self.server.css_cache,
|
||||
self.server.base_dir, 'http',
|
||||
self.server.onion_domain)
|
||||
elif (calling_domain.endswith('.i2p') and
|
||||
self.server.i2p_domain):
|
||||
msg = htmlTermsOfService(self.server.cssCache,
|
||||
msg = htmlTermsOfService(self.server.css_cache,
|
||||
self.server.base_dir, 'http',
|
||||
self.server.i2p_domain)
|
||||
else:
|
||||
msg = htmlTermsOfService(self.server.cssCache,
|
||||
msg = htmlTermsOfService(self.server.css_cache,
|
||||
self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
self.server.domain_full)
|
||||
|
@ -14395,7 +14395,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if not os.path.isfile(followingFilename):
|
||||
self._404()
|
||||
return
|
||||
msg = htmlFollowingList(self.server.cssCache,
|
||||
msg = htmlFollowingList(self.server.css_cache,
|
||||
self.server.base_dir, followingFilename)
|
||||
msglen = len(msg)
|
||||
self._login_headers('text/html', msglen, calling_domain)
|
||||
|
@ -14412,21 +14412,21 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if self.path.endswith('/about'):
|
||||
if calling_domain.endswith('.onion'):
|
||||
msg = \
|
||||
htmlAbout(self.server.cssCache,
|
||||
htmlAbout(self.server.css_cache,
|
||||
self.server.base_dir, 'http',
|
||||
self.server.onion_domain,
|
||||
None, self.server.translate,
|
||||
self.server.system_language)
|
||||
elif calling_domain.endswith('.i2p'):
|
||||
msg = \
|
||||
htmlAbout(self.server.cssCache,
|
||||
htmlAbout(self.server.css_cache,
|
||||
self.server.base_dir, 'http',
|
||||
self.server.i2p_domain,
|
||||
None, self.server.translate,
|
||||
self.server.system_language)
|
||||
else:
|
||||
msg = \
|
||||
htmlAbout(self.server.cssCache,
|
||||
htmlAbout(self.server.css_cache,
|
||||
self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
self.server.domain_full,
|
||||
|
@ -14454,7 +14454,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.keyShortcuts[nickname]
|
||||
|
||||
msg = \
|
||||
htmlAccessKeys(self.server.cssCache,
|
||||
htmlAccessKeys(self.server.css_cache,
|
||||
self.server.base_dir,
|
||||
nickname, self.server.domain,
|
||||
self.server.translate,
|
||||
|
@ -14481,7 +14481,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
return
|
||||
|
||||
msg = \
|
||||
htmlThemeDesigner(self.server.cssCache,
|
||||
htmlThemeDesigner(self.server.css_cache,
|
||||
self.server.base_dir,
|
||||
nickname, self.server.domain,
|
||||
self.server.translate,
|
||||
|
@ -14932,7 +14932,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
not authorized and
|
||||
not self.server.news_instance)):
|
||||
# request basic auth
|
||||
msg = htmlLogin(self.server.cssCache,
|
||||
msg = htmlLogin(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
|
@ -15001,7 +15001,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
accessKeys = self.server.accessKeys
|
||||
if self.server.keyShortcuts.get(nickname):
|
||||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
msg = htmlNewswireMobile(self.server.cssCache,
|
||||
msg = htmlNewswireMobile(self.server.css_cache,
|
||||
self.server.base_dir,
|
||||
nickname,
|
||||
self.server.domain,
|
||||
|
@ -15045,7 +15045,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
defaultTimeline = self.server.defaultTimeline
|
||||
sharedItemsDomains = \
|
||||
self.server.shared_items_federated_domains
|
||||
msg = htmlLinksMobile(self.server.cssCache,
|
||||
msg = htmlLinksMobile(self.server.css_cache,
|
||||
self.server.base_dir, nickname,
|
||||
self.server.domain_full,
|
||||
self.server.http_prefix,
|
||||
|
@ -15137,7 +15137,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
accessKeys = self.server.keyShortcuts[nickname]
|
||||
|
||||
# show the search screen
|
||||
msg = htmlSearch(self.server.cssCache,
|
||||
msg = htmlSearch(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir, self.path,
|
||||
self.server.domain,
|
||||
|
@ -15157,7 +15157,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
# show a hashtag category from the search screen
|
||||
if htmlGET and '/category/' in self.path:
|
||||
msg = htmlSearchHashtagCategory(self.server.cssCache,
|
||||
msg = htmlSearchHashtagCategory(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir, self.path,
|
||||
self.server.domain,
|
||||
|
@ -15191,7 +15191,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
# show the calendar screen
|
||||
msg = htmlCalendar(self.server.person_cache,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir, self.path,
|
||||
self.server.http_prefix,
|
||||
|
@ -15237,7 +15237,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if htmlGET and usersInPath:
|
||||
if self.path.endswith('/searchemoji'):
|
||||
# show the search screen
|
||||
msg = htmlSearchEmojiTextEntry(self.server.cssCache,
|
||||
msg = htmlSearchEmojiTextEntry(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
self.path).encode('utf-8')
|
||||
|
@ -16130,7 +16130,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
blockDomain = blockDomain.split('?')[0]
|
||||
addGlobalBlock(self.server.base_dir, '*', blockDomain)
|
||||
msg = \
|
||||
htmlAccountInfo(self.server.cssCache,
|
||||
htmlAccountInfo(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
|
@ -16167,7 +16167,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
blockDomain = urllib.parse.unquote_plus(blockDomain.strip())
|
||||
removeGlobalBlock(self.server.base_dir, '*', blockDomain)
|
||||
msg = \
|
||||
htmlAccountInfo(self.server.cssCache,
|
||||
htmlAccountInfo(self.server.css_cache,
|
||||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
|
@ -16689,7 +16689,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.defaultTimeline,
|
||||
self.server.translate,
|
||||
self.server.newswire,
|
||||
self.server.cssCache,
|
||||
self.server.css_cache,
|
||||
fields['subject'],
|
||||
fields['message'],
|
||||
filename, attachmentMediaType,
|
||||
|
@ -18801,7 +18801,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.blockedCacheUpdateSecs)
|
||||
|
||||
# cache to store css files
|
||||
httpd.cssCache = {}
|
||||
httpd.css_cache = {}
|
||||
|
||||
# get the list of custom emoji, for use by the mastodon api
|
||||
httpd.customEmoji = \
|
||||
|
|
16
utils.py
16
utils.py
|
@ -2055,7 +2055,7 @@ def fileLastModified(filename: str) -> str:
|
|||
return modified_time.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
|
||||
def getCSS(base_dir: str, css_filename: str, cssCache: {}) -> str:
|
||||
def get_css(base_dir: str, css_filename: str, css_cache: {}) -> str:
|
||||
"""Retrieves the css for a given file, or from a cache
|
||||
"""
|
||||
# does the css file exist?
|
||||
|
@ -2065,20 +2065,20 @@ def getCSS(base_dir: str, css_filename: str, cssCache: {}) -> str:
|
|||
last_modified = fileLastModified(css_filename)
|
||||
|
||||
# has this already been loaded into the cache?
|
||||
if cssCache.get(css_filename):
|
||||
if cssCache[css_filename][0] == last_modified:
|
||||
if css_cache.get(css_filename):
|
||||
if css_cache[css_filename][0] == last_modified:
|
||||
# file hasn't changed, so return the version in the cache
|
||||
return cssCache[css_filename][1]
|
||||
return css_cache[css_filename][1]
|
||||
|
||||
with open(css_filename, 'r') as fp_css:
|
||||
css = fp_css.read()
|
||||
if cssCache.get(css_filename):
|
||||
if css_cache.get(css_filename):
|
||||
# alter the cache contents
|
||||
cssCache[css_filename][0] = last_modified
|
||||
cssCache[css_filename][1] = css
|
||||
css_cache[css_filename][0] = last_modified
|
||||
css_cache[css_filename][1] = css
|
||||
else:
|
||||
# add entry to the cache
|
||||
cssCache[css_filename] = [last_modified, css]
|
||||
css_cache[css_filename] = [last_modified, css]
|
||||
return css
|
||||
|
||||
return None
|
||||
|
|
|
@ -15,7 +15,7 @@ from webapp_utils import htmlFooter
|
|||
from markdown import markdownToHtml
|
||||
|
||||
|
||||
def htmlAbout(cssCache: {}, base_dir: str, http_prefix: str,
|
||||
def htmlAbout(css_cache: {}, base_dir: str, http_prefix: str,
|
||||
domain_full: str, onion_domain: str, translate: {},
|
||||
system_language: str) -> str:
|
||||
"""Show the about screen
|
||||
|
|
|
@ -39,7 +39,7 @@ def loadAccessKeysForAccounts(base_dir: str, keyShortcuts: {},
|
|||
break
|
||||
|
||||
|
||||
def htmlAccessKeys(cssCache: {}, base_dir: str,
|
||||
def htmlAccessKeys(css_cache: {}, base_dir: str,
|
||||
nickname: str, domain: str,
|
||||
translate: {}, accessKeys: {},
|
||||
defaultAccessKeys: {},
|
||||
|
|
|
@ -31,7 +31,7 @@ from webapp_utils import htmlHideFromScreenReader
|
|||
from webapp_utils import htmlKeyboardNavigation
|
||||
|
||||
|
||||
def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, base_dir: str,
|
||||
def htmlCalendarDeleteConfirm(css_cache: {}, translate: {}, base_dir: str,
|
||||
path: str, http_prefix: str,
|
||||
domain_full: str, post_id: str, postTime: str,
|
||||
year: int, monthNumber: int,
|
||||
|
@ -96,7 +96,7 @@ def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, base_dir: str,
|
|||
return deletePostStr
|
||||
|
||||
|
||||
def _htmlCalendarDay(person_cache: {}, cssCache: {}, translate: {},
|
||||
def _htmlCalendarDay(person_cache: {}, css_cache: {}, translate: {},
|
||||
base_dir: str, path: str,
|
||||
year: int, monthNumber: int, dayNumber: int,
|
||||
nickname: str, domain: str, dayEvents: [],
|
||||
|
@ -245,7 +245,7 @@ def _htmlCalendarDay(person_cache: {}, cssCache: {}, translate: {},
|
|||
return calendarStr
|
||||
|
||||
|
||||
def htmlCalendar(person_cache: {}, cssCache: {}, translate: {},
|
||||
def htmlCalendar(person_cache: {}, css_cache: {}, translate: {},
|
||||
base_dir: str, path: str,
|
||||
http_prefix: str, domain_full: str,
|
||||
text_mode_banner: str, accessKeys: {}) -> str:
|
||||
|
@ -300,7 +300,7 @@ def htmlCalendar(person_cache: {}, cssCache: {}, translate: {},
|
|||
if events:
|
||||
if events.get(str(dayNumber)):
|
||||
dayEvents = events[str(dayNumber)]
|
||||
return _htmlCalendarDay(person_cache, cssCache,
|
||||
return _htmlCalendarDay(person_cache, css_cache,
|
||||
translate, base_dir, path,
|
||||
year, monthNumber, dayNumber,
|
||||
nickname, domain, dayEvents,
|
||||
|
|
|
@ -348,7 +348,7 @@ def getLeftColumnContent(base_dir: str, nickname: str, domain_full: str,
|
|||
return htmlStr
|
||||
|
||||
|
||||
def htmlLinksMobile(cssCache: {}, base_dir: str,
|
||||
def htmlLinksMobile(css_cache: {}, base_dir: str,
|
||||
nickname: str, domain_full: str,
|
||||
http_prefix: str, translate,
|
||||
timelinePath: str, authorized: bool,
|
||||
|
@ -413,7 +413,7 @@ def htmlLinksMobile(cssCache: {}, base_dir: str,
|
|||
return htmlStr
|
||||
|
||||
|
||||
def htmlEditLinks(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||
def htmlEditLinks(css_cache: {}, translate: {}, base_dir: str, path: str,
|
||||
domain: str, port: int, http_prefix: str,
|
||||
defaultTimeline: str, theme: str,
|
||||
accessKeys: {}) -> str:
|
||||
|
|
|
@ -331,7 +331,7 @@ def _htmlNewswire(base_dir: str, newswire: {}, nickname: str, moderator: bool,
|
|||
|
||||
def htmlCitations(base_dir: str, nickname: str, domain: str,
|
||||
http_prefix: str, defaultTimeline: str,
|
||||
translate: {}, newswire: {}, cssCache: {},
|
||||
translate: {}, newswire: {}, css_cache: {},
|
||||
blogTitle: str, blogContent: str,
|
||||
blogImageFilename: str,
|
||||
blogImageAttachmentMediaType: str,
|
||||
|
@ -445,7 +445,7 @@ def htmlCitations(base_dir: str, nickname: str, domain: str,
|
|||
return htmlStr + htmlFooter()
|
||||
|
||||
|
||||
def htmlNewswireMobile(cssCache: {}, base_dir: str, nickname: str,
|
||||
def htmlNewswireMobile(css_cache: {}, base_dir: str, nickname: str,
|
||||
domain: str, domain_full: str,
|
||||
http_prefix: str, translate: {},
|
||||
newswire: {},
|
||||
|
@ -519,7 +519,7 @@ def htmlNewswireMobile(cssCache: {}, base_dir: str, nickname: str,
|
|||
return htmlStr
|
||||
|
||||
|
||||
def htmlEditNewswire(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||
def htmlEditNewswire(css_cache: {}, translate: {}, base_dir: str, path: str,
|
||||
domain: str, port: int, http_prefix: str,
|
||||
defaultTimeline: str, theme: str,
|
||||
accessKeys: {}) -> str:
|
||||
|
@ -641,7 +641,7 @@ def htmlEditNewswire(cssCache: {}, translate: {}, base_dir: str, path: str,
|
|||
return editNewswireForm
|
||||
|
||||
|
||||
def htmlEditNewsPost(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||
def htmlEditNewsPost(css_cache: {}, translate: {}, base_dir: str, path: str,
|
||||
domain: str, port: int,
|
||||
http_prefix: str, postUrl: str,
|
||||
system_language: str) -> str:
|
||||
|
|
|
@ -23,7 +23,7 @@ from webapp_utils import htmlFooter
|
|||
from webapp_post import individualPostAsHtml
|
||||
|
||||
|
||||
def htmlConfirmDelete(cssCache: {},
|
||||
def htmlConfirmDelete(css_cache: {},
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate, pageNumber: int,
|
||||
session, base_dir: str, messageId: str,
|
||||
|
@ -106,7 +106,7 @@ def htmlConfirmDelete(cssCache: {},
|
|||
return deletePostStr
|
||||
|
||||
|
||||
def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, base_dir: str,
|
||||
def htmlConfirmRemoveSharedItem(css_cache: {}, translate: {}, base_dir: str,
|
||||
actor: str, itemID: str,
|
||||
calling_domain: str,
|
||||
sharesFileType: str) -> str:
|
||||
|
@ -174,7 +174,7 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, base_dir: str,
|
|||
return sharesStr
|
||||
|
||||
|
||||
def htmlConfirmFollow(cssCache: {}, translate: {}, base_dir: str,
|
||||
def htmlConfirmFollow(css_cache: {}, translate: {}, base_dir: str,
|
||||
originPathStr: str,
|
||||
followActor: str,
|
||||
followProfileUrl: str) -> str:
|
||||
|
@ -219,7 +219,7 @@ def htmlConfirmFollow(cssCache: {}, translate: {}, base_dir: str,
|
|||
return followStr
|
||||
|
||||
|
||||
def htmlConfirmUnfollow(cssCache: {}, translate: {}, base_dir: str,
|
||||
def htmlConfirmUnfollow(css_cache: {}, translate: {}, base_dir: str,
|
||||
originPathStr: str,
|
||||
followActor: str,
|
||||
followProfileUrl: str) -> str:
|
||||
|
@ -265,7 +265,7 @@ def htmlConfirmUnfollow(cssCache: {}, translate: {}, base_dir: str,
|
|||
return followStr
|
||||
|
||||
|
||||
def htmlConfirmUnblock(cssCache: {}, translate: {}, base_dir: str,
|
||||
def htmlConfirmUnblock(css_cache: {}, translate: {}, base_dir: str,
|
||||
originPathStr: str,
|
||||
blockActor: str,
|
||||
blockProfileUrl: str) -> str:
|
||||
|
|
|
@ -184,7 +184,7 @@ def _htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
|
|||
return dropDownContent
|
||||
|
||||
|
||||
def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
||||
def htmlNewPost(css_cache: {}, media_instance: bool, translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
path: str, inReplyTo: str,
|
||||
mentions: [],
|
||||
|
|
|
@ -95,7 +95,7 @@ def _htmlFrontScreenPosts(recent_posts_cache: {}, max_recent_posts: int,
|
|||
|
||||
def htmlFrontScreen(signing_priv_key_pem: str,
|
||||
rss_icon_at_top: bool,
|
||||
cssCache: {}, icons_as_buttons: bool,
|
||||
css_cache: {}, icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, project_version: str,
|
||||
|
|
|
@ -192,7 +192,7 @@ def htmlHashTagSwarm(base_dir: str, actor: str, translate: {}) -> str:
|
|||
return tagSwarmHtml
|
||||
|
||||
|
||||
def htmlSearchHashtagCategory(cssCache: {}, translate: {},
|
||||
def htmlSearchHashtagCategory(css_cache: {}, translate: {},
|
||||
base_dir: str, path: str, domain: str,
|
||||
theme: str) -> str:
|
||||
"""Show hashtags after selecting a category on the main search screen
|
||||
|
|
|
@ -54,7 +54,7 @@ def htmlGetLoginCredentials(loginParams: str,
|
|||
return nickname, password, register
|
||||
|
||||
|
||||
def htmlLogin(cssCache: {}, translate: {},
|
||||
def htmlLogin(css_cache: {}, translate: {},
|
||||
base_dir: str,
|
||||
http_prefix: str, domain: str,
|
||||
system_language: str,
|
||||
|
|
|
@ -30,7 +30,7 @@ from blocking import isBlocked
|
|||
from session import createSession
|
||||
|
||||
|
||||
def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||
def htmlModeration(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str, wfRequest: {}, person_cache: {},
|
||||
|
@ -59,7 +59,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
This is what you see when selecting the "mod" timeline
|
||||
"""
|
||||
artist = is_artist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -82,7 +82,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
signing_priv_key_pem, cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlAccountInfo(cssCache: {}, translate: {},
|
||||
def htmlAccountInfo(css_cache: {}, translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
nickname: str, domain: str, port: int,
|
||||
searchHandle: str, debug: bool,
|
||||
|
@ -273,7 +273,7 @@ def htmlAccountInfo(cssCache: {}, translate: {},
|
|||
return infoForm
|
||||
|
||||
|
||||
def htmlModerationInfo(cssCache: {}, translate: {},
|
||||
def htmlModerationInfo(css_cache: {}, translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
nickname: str) -> str:
|
||||
msgStr1 = \
|
||||
|
|
|
@ -32,7 +32,7 @@ from webapp_utils import htmlKeyboardNavigation
|
|||
|
||||
|
||||
def htmlPersonOptions(defaultTimeline: str,
|
||||
cssCache: {}, translate: {}, base_dir: str,
|
||||
css_cache: {}, translate: {}, base_dir: str,
|
||||
domain: str, domain_full: str,
|
||||
originPathStr: str,
|
||||
optionsActor: str,
|
||||
|
|
|
@ -1992,7 +1992,7 @@ def individualPostAsHtml(signing_priv_key_pem: str,
|
|||
return postHtml
|
||||
|
||||
|
||||
def htmlIndividualPost(cssCache: {},
|
||||
def htmlIndividualPost(css_cache: {},
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, session, cached_webfingers: {},
|
||||
|
@ -2155,7 +2155,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
return headerStr + postStr + htmlFooter()
|
||||
|
||||
|
||||
def htmlPostReplies(cssCache: {},
|
||||
def htmlPostReplies(css_cache: {},
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, base_dir: str,
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
|
@ -2206,7 +2206,7 @@ def htmlPostReplies(cssCache: {},
|
|||
return headerStr + repliesStr + htmlFooter()
|
||||
|
||||
|
||||
def htmlEmojiReactionPicker(cssCache: {},
|
||||
def htmlEmojiReactionPicker(css_cache: {},
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, session, cached_webfingers: {},
|
||||
|
|
|
@ -121,7 +121,7 @@ def _validProfilePreviewPost(post_json_object: {},
|
|||
return True, post_json_object
|
||||
|
||||
|
||||
def htmlProfileAfterSearch(cssCache: {},
|
||||
def htmlProfileAfterSearch(css_cache: {},
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, path: str, http_prefix: str,
|
||||
|
@ -543,7 +543,7 @@ def _getProfileHeaderAfterSearch(base_dir: str,
|
|||
|
||||
def htmlProfile(signing_priv_key_pem: str,
|
||||
rss_icon_at_top: bool,
|
||||
cssCache: {}, icons_as_buttons: bool,
|
||||
css_cache: {}, icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, project_version: str,
|
||||
|
@ -572,7 +572,7 @@ def htmlProfile(signing_priv_key_pem: str,
|
|||
if is_system_account(nickname):
|
||||
return htmlFrontScreen(signing_priv_key_pem,
|
||||
rss_icon_at_top,
|
||||
cssCache, icons_as_buttons,
|
||||
css_cache, icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, project_version,
|
||||
|
@ -2089,7 +2089,7 @@ def _htmlEditProfileTopBanner(base_dir: str,
|
|||
return editProfileForm
|
||||
|
||||
|
||||
def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||
def htmlEditProfile(css_cache: {}, translate: {}, base_dir: str, path: str,
|
||||
domain: str, port: int, http_prefix: str,
|
||||
defaultTimeline: str, theme: str,
|
||||
peertube_instances: [],
|
||||
|
|
|
@ -42,7 +42,7 @@ from webapp_post import individualPostAsHtml
|
|||
from webapp_hashtagswarm import htmlHashTagSwarm
|
||||
|
||||
|
||||
def htmlSearchEmoji(cssCache: {}, translate: {},
|
||||
def htmlSearchEmoji(css_cache: {}, translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
searchStr: str) -> str:
|
||||
"""Search results for emoji
|
||||
|
@ -217,7 +217,7 @@ def _htmlSharesResult(base_dir: str,
|
|||
return resultsExist, currPage, ctr, sharedItemsForm
|
||||
|
||||
|
||||
def htmlSearchSharedItems(cssCache: {}, translate: {},
|
||||
def htmlSearchSharedItems(css_cache: {}, translate: {},
|
||||
base_dir: str, searchStr: str,
|
||||
pageNumber: int,
|
||||
resultsPerPage: int,
|
||||
|
@ -326,7 +326,7 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
|||
return sharedItemsForm
|
||||
|
||||
|
||||
def htmlSearchEmojiTextEntry(cssCache: {}, translate: {},
|
||||
def htmlSearchEmojiTextEntry(css_cache: {}, translate: {},
|
||||
base_dir: str, path: str) -> str:
|
||||
"""Search for an emoji by name
|
||||
"""
|
||||
|
@ -370,7 +370,7 @@ def htmlSearchEmojiTextEntry(cssCache: {}, translate: {},
|
|||
return emojiStr
|
||||
|
||||
|
||||
def htmlSearch(cssCache: {}, translate: {},
|
||||
def htmlSearch(css_cache: {}, translate: {},
|
||||
base_dir: str, path: str, domain: str,
|
||||
defaultTimeline: str, theme: str,
|
||||
text_mode_banner: str, accessKeys: {}) -> str:
|
||||
|
@ -455,7 +455,7 @@ def htmlSearch(cssCache: {}, translate: {},
|
|||
|
||||
|
||||
def htmlSkillsSearch(actor: str,
|
||||
cssCache: {}, translate: {}, base_dir: str,
|
||||
css_cache: {}, translate: {}, base_dir: str,
|
||||
http_prefix: str,
|
||||
skillsearch: str, instanceOnly: bool,
|
||||
postsPerPage: int) -> str:
|
||||
|
@ -585,7 +585,7 @@ def htmlSkillsSearch(actor: str,
|
|||
return skillSearchForm
|
||||
|
||||
|
||||
def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
||||
def htmlHistorySearch(css_cache: {}, translate: {}, base_dir: str,
|
||||
http_prefix: str,
|
||||
nickname: str, domain: str,
|
||||
historysearch: str,
|
||||
|
@ -702,7 +702,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
|||
return historySearchForm
|
||||
|
||||
|
||||
def htmlHashtagSearch(cssCache: {},
|
||||
def htmlHashtagSearch(css_cache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
|
|
|
@ -13,7 +13,7 @@ from webapp_utils import htmlHeaderWithExternalStyle
|
|||
from webapp_utils import htmlFooter
|
||||
|
||||
|
||||
def htmlSuspended(cssCache: {}, base_dir: str) -> str:
|
||||
def htmlSuspended(css_cache: {}, base_dir: str) -> str:
|
||||
"""Show the screen for suspended accounts
|
||||
"""
|
||||
suspendedForm = ''
|
||||
|
|
|
@ -166,7 +166,7 @@ color_to_hex = {
|
|||
}
|
||||
|
||||
|
||||
def htmlThemeDesigner(cssCache: {}, base_dir: str,
|
||||
def htmlThemeDesigner(css_cache: {}, base_dir: str,
|
||||
nickname: str, domain: str,
|
||||
translate: {}, defaultTimeline: str,
|
||||
theme_name: str, accessKeys: {}) -> str:
|
||||
|
|
|
@ -419,7 +419,7 @@ def _pageNumberButtons(usersPath: str, boxName: str, pageNumber: int) -> str:
|
|||
return '<center>' + numStr + '</center>'
|
||||
|
||||
|
||||
def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||
def htmlTimeline(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int,
|
||||
itemsPerPage: int, session, base_dir: str,
|
||||
|
@ -1119,7 +1119,7 @@ def _htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
|
|||
return timelineStr
|
||||
|
||||
|
||||
def htmlShares(cssCache: {}, defaultTimeline: str,
|
||||
def htmlShares(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1151,7 +1151,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
followerApprovalActive(base_dir, nickname, domain)
|
||||
artist = is_artist(base_dir, nickname)
|
||||
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1177,7 +1177,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlWanted(cssCache: {}, defaultTimeline: str,
|
||||
def htmlWanted(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1209,7 +1209,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
followerApprovalActive(base_dir, nickname, domain)
|
||||
artist = is_artist(base_dir, nickname)
|
||||
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1235,7 +1235,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||
def htmlInbox(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1268,7 +1268,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
followerApprovalActive(base_dir, nickname, domain)
|
||||
artist = is_artist(base_dir, nickname)
|
||||
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1294,7 +1294,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||
def htmlBookmarks(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1327,7 +1327,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
followerApprovalActive(base_dir, nickname, domain)
|
||||
artist = is_artist(base_dir, nickname)
|
||||
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1352,7 +1352,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||
def htmlInboxDMs(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1382,7 +1382,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
"""Show the DM timeline as html
|
||||
"""
|
||||
artist = is_artist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1406,7 +1406,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||
def htmlInboxReplies(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1436,7 +1436,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
"""Show the replies timeline as html
|
||||
"""
|
||||
artist = is_artist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1459,7 +1459,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||
def htmlInboxMedia(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1489,7 +1489,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
"""Show the media timeline as html
|
||||
"""
|
||||
artist = is_artist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1512,7 +1512,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||
def htmlInboxBlogs(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1542,7 +1542,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
"""Show the blogs timeline as html
|
||||
"""
|
||||
artist = is_artist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1565,7 +1565,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||
def htmlInboxFeatures(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1595,7 +1595,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists: {}, lists_enabled: str) -> str:
|
||||
"""Show the features timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1618,7 +1618,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||
def htmlInboxNews(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1647,7 +1647,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists: {}, lists_enabled: str) -> str:
|
||||
"""Show the news timeline as html
|
||||
"""
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
@ -1670,7 +1670,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
cw_lists, lists_enabled)
|
||||
|
||||
|
||||
def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||
def htmlOutbox(css_cache: {}, defaultTimeline: str,
|
||||
recent_posts_cache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
|
@ -1702,7 +1702,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
manuallyApproveFollowers = \
|
||||
followerApprovalActive(base_dir, nickname, domain)
|
||||
artist = is_artist(base_dir, nickname)
|
||||
return htmlTimeline(cssCache, defaultTimeline,
|
||||
return htmlTimeline(css_cache, defaultTimeline,
|
||||
recent_posts_cache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
|
|
|
@ -16,7 +16,7 @@ from webapp_utils import htmlFooter
|
|||
from markdown import markdownToHtml
|
||||
|
||||
|
||||
def htmlTermsOfService(cssCache: {}, base_dir: str,
|
||||
def htmlTermsOfService(css_cache: {}, base_dir: str,
|
||||
http_prefix: str, domain_full: str) -> str:
|
||||
"""Show the terms of service screen
|
||||
"""
|
||||
|
|
|
@ -40,7 +40,7 @@ def getBrokenLinkSubstitute() -> str:
|
|||
"/icons/avatar_default.png'\""
|
||||
|
||||
|
||||
def htmlFollowingList(cssCache: {}, base_dir: str,
|
||||
def htmlFollowingList(css_cache: {}, base_dir: str,
|
||||
followingFilename: str) -> str:
|
||||
"""Returns a list of handles being followed
|
||||
"""
|
||||
|
@ -67,7 +67,7 @@ def htmlFollowingList(cssCache: {}, base_dir: str,
|
|||
return ''
|
||||
|
||||
|
||||
def htmlHashtagBlocked(cssCache: {}, base_dir: str, translate: {}) -> str:
|
||||
def htmlHashtagBlocked(css_cache: {}, base_dir: str, translate: {}) -> str:
|
||||
"""Show the screen for a blocked hashtag
|
||||
"""
|
||||
blockedHashtagForm = ''
|
||||
|
|
Loading…
Reference in New Issue