From 689e77a025c7a8fe75da141de33065527fa5f62f Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 6 Dec 2021 22:24:25 +0100 Subject: [PATCH] option to set a custom servicename --- copyparty/__main__.py | 1 + copyparty/httpcli.py | 1 + copyparty/web/msg.html | 2 +- copyparty/web/splash.html | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/copyparty/__main__.py b/copyparty/__main__.py index 604f89fe..ed7512b4 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -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") diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index f837c287..1020ab45 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -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 diff --git a/copyparty/web/msg.html b/copyparty/web/msg.html index 379fa2c6..361d4929 100644 --- a/copyparty/web/msg.html +++ b/copyparty/web/msg.html @@ -3,7 +3,7 @@ - copyparty + {{ svcname }} diff --git a/copyparty/web/splash.html b/copyparty/web/splash.html index 8cc04d15..6513173b 100644 --- a/copyparty/web/splash.html +++ b/copyparty/web/splash.html @@ -3,7 +3,7 @@ - copyparty + {{ svcname }}