mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 12:12:34 +01:00
add '--no-colors' command-line option
This commit is contained in:
parent
20e2c0042b
commit
bef0bd3b49
@ -29,6 +29,7 @@
|
||||
|
||||
## Output Options:
|
||||
-q, --quiet Activate quiet mode
|
||||
-w, --warning Print only warnings and errors
|
||||
-v, --verbose Print various debugging information
|
||||
-g, --get-urls Print URLs instead of downloading
|
||||
-G, --resolve-urls Print URLs instead of downloading; resolve
|
||||
@ -48,12 +49,12 @@
|
||||
extractors but cannot be handled, to FILE
|
||||
--write-pages Write downloaded intermediary pages to files in
|
||||
the current directory to debug problems
|
||||
--no-colors Do not emit ANSI color codes in output
|
||||
|
||||
## Downloader Options:
|
||||
-r, --limit-rate RATE Maximum download rate (e.g. 500k or 2.5M)
|
||||
-R, --retries N Maximum number of retries for failed HTTP
|
||||
requests or -1 for infinite retries (default:
|
||||
4)
|
||||
requests or -1 for infinite retries (default: 4)
|
||||
--http-timeout SECONDS Timeout for HTTP connections (default: 30.0)
|
||||
--sleep SECONDS Number of seconds to wait before each download.
|
||||
This can be either a constant value or a range
|
||||
|
@ -38,6 +38,11 @@ def main():
|
||||
except ImportError:
|
||||
import toml
|
||||
config.load(args.configs_toml, strict=True, loads=toml.loads)
|
||||
if not args.colors:
|
||||
output.ANSI = False
|
||||
config.set((), "colors", False)
|
||||
if util.WINDOWS:
|
||||
config.set(("output",), "ansi", False)
|
||||
if args.filename:
|
||||
filename = args.filename
|
||||
if filename == "/O":
|
||||
|
@ -325,6 +325,11 @@ def build_parser():
|
||||
help=("Write downloaded intermediary pages to files "
|
||||
"in the current directory to debug problems"),
|
||||
)
|
||||
output.add_argument(
|
||||
"--no-colors",
|
||||
dest="colors", action="store_false",
|
||||
help=("Do not emit ANSI color codes in output"),
|
||||
)
|
||||
|
||||
downloader = parser.add_argument_group("Downloader Options")
|
||||
downloader.add_argument(
|
||||
|
Loading…
Reference in New Issue
Block a user