mirror of
https://github.com/9001/copyparty.git
synced 2026-08-13 13:53:06 -06:00
plaintext readme/logue volflags
This commit is contained in:
parent
a3fbba10f7
commit
9fa950bcfa
|
|
@ -367,6 +367,8 @@ flagcats = {
|
|||
"epilogues=.epilogue.html": "files to embed below/after files",
|
||||
"readmes=readme.md,README.md": "files to embed as readmes",
|
||||
"preadmes=preadme.md,PREADME.md": "files to embed as preadmes",
|
||||
"plainreadme": "embed readme/preadme as monospace plaintext",
|
||||
"plainlogues": "embed prologue/epilogue as sans-serif plaintext",
|
||||
"no_readme": "disable embedding readme/preadme",
|
||||
"no_logues": "disable embedding prologue/epilogue",
|
||||
"no_sb_md": "disable js sandbox for markdown files",
|
||||
|
|
|
|||
|
|
@ -4381,6 +4381,8 @@ class HttpCli(object):
|
|||
logues[n] = read_utf8(self.log, fsenc(fn), False)
|
||||
if "exp" in vn.flags:
|
||||
logues[n] = self._expand(logues[n], vn.flags.get("exp_lg") or [])
|
||||
if "plainlogues" in vn.flags:
|
||||
logues[n] = html_escape(logues[n]).replace("\n", "<br />")
|
||||
break
|
||||
|
||||
readmes = ["", ""]
|
||||
|
|
@ -4398,6 +4400,10 @@ class HttpCli(object):
|
|||
readmes[n] = read_utf8(self.log, fsenc(fn), False)
|
||||
if "exp" in vn.flags:
|
||||
readmes[n] = self._expand(readmes[n], vn.flags.get("exp_md") or [])
|
||||
if "plainreadme" in vn.flags:
|
||||
zs = html_escape(readmes[n]).replace("\n", "<br />")
|
||||
logues[n] = "<pre>%s</pre>" % (zs,)
|
||||
readmes[n] = ""
|
||||
break
|
||||
|
||||
return logues, readmes
|
||||
|
|
|
|||
|
|
@ -444,6 +444,10 @@ IMPLICATIONS = [
|
|||
["no_logue", "no_logues"], # user-typo
|
||||
["nologues", "no_logues"], # user-typo
|
||||
["nologue", "no_logues"], # user-typo
|
||||
["plainlogue", "plainlogues"], # user-typo
|
||||
["plainreadmes", "plainreadme"], # user-typo
|
||||
["noscript", "plainlogues"],
|
||||
["noscript", "plainreadme"],
|
||||
["sftpvv", "sftpv"],
|
||||
["smbw", "smb"],
|
||||
["smb1", "smb"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue