Don't show link for epicyon instances if none are known

main
Bob Mottram 2024-11-16 18:50:04 +00:00
parent ccdfbd2059
commit 6c693fa39e
11 changed files with 166 additions and 67 deletions

View File

@ -340,9 +340,10 @@ def daemon_http_get(self) -> None:
ua_str = get_user_agent(self) ua_str = get_user_agent(self)
if 'Epicyon/' in ua_str: if ua_str:
log_epicyon_instances(self.server.base_dir, calling_domain, if 'Epicyon/' in ua_str:
self.server.known_epicyon_instances) log_epicyon_instances(self.server.base_dir, calling_domain,
self.server.known_epicyon_instances)
if not _permitted_crawler_path(self.path): if not _permitted_crawler_path(self.path):
block, self.server.blocked_cache_last_updated, llm = \ block, self.server.blocked_cache_last_updated, llm = \
@ -2968,6 +2969,7 @@ def daemon_http_get(self) -> None:
default_timeline = self.server.default_timeline default_timeline = self.server.default_timeline
shared_items_domains = \ shared_items_domains = \
self.server.shared_items_federated_domains self.server.shared_items_federated_domains
known_instances = self.server.known_epicyon_instances
msg = \ msg = \
html_links_mobile(self.server.base_dir, nickname, html_links_mobile(self.server.base_dir, nickname,
self.server.domain_full, self.server.domain_full,
@ -2980,7 +2982,8 @@ def daemon_http_get(self) -> None:
default_timeline, default_timeline,
self.server.theme_name, self.server.theme_name,
access_keys, access_keys,
shared_items_domains).encode('utf-8') shared_items_domains,
known_instances).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, cookie, calling_domain, set_headers(self, 'text/html', msglen, cookie, calling_domain,
False) False)

View File

@ -126,6 +126,8 @@ def show_shares_feed(self, authorized: bool,
bold_reading = False bold_reading = False
if bold_reading_nicknames.get(nickname): if bold_reading_nicknames.get(nickname):
bold_reading = True bold_reading = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_profile(signing_priv_key_pem, html_profile(signing_priv_key_pem,
rss_icon_at_top, rss_icon_at_top,
@ -166,7 +168,8 @@ def show_shares_feed(self, authorized: bool,
max_shares_on_profile, max_shares_on_profile,
sites_unavailable, sites_unavailable,
no_of_books, no_of_books,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -310,6 +313,8 @@ def show_following_feed(self, authorized: bool,
bold_reading = True bold_reading = True
if not authorized and hide_follows.get(nickname): if not authorized and hide_follows.get(nickname):
following = {} following = {}
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_profile(signing_priv_key_pem, html_profile(signing_priv_key_pem,
@ -352,7 +357,8 @@ def show_following_feed(self, authorized: bool,
max_shares_on_profile, max_shares_on_profile,
sites_unavailable, sites_unavailable,
no_of_books, no_of_books,
auto_cw_cache).encode('utf-8') auto_cw_cache,
known_epicyon_instances).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', set_headers(self, 'text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -497,6 +503,9 @@ def show_moved_feed(self, authorized: bool,
if bold_reading_nicknames.get(nickname): if bold_reading_nicknames.get(nickname):
bold_reading = True bold_reading = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_profile(signing_priv_key_pem, html_profile(signing_priv_key_pem,
rss_icon_at_top, rss_icon_at_top,
@ -538,7 +547,8 @@ def show_moved_feed(self, authorized: bool,
max_shares_on_profile, max_shares_on_profile,
sites_unavailable, sites_unavailable,
no_of_books, no_of_books,
auto_cw_cache).encode('utf-8') auto_cw_cache,
known_epicyon_instances).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', set_headers(self, 'text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -677,6 +687,8 @@ def show_inactive_feed(self, authorized: bool,
bold_reading = False bold_reading = False
if bold_reading_nicknames.get(nickname): if bold_reading_nicknames.get(nickname):
bold_reading = True bold_reading = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_profile(signing_priv_key_pem, html_profile(signing_priv_key_pem,
rss_icon_at_top, rss_icon_at_top,
@ -718,7 +730,8 @@ def show_inactive_feed(self, authorized: bool,
max_shares_on_profile, max_shares_on_profile,
sites_unavailable, sites_unavailable,
no_of_books, no_of_books,
auto_cw_cache).encode('utf-8') auto_cw_cache,
known_epicyon_instances).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', set_headers(self, 'text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -859,6 +872,8 @@ def show_followers_feed(self, authorized: bool,
bold_reading = False bold_reading = False
if bold_reading_nicknames.get(nickname): if bold_reading_nicknames.get(nickname):
bold_reading = True bold_reading = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_profile(signing_priv_key_pem, html_profile(signing_priv_key_pem,
rss_icon_at_top, rss_icon_at_top,
@ -901,7 +916,8 @@ def show_followers_feed(self, authorized: bool,
max_shares_on_profile, max_shares_on_profile,
sites_unavailable, sites_unavailable,
no_of_books, no_of_books,
auto_cw_cache).encode('utf-8') auto_cw_cache,
known_epicyon_instances).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
cookie, calling_domain, False) cookie, calling_domain, False)

View File

@ -110,6 +110,8 @@ def show_person_profile(self, authorized: bool,
bold_reading = False bold_reading = False
if bold_reading_nicknames.get(nickname): if bold_reading_nicknames.get(nickname):
bold_reading = True bold_reading = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_profile(signing_priv_key_pem, html_profile(signing_priv_key_pem,
rss_icon_at_top, rss_icon_at_top,
@ -147,7 +149,8 @@ def show_person_profile(self, authorized: bool,
max_shares_on_profile, max_shares_on_profile,
sites_unavailable, sites_unavailable,
no_of_books, no_of_books,
auto_cw_cache).encode('utf-8') auto_cw_cache,
known_epicyon_instances).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
cookie, calling_domain, False) cookie, calling_domain, False)
@ -265,6 +268,8 @@ def show_roles(self, calling_domain: str, referer_domain: str,
bold_reading = False bold_reading = False
if bold_reading_nicknames.get(nickname): if bold_reading_nicknames.get(nickname):
bold_reading = True bold_reading = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_profile(signing_priv_key_pem, html_profile(signing_priv_key_pem,
rss_icon_at_top, rss_icon_at_top,
@ -302,7 +307,8 @@ def show_roles(self, calling_domain: str, referer_domain: str,
max_shares_on_profile, max_shares_on_profile,
sites_unavailable, sites_unavailable,
no_of_books, no_of_books,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -412,6 +418,8 @@ def show_skills(self, calling_domain: str, referer_domain: str,
bold_reading = False bold_reading = False
if bold_reading_nicknames.get(nick): if bold_reading_nicknames.get(nick):
bold_reading = True bold_reading = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_profile(signing_priv_key_pem, html_profile(signing_priv_key_pem,
rss_icon_at_top, rss_icon_at_top,
@ -451,7 +459,8 @@ def show_skills(self, calling_domain: str, referer_domain: str,
max_shares_on_profile, max_shares_on_profile,
sites_unavailable, sites_unavailable,
no_of_books, no_of_books,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,

View File

@ -154,6 +154,8 @@ def show_media_timeline(self, authorized: bool,
show_announces = True show_announces = True
if hide_announces.get(nickname): if hide_announces.get(nickname):
show_announces = False show_announces = False
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_inbox_media(default_timeline, html_inbox_media(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -200,7 +202,8 @@ def show_media_timeline(self, authorized: bool,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, buy_sites,
auto_cw_cache, auto_cw_cache,
show_announces) show_announces,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -361,6 +364,8 @@ def show_blogs_timeline(self, authorized: bool,
last_post_id = path.split(';lastpost=')[1] last_post_id = path.split(';lastpost=')[1]
if ';' in last_post_id: if ';' in last_post_id:
last_post_id = last_post_id.split(';')[0] last_post_id = last_post_id.split(';')[0]
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_inbox_blogs(default_timeline, html_inbox_blogs(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -406,7 +411,8 @@ def show_blogs_timeline(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -571,6 +577,8 @@ def show_news_timeline(self, authorized: bool,
reverse_sequence = False reverse_sequence = False
if nickname in reverse_sequence_nicknames: if nickname in reverse_sequence_nicknames:
reverse_sequence = True reverse_sequence = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_inbox_news(default_timeline, html_inbox_news(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -617,7 +625,8 @@ def show_news_timeline(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, reverse_sequence,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -777,6 +786,8 @@ def show_features_timeline(self, authorized: bool,
reverse_sequence = False reverse_sequence = False
if nickname in reverse_sequence_nicknames: if nickname in reverse_sequence_nicknames:
reverse_sequence = True reverse_sequence = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_inbox_features(default_timeline, html_inbox_features(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -823,7 +834,8 @@ def show_features_timeline(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, reverse_sequence,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -947,6 +959,8 @@ def show_shares_timeline(self, authorized: bool,
reverse_sequence = False reverse_sequence = False
if nickname in reverse_sequence_nicknames: if nickname in reverse_sequence_nicknames:
reverse_sequence = True reverse_sequence = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_shares(default_timeline, html_shares(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -989,7 +1003,8 @@ def show_shares_timeline(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, reverse_sequence,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1089,6 +1104,8 @@ def show_wanted_timeline(self, authorized: bool,
reverse_sequence = False reverse_sequence = False
if nickname in reverse_sequence_nicknames: if nickname in reverse_sequence_nicknames:
reverse_sequence = True reverse_sequence = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_wanted(default_timeline, html_wanted(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -1131,7 +1148,8 @@ def show_wanted_timeline(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, reverse_sequence,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1264,6 +1282,8 @@ def show_bookmarks_timeline(self, authorized: bool,
reverse_sequence = False reverse_sequence = False
if nickname in reverse_sequence_nicknames: if nickname in reverse_sequence_nicknames:
reverse_sequence = True reverse_sequence = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_bookmarks(default_timeline, html_bookmarks(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -1309,7 +1329,8 @@ def show_bookmarks_timeline(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, reverse_sequence,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1471,6 +1492,8 @@ def show_outbox_timeline(self, authorized: bool,
show_announces = True show_announces = True
if hide_announces.get(nickname): if hide_announces.get(nickname):
show_announces = False show_announces = False
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_outbox(default_timeline, html_outbox(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -1515,7 +1538,8 @@ def show_outbox_timeline(self, authorized: bool,
reverse_sequence, reverse_sequence,
buy_sites, buy_sites,
auto_cw_cache, auto_cw_cache,
show_announces) show_announces,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1658,6 +1682,8 @@ def show_mod_timeline(self, authorized: bool,
reverse_sequence = False reverse_sequence = False
if nickname in reverse_sequence_nicknames: if nickname in reverse_sequence_nicknames:
reverse_sequence = True reverse_sequence = True
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_moderation(default_timeline, html_moderation(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -1703,7 +1729,8 @@ def show_mod_timeline(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, reverse_sequence,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1861,6 +1888,8 @@ def show_dms(self, authorized: bool,
last_post_id = path.split(';lastpost=')[1] last_post_id = path.split(';lastpost=')[1]
if ';' in last_post_id: if ';' in last_post_id:
last_post_id = last_post_id.split(';')[0] last_post_id = last_post_id.split(';')[0]
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_inbox_dms(default_timeline, html_inbox_dms(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -1905,7 +1934,8 @@ def show_dms(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -2066,6 +2096,8 @@ def show_replies(self, authorized: bool,
last_post_id = path.split(';lastpost=')[1] last_post_id = path.split(';lastpost=')[1]
if ';' in last_post_id: if ';' in last_post_id:
last_post_id = last_post_id.split(';')[0] last_post_id = last_post_id.split(';')[0]
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_inbox_replies(default_timeline, html_inbox_replies(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -2111,7 +2143,8 @@ def show_replies(self, authorized: bool,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -2283,6 +2316,8 @@ def show_inbox(self, authorized: bool,
show_announces = True show_announces = True
if hide_announces.get(nickname): if hide_announces.get(nickname):
show_announces = False show_announces = False
known_epicyon_instances = \
self.server.known_epicyon_instances
msg = \ msg = \
html_inbox(default_timeline, html_inbox(default_timeline,
recent_posts_cache, recent_posts_cache,
@ -2330,7 +2365,8 @@ def show_inbox(self, authorized: bool,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, buy_sites,
auto_cw_cache, auto_cw_cache,
show_announces) show_announces,
known_epicyon_instances)
if getreq_start_time: if getreq_start_time:
fitness_performance(getreq_start_time, fitness, fitness_performance(getreq_start_time, fitness,
'_GET', '_show_inbox3', '_GET', '_show_inbox3',

View File

@ -38,9 +38,10 @@ def daemon_http_head(self) -> None:
ua_str = get_user_agent(self) ua_str = get_user_agent(self)
if 'Epicyon/' in ua_str: if ua_str:
log_epicyon_instances(self.server.base_dir, calling_domain, if 'Epicyon/' in ua_str:
self.server.known_epicyon_instances) log_epicyon_instances(self.server.base_dir, calling_domain,
self.server.known_epicyon_instances)
if self.headers.get('Host'): if self.headers.get('Host'):
calling_domain = decoded_host(self.headers['Host']) calling_domain = decoded_host(self.headers['Host'])

View File

@ -164,9 +164,10 @@ def daemon_http_post(self) -> None:
ua_str = get_user_agent(self) ua_str = get_user_agent(self)
if 'Epicyon/' in ua_str: if ua_str:
log_epicyon_instances(self.server.base_dir, calling_domain, if 'Epicyon/' in ua_str:
self.server.known_epicyon_instances) log_epicyon_instances(self.server.base_dir, calling_domain,
self.server.known_epicyon_instances)
block, self.server.blocked_cache_last_updated, _ = \ block, self.server.blocked_cache_last_updated, _ = \
blocked_user_agent(calling_domain, ua_str, blocked_user_agent(calling_domain, ua_str,

View File

@ -123,7 +123,8 @@ def get_left_column_content(base_dir: str, nickname: str, domain_full: str,
rss_icon_at_top: bool, show_header_image: bool, rss_icon_at_top: bool, show_header_image: bool,
front_page: bool, theme: str, front_page: bool, theme: str,
access_keys: {}, access_keys: {},
shared_items_federated_domains: []) -> str: shared_items_federated_domains: [],
known_epicyon_instances: []) -> str:
"""Returns html content for the left column """Returns html content for the left column
""" """
html_str = '' html_str = ''
@ -351,10 +352,11 @@ def get_left_column_content(base_dir: str, nickname: str, domain_full: str,
html_str += \ html_str += \
'<p class="login-text"><a href="/about">' + \ '<p class="login-text"><a href="/about">' + \
translate['About this Instance'] + '</a></p>' translate['About this Instance'] + '</a></p>'
html_str += \ if known_epicyon_instances:
'<p class="login-text"><a href="/users/' + \ html_str += \
nickname + '/knowninstances">' + \ '<p class="login-text"><a href="/users/' + \
translate['Epicyon Instances'] + '</a></p>' nickname + '/knowninstances">' + \
translate['Epicyon Instances'] + '</a></p>'
html_str += \ html_str += \
'<p class="login-text"><a href="/manual">' + \ '<p class="login-text"><a href="/manual">' + \
translate['User Manual'] + '</a></p>' translate['User Manual'] + '</a></p>'
@ -379,7 +381,8 @@ def html_links_mobile(base_dir: str,
icons_as_buttons: bool, icons_as_buttons: bool,
default_timeline: str, default_timeline: str,
theme: str, access_keys: {}, theme: str, access_keys: {},
shared_items_federated_domains: []) -> str: shared_items_federated_domains: [],
known_epicyon_instances: []) -> str:
"""Show the left column links within mobile view """Show the left column links within mobile view
""" """
html_str = '' html_str = ''
@ -426,7 +429,8 @@ def html_links_mobile(base_dir: str,
False, timeline_path, False, timeline_path,
rss_icon_at_top, False, False, rss_icon_at_top, False, False,
theme, access_keys, theme, access_keys,
shared_items_federated_domains) shared_items_federated_domains,
known_epicyon_instances)
if editor and not _links_exist(base_dir): if editor and not _links_exist(base_dir):
html_str += '<br><br><br>\n<center>\n ' html_str += '<br><br><br>\n<center>\n '
html_str += translate['Select the edit icon to add web links'] html_str += translate['Select the edit icon to add web links']

View File

@ -131,7 +131,8 @@ def html_front_screen(signing_priv_key_pem: str,
dogwhistles: {}, dogwhistles: {},
min_images_for_accounts: [], min_images_for_accounts: [],
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the news instance front screen """Show the news instance front screen
""" """
bold_reading = False bold_reading = False
@ -176,7 +177,8 @@ def html_front_screen(signing_priv_key_pem: str,
False, False, False, False,
False, None, rss_icon_at_top, True, False, None, rss_icon_at_top, True,
True, theme, access_keys, True, theme, access_keys,
shared_items_federated_domains) shared_items_federated_domains,
known_epicyon_instances)
profile_header_str += \ profile_header_str += \
' </td>\n' + \ ' </td>\n' + \
' <td valign="top" class="col-center" tabindex="-1">\n' ' <td valign="top" class="col-center" tabindex="-1">\n'

View File

@ -66,7 +66,8 @@ def html_moderation(default_timeline: str,
min_images_for_accounts: [], min_images_for_accounts: [],
reverse_sequence: bool, reverse_sequence: bool,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the moderation feed as html """Show the moderation feed as html
This is what you see when selecting the "mod" timeline This is what you see when selecting the "mod" timeline
""" """
@ -95,7 +96,8 @@ def html_moderation(default_timeline: str,
signing_priv_key_pem, cw_lists, lists_enabled, signing_priv_key_pem, cw_lists, lists_enabled,
timezone, bold_reading, dogwhistles, ua_str, timezone, bold_reading, dogwhistles, ua_str,
min_images_for_accounts, reverse_sequence, None, min_images_for_accounts, reverse_sequence, None,
buy_sites, auto_cw_cache, show_announces) buy_sites, auto_cw_cache, show_announces,
known_epicyon_instances)
def html_account_info(translate: {}, def html_account_info(translate: {},

View File

@ -1031,7 +1031,8 @@ def html_profile(signing_priv_key_pem: str,
max_shares_on_profile: int, max_shares_on_profile: int,
sites_unavailable: [], sites_unavailable: [],
no_of_books: int, no_of_books: int,
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the profile page as html """Show the profile page as html
""" """
show_moved_accounts = False show_moved_accounts = False
@ -1063,7 +1064,8 @@ def html_profile(signing_priv_key_pem: str,
shared_items_federated_domains, cw_lists, shared_items_federated_domains, cw_lists,
lists_enabled, {}, lists_enabled, {},
min_images_for_accounts, buy_sites, min_images_for_accounts, buy_sites,
auto_cw_cache) auto_cw_cache,
known_epicyon_instances)
domain, port = get_domain_from_actor(profile_json['id']) domain, port = get_domain_from_actor(profile_json['id'])
if not domain: if not domain:

View File

@ -522,7 +522,8 @@ def html_timeline(default_timeline: str,
last_post_id: str, last_post_id: str,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
show_announces: bool) -> str: show_announces: bool,
known_epicyon_instances: []) -> str:
"""Show the timeline as html """Show the timeline as html
""" """
enable_timing_log = False enable_timing_log = False
@ -891,7 +892,8 @@ def html_timeline(default_timeline: str,
editor, artist, False, None, editor, artist, False, None,
rss_icon_at_top, rss_icon_at_top,
True, False, theme, access_keys, True, False, theme, access_keys,
shared_items_federated_domains) shared_items_federated_domains,
known_epicyon_instances)
tl_str += ' <td valign="top" class="col-left" ' + \ tl_str += ' <td valign="top" class="col-left" ' + \
'id="links" tabindex="-1">\n' + \ 'id="links" tabindex="-1">\n' + \
' <aside>\n' + \ ' <aside>\n' + \
@ -1415,7 +1417,8 @@ def html_shares(default_timeline: str,
min_images_for_accounts: [], min_images_for_accounts: [],
reverse_sequence: bool, reverse_sequence: bool,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the shares timeline as html """Show the shares timeline as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -1450,7 +1453,8 @@ def html_shares(default_timeline: str,
bold_reading, dogwhistles, ua_str, bold_reading, dogwhistles, ua_str,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces) auto_cw_cache, show_announces,
known_epicyon_instances)
def html_wanted(default_timeline: str, def html_wanted(default_timeline: str,
@ -1484,7 +1488,8 @@ def html_wanted(default_timeline: str,
min_images_for_accounts: [], min_images_for_accounts: [],
reverse_sequence: bool, reverse_sequence: bool,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the wanted timeline as html """Show the wanted timeline as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -1519,7 +1524,8 @@ def html_wanted(default_timeline: str,
bold_reading, dogwhistles, ua_str, bold_reading, dogwhistles, ua_str,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces) auto_cw_cache, show_announces,
known_epicyon_instances)
def html_inbox(default_timeline: str, def html_inbox(default_timeline: str,
@ -1556,7 +1562,8 @@ def html_inbox(default_timeline: str,
last_post_id: str, last_post_id: str,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
show_announces: bool) -> str: show_announces: bool,
known_epicyon_instances: []) -> str:
"""Show the inbox as html """Show the inbox as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -1590,7 +1597,8 @@ def html_inbox(default_timeline: str,
bold_reading, dogwhistles, ua_str, bold_reading, dogwhistles, ua_str,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, auto_cw_cache, show_announces) buy_sites, auto_cw_cache, show_announces,
known_epicyon_instances)
def html_bookmarks(default_timeline: str, def html_bookmarks(default_timeline: str,
@ -1625,7 +1633,8 @@ def html_bookmarks(default_timeline: str,
min_images_for_accounts: [], min_images_for_accounts: [],
reverse_sequence: bool, reverse_sequence: bool,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the bookmarks as html """Show the bookmarks as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -1659,7 +1668,8 @@ def html_bookmarks(default_timeline: str,
bold_reading, dogwhistles, ua_str, bold_reading, dogwhistles, ua_str,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces) auto_cw_cache, show_announces,
known_epicyon_instances)
def html_inbox_dms(default_timeline: str, def html_inbox_dms(default_timeline: str,
@ -1695,7 +1705,8 @@ def html_inbox_dms(default_timeline: str,
reverse_sequence: bool, reverse_sequence: bool,
last_post_id: str, last_post_id: str,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the DM timeline as html """Show the DM timeline as html
""" """
artist = is_artist(base_dir, nickname) artist = is_artist(base_dir, nickname)
@ -1725,7 +1736,8 @@ def html_inbox_dms(default_timeline: str,
bold_reading, dogwhistles, ua_str, bold_reading, dogwhistles, ua_str,
min_images_for_accounts, min_images_for_accounts,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, auto_cw_cache, show_announces) buy_sites, auto_cw_cache, show_announces,
known_epicyon_instances)
def html_inbox_replies(default_timeline: str, def html_inbox_replies(default_timeline: str,
@ -1761,7 +1773,8 @@ def html_inbox_replies(default_timeline: str,
reverse_sequence: bool, reverse_sequence: bool,
last_post_id: str, last_post_id: str,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the replies timeline as html """Show the replies timeline as html
""" """
artist = is_artist(base_dir, nickname) artist = is_artist(base_dir, nickname)
@ -1789,7 +1802,8 @@ def html_inbox_replies(default_timeline: str,
cw_lists, lists_enabled, timezone, bold_reading, cw_lists, lists_enabled, timezone, bold_reading,
dogwhistles, ua_str, min_images_for_accounts, dogwhistles, ua_str, min_images_for_accounts,
reverse_sequence, last_post_id, buy_sites, reverse_sequence, last_post_id, buy_sites,
auto_cw_cache, show_announces) auto_cw_cache, show_announces,
known_epicyon_instances)
def html_inbox_media(default_timeline: str, def html_inbox_media(default_timeline: str,
@ -1826,7 +1840,8 @@ def html_inbox_media(default_timeline: str,
last_post_id: str, last_post_id: str,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
show_announces: bool) -> str: show_announces: bool,
known_epicyon_instances: []) -> str:
"""Show the media timeline as html """Show the media timeline as html
""" """
artist = is_artist(base_dir, nickname) artist = is_artist(base_dir, nickname)
@ -1853,7 +1868,8 @@ def html_inbox_media(default_timeline: str,
cw_lists, lists_enabled, timezone, bold_reading, cw_lists, lists_enabled, timezone, bold_reading,
dogwhistles, ua_str, min_images_for_accounts, dogwhistles, ua_str, min_images_for_accounts,
reverse_sequence, last_post_id, buy_sites, reverse_sequence, last_post_id, buy_sites,
auto_cw_cache, show_announces) auto_cw_cache, show_announces,
known_epicyon_instances)
def html_inbox_blogs(default_timeline: str, def html_inbox_blogs(default_timeline: str,
@ -1889,7 +1905,8 @@ def html_inbox_blogs(default_timeline: str,
reverse_sequence: bool, reverse_sequence: bool,
last_post_id: str, last_post_id: str,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the blogs timeline as html """Show the blogs timeline as html
""" """
artist = is_artist(base_dir, nickname) artist = is_artist(base_dir, nickname)
@ -1917,7 +1934,8 @@ def html_inbox_blogs(default_timeline: str,
cw_lists, lists_enabled, timezone, bold_reading, cw_lists, lists_enabled, timezone, bold_reading,
dogwhistles, ua_str, min_images_for_accounts, dogwhistles, ua_str, min_images_for_accounts,
reverse_sequence, last_post_id, buy_sites, reverse_sequence, last_post_id, buy_sites,
auto_cw_cache, show_announces) auto_cw_cache, show_announces,
known_epicyon_instances)
def html_inbox_features(default_timeline: str, def html_inbox_features(default_timeline: str,
@ -1953,7 +1971,8 @@ def html_inbox_features(default_timeline: str,
min_images_for_accounts: [], min_images_for_accounts: [],
reverse_sequence: bool, reverse_sequence: bool,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the features timeline as html """Show the features timeline as html
""" """
show_announces = True show_announces = True
@ -1980,7 +1999,8 @@ def html_inbox_features(default_timeline: str,
cw_lists, lists_enabled, timezone, bold_reading, cw_lists, lists_enabled, timezone, bold_reading,
dogwhistles, ua_str, min_images_for_accounts, dogwhistles, ua_str, min_images_for_accounts,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces) auto_cw_cache, show_announces,
known_epicyon_instances)
def html_inbox_news(default_timeline: str, def html_inbox_news(default_timeline: str,
@ -2015,7 +2035,8 @@ def html_inbox_news(default_timeline: str,
min_images_for_accounts: [], min_images_for_accounts: [],
reverse_sequence: bool, reverse_sequence: bool,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}) -> str: auto_cw_cache: {},
known_epicyon_instances: []) -> str:
"""Show the news timeline as html """Show the news timeline as html
""" """
show_announces = True show_announces = True
@ -2042,7 +2063,8 @@ def html_inbox_news(default_timeline: str,
cw_lists, lists_enabled, timezone, bold_reading, cw_lists, lists_enabled, timezone, bold_reading,
dogwhistles, ua_str, min_images_for_accounts, dogwhistles, ua_str, min_images_for_accounts,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces) auto_cw_cache, show_announces,
known_epicyon_instances)
def html_outbox(default_timeline: str, def html_outbox(default_timeline: str,
@ -2078,7 +2100,8 @@ def html_outbox(default_timeline: str,
reverse_sequence: bool, reverse_sequence: bool,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
show_announces: bool) -> str: show_announces: bool,
known_epicyon_instances: []) -> str:
"""Show the Outbox as html """Show the Outbox as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -2107,4 +2130,4 @@ def html_outbox(default_timeline: str,
cw_lists, lists_enabled, timezone, bold_reading, cw_lists, lists_enabled, timezone, bold_reading,
dogwhistles, ua_str, min_images_for_accounts, dogwhistles, ua_str, min_images_for_accounts,
reverse_sequence, None, buy_sites, auto_cw_cache, reverse_sequence, None, buy_sites, auto_cw_cache,
show_announces) show_announces, known_epicyon_instances)