mirror of
https://github.com/9001/copyparty.git
synced 2025-08-20 02:12:20 -06:00
give curl colored (yet sortable) plaintext listings
This commit is contained in:
parent
cfd24604d5
commit
b0e755d410
|
@ -2654,7 +2654,11 @@ class HttpCli(object):
|
|||
"dbwt": None,
|
||||
}
|
||||
|
||||
if self.uparam.get("ls") in ["v", "t", "txt"]:
|
||||
fmt = self.uparam.get("ls", "")
|
||||
if not fmt and self.ua.startswith("curl/"):
|
||||
fmt = "v"
|
||||
|
||||
if fmt in ["v", "t", "txt"]:
|
||||
if self.uname == "*":
|
||||
txt = "howdy stranger (you're not logged in)"
|
||||
else:
|
||||
|
@ -3145,6 +3149,10 @@ class HttpCli(object):
|
|||
is_ls = "ls" in self.uparam
|
||||
is_js = self.args.force_js or self.cookies.get("js") == "y"
|
||||
|
||||
if not is_ls and self.ua.startswith("curl/"):
|
||||
self.uparam["ls"] = "v"
|
||||
is_ls = True
|
||||
|
||||
tpl = "browser"
|
||||
if "b" in self.uparam:
|
||||
tpl = "browser2"
|
||||
|
|
Loading…
Reference in a new issue