mirror of https://gitlab.com/bashrc2/epicyon
Clacks option
parent
881019cb46
commit
effce8c2ed
|
@ -862,7 +862,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.send_header('Access-Control-Allow-Origin', '*')
|
||||
return
|
||||
self.send_header('X-AP-Instance-ID', self.server.instance_id)
|
||||
self.send_header('X-Clacks-Overhead', 'GNU Natalie Nguyen')
|
||||
self.send_header('X-Clacks-Overhead', self.server.clacks)
|
||||
self.send_header('User-Agent',
|
||||
'Epicyon/' + __version__ +
|
||||
'; +' + self.server.http_prefix + '://' +
|
||||
|
@ -21016,7 +21016,8 @@ def load_tokens(base_dir: str, tokens_dict: {}, tokens_lookup: {}) -> None:
|
|||
break
|
||||
|
||||
|
||||
def run_daemon(preferred_podcast_formats: [],
|
||||
def run_daemon(clacks: str,
|
||||
preferred_podcast_formats: [],
|
||||
check_actor_timeout: int,
|
||||
crawlers_allowed: [],
|
||||
dyslexic_font: bool,
|
||||
|
@ -21112,6 +21113,10 @@ def run_daemon(preferred_podcast_formats: [],
|
|||
# caches css files
|
||||
httpd.css_cache = {}
|
||||
|
||||
httpd.clacks = 'GNU Natalie Nguyen'
|
||||
if clacks:
|
||||
httpd.clacks = clacks
|
||||
|
||||
# load a list of dogwhistle words
|
||||
dogwhistles_filename = base_dir + '/accounts/dogwhistles.txt'
|
||||
if not os.path.isfile(dogwhistles_filename):
|
||||
|
|
|
@ -183,6 +183,9 @@ def _command_options() -> None:
|
|||
default=None,
|
||||
help='Name of the screen reader: ' +
|
||||
'espeak/picospeaker/mimic3')
|
||||
parser.add_argument('--clacks', dest='clacks', type=str,
|
||||
default=None,
|
||||
help='http header clacks overhead')
|
||||
parser.add_argument('--fol', '--follow', dest='follow', type=str,
|
||||
default=None,
|
||||
help='Handle of account to follow. eg. ' +
|
||||
|
@ -3603,7 +3606,8 @@ def _command_options() -> None:
|
|||
if __name__ == "__main__":
|
||||
argb2, opt2 = _command_options()
|
||||
print('allowdeletion: ' + str(argb2.allowdeletion))
|
||||
run_daemon(opt2['preferred_podcast_formats'],
|
||||
run_daemon(argb2.clacks,
|
||||
opt2['preferred_podcast_formats'],
|
||||
argb2.check_actor_timeout,
|
||||
opt2['crawlers_allowed'],
|
||||
argb2.dyslexic_font,
|
||||
|
|
12
tests.py
12
tests.py
|
@ -838,8 +838,9 @@ def create_server_alice(path: str, domain: str, port: int,
|
|||
crawlers_allowed = []
|
||||
check_actor_timeout = 2
|
||||
preferred_podcast_formats = None
|
||||
clacks = None
|
||||
print('Server running: Alice')
|
||||
run_daemon(preferred_podcast_formats,
|
||||
run_daemon(clacks, preferred_podcast_formats,
|
||||
check_actor_timeout,
|
||||
crawlers_allowed,
|
||||
dyslexic_font,
|
||||
|
@ -998,8 +999,9 @@ def create_server_bob(path: str, domain: str, port: int,
|
|||
crawlers_allowed = []
|
||||
check_actor_timeout = 2
|
||||
preferred_podcast_formats = None
|
||||
clacks = None
|
||||
print('Server running: Bob')
|
||||
run_daemon(preferred_podcast_formats,
|
||||
run_daemon(clacks, preferred_podcast_formats,
|
||||
check_actor_timeout,
|
||||
crawlers_allowed,
|
||||
dyslexic_font,
|
||||
|
@ -1080,8 +1082,9 @@ def create_server_eve(path: str, domain: str, port: int, federation_list: [],
|
|||
crawlers_allowed = []
|
||||
check_actor_timeout = 2
|
||||
preferred_podcast_formats = None
|
||||
clacks = None
|
||||
print('Server running: Eve')
|
||||
run_daemon(preferred_podcast_formats,
|
||||
run_daemon(clacks, preferred_podcast_formats,
|
||||
check_actor_timeout,
|
||||
crawlers_allowed,
|
||||
dyslexic_font,
|
||||
|
@ -1164,8 +1167,9 @@ def create_server_group(path: str, domain: str, port: int,
|
|||
crawlers_allowed = []
|
||||
check_actor_timeout = 2
|
||||
preferred_podcast_formats = None
|
||||
clacks = None
|
||||
print('Server running: Group')
|
||||
run_daemon(preferred_podcast_formats,
|
||||
run_daemon(clacks, preferred_podcast_formats,
|
||||
check_actor_timeout,
|
||||
crawlers_allowed,
|
||||
dyslexic_font,
|
||||
|
|
Loading…
Reference in New Issue