refactor github urls

This commit is contained in:
ed 2025-01-17 05:48:49 +00:00
parent c94f662095
commit 170cbe98c5
3 changed files with 12 additions and 6 deletions

View file

@ -54,6 +54,8 @@ from .util import (
RAM_TOTAL, RAM_TOTAL,
SQLITE_VER, SQLITE_VER,
UNPLICATIONS, UNPLICATIONS,
URL_BUG,
URL_PRJ,
Daemon, Daemon,
align_tab, align_tab,
ansi_re, ansi_re,
@ -332,17 +334,16 @@ def ensure_webdeps() -> None:
if has_resource(E, "web/deps/mini-fa.woff"): if has_resource(E, "web/deps/mini-fa.woff"):
return return
warn( t = """could not find webdeps;
"""could not find webdeps;
if you are running the sfx, or exe, or pypi package, or docker image, if you are running the sfx, or exe, or pypi package, or docker image,
then this is a bug! Please let me know so I can fix it, thanks :-) then this is a bug! Please let me know so I can fix it, thanks :-)
https://github.com/9001/copyparty/issues/new?labels=bug&template=bug_report.md %s
however, if you are a dev, or running copyparty from source, and you want however, if you are a dev, or running copyparty from source, and you want
full client functionality, you will need to build or obtain the webdeps: full client functionality, you will need to build or obtain the webdeps:
https://github.com/9001/copyparty/blob/hovudstraum/docs/devnotes.md#building %s/blob/hovudstraum/docs/devnotes.md#building
""" """
) warn(t % (URL_BUG, URL_PRJ))
def configure_ssl_ver(al: argparse.Namespace) -> None: def configure_ssl_ver(al: argparse.Namespace) -> None:
@ -1476,7 +1477,7 @@ def add_ui(ap, retry):
ap2.add_argument("--txt-max", metavar="KiB", type=int, default=64, help="max size of embedded textfiles on ?doc= (anything bigger will be lazy-loaded by JS)") ap2.add_argument("--txt-max", metavar="KiB", type=int, default=64, help="max size of embedded textfiles on ?doc= (anything bigger will be lazy-loaded by JS)")
ap2.add_argument("--doctitle", metavar="TXT", type=u, default="copyparty @ --name", help="title / service-name to show in html documents") ap2.add_argument("--doctitle", metavar="TXT", type=u, default="copyparty @ --name", help="title / service-name to show in html documents")
ap2.add_argument("--bname", metavar="TXT", type=u, default="--name", help="server name (displayed in filebrowser document title)") ap2.add_argument("--bname", metavar="TXT", type=u, default="--name", help="server name (displayed in filebrowser document title)")
ap2.add_argument("--pb-url", metavar="URL", type=u, default="https://github.com/9001/copyparty", help="powered-by link; disable with \033[33m-np\033[0m") ap2.add_argument("--pb-url", metavar="URL", type=u, default=URL_PRJ, help="powered-by link; disable with \033[33m-np\033[0m")
ap2.add_argument("--ver", action="store_true", help="show version on the control panel (incompatible with \033[33m-nb\033[0m)") ap2.add_argument("--ver", action="store_true", help="show version on the control panel (incompatible with \033[33m-nb\033[0m)")
ap2.add_argument("--k304", metavar="NUM", type=int, default=0, help="configure the option to enable/disable k304 on the controlpanel (workaround for buggy reverse-proxies); [\033[32m0\033[0m] = hidden and default-off, [\033[32m1\033[0m] = visible and default-off, [\033[32m2\033[0m] = visible and default-on") ap2.add_argument("--k304", metavar="NUM", type=int, default=0, help="configure the option to enable/disable k304 on the controlpanel (workaround for buggy reverse-proxies); [\033[32m0\033[0m] = hidden and default-off, [\033[32m1\033[0m] = visible and default-off, [\033[32m2\033[0m] = visible and default-on")
ap2.add_argument("--no304", metavar="NUM", type=int, default=0, help="configure the option to enable/disable no304 on the controlpanel (workaround for buggy caching in browsers); [\033[32m0\033[0m] = hidden and default-off, [\033[32m1\033[0m] = visible and default-off, [\033[32m2\033[0m] = visible and default-on") ap2.add_argument("--no304", metavar="NUM", type=int, default=0, help="configure the option to enable/disable no304 on the controlpanel (workaround for buggy caching in browsers); [\033[32m0\033[0m] = hidden and default-off, [\033[32m1\033[0m] = visible and default-off, [\033[32m2\033[0m] = visible and default-on")

View file

@ -50,6 +50,7 @@ from .util import (
FFMPEG_URL, FFMPEG_URL,
HAVE_PSUTIL, HAVE_PSUTIL,
HAVE_SQLITE3, HAVE_SQLITE3,
URL_BUG,
UTC, UTC,
VERSIONS, VERSIONS,
Daemon, Daemon,

View file

@ -229,6 +229,10 @@ META_NOBOTS = '<meta name="robots" content="noindex, nofollow">\n'
FFMPEG_URL = "https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z" FFMPEG_URL = "https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z"
URL_PRJ = "https://github.com/9001/copyparty"
URL_BUG = URL_PRJ + "/issues/new?labels=bug&template=bug_report.md"
HTTPCODE = { HTTPCODE = {
200: "OK", 200: "OK",
201: "Created", 201: "Created",