option to set a custom servicename

This commit is contained in:
ed 2021-12-06 22:24:25 +01:00
parent 3bd89403d2
commit 689e77a025
4 changed files with 4 additions and 2 deletions

View file

@ -531,6 +531,7 @@ def run_argparse(argv, formatter):
ap2.add_argument("--js-browser", metavar="L", type=u, help="URL to additional JS to include")
ap2.add_argument("--css-browser", metavar="L", type=u, help="URL to additional CSS to include")
ap2.add_argument("--textfiles", metavar="CSV", type=u, default="txt,nfo,diz,cue,readme", help="file extensions to present as plaintext")
ap2.add_argument("--doctitle", metavar="TXT", type=u, default="copyparty", help="title / service-name to show in html documents")
ap2 = ap.add_argument_group('debug options')
ap2.add_argument("--no-sendfile", action="store_true", help="disable sendfile")

View file

@ -92,6 +92,7 @@ class HttpCli(object):
tpl = self.conn.hsrv.j2[name]
if ka:
ka["ts"] = self.conn.hsrv.cachebuster()
ka["svcname"] = self.args.doctitle
return tpl.render(**ka)
return tpl

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>copyparty</title>
<title>{{ svcname }}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<link rel="stylesheet" media="screen" href="/.cpr/msg.css?_={{ ts }}">

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>copyparty</title>
<title>{{ svcname }}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<link rel="stylesheet" media="screen" href="/.cpr/splash.css?_={{ ts }}">