mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
replace '\f' in --filename arguments with form feed character
to make it easier to use special type format strings on command-line (#2396)
This commit is contained in:
parent
61afa973b7
commit
9e6c981388
@ -116,9 +116,12 @@ def main():
|
||||
if args.yamlfiles:
|
||||
config.load(args.yamlfiles, strict=True, fmt="yaml")
|
||||
if args.filename:
|
||||
if args.filename == "/O":
|
||||
args.filename = "{filename}.{extension}"
|
||||
config.set((), "filename", args.filename)
|
||||
filename = args.filename
|
||||
if filename == "/O":
|
||||
filename = "{filename}.{extension}"
|
||||
elif filename.startswith("\\f"):
|
||||
filename = "\f" + filename[2:]
|
||||
config.set((), "filename", filename)
|
||||
if args.directory:
|
||||
config.set((), "base-directory", args.directory)
|
||||
config.set((), "directory", ())
|
||||
|
Loading…
Reference in New Issue
Block a user