mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
reorder post processing options shown by --help
This commit is contained in:
parent
168331d147
commit
8bf161e574
@ -118,24 +118,24 @@
|
||||
and other delegated URLs
|
||||
|
||||
## Post-processing Options:
|
||||
--zip Store downloaded files in a ZIP archive
|
||||
--cbz Store downloaded files in a CBZ archive
|
||||
--ugoira FORMAT Convert Pixiv Ugoira to FORMAT using FFmpeg.
|
||||
Supported formats are 'webm', 'mp4', 'gif',
|
||||
'vp8', 'vp9', 'vp9-lossless', 'copy'.
|
||||
-P, --postprocessor NAME Activate the specified post processor
|
||||
-O, --postprocessor-option KEY=VALUE
|
||||
Additional post processor options
|
||||
--write-metadata Write metadata to separate JSON files
|
||||
--write-info-json Write gallery metadata to a info.json file
|
||||
--write-tags Write image tags to separate text files
|
||||
--mtime FORMAT Set file modification times according to
|
||||
metadata selected by FORMAT. Examples: 'date' or
|
||||
--zip Store downloaded files in a ZIP archive
|
||||
--cbz Store downloaded files in a CBZ archive
|
||||
--mtime NAME Set file modification times according to
|
||||
metadata selected by NAME. Examples: 'date' or
|
||||
'status[date]'
|
||||
--ugoira FORMAT Convert Pixiv Ugoira to FORMAT using FFmpeg.
|
||||
Supported formats are 'webm', 'mp4', 'gif',
|
||||
'vp8', 'vp9', 'vp9-lossless', 'copy'.
|
||||
--exec CMD Execute CMD for each downloaded file. Supported
|
||||
replacement fields are {} or {_path},
|
||||
{_directory}, {_filename}. Example: --exec
|
||||
"convert {} {}.png && rm {}"
|
||||
--exec-after CMD Execute CMD after all files were downloaded
|
||||
successfully. Example: --exec-after "cd
|
||||
{_directory} && convert * ../doc.pdf"
|
||||
-P, --postprocessor NAME Activate the specified post processor
|
||||
-O, --postprocessor-option KEY=VALUE
|
||||
Additional post processor options
|
||||
--exec-after CMD Execute CMD after all files were downloaded.
|
||||
Example: --exec-after "cd {_directory} &&
|
||||
convert * ../doc.pdf"
|
||||
|
@ -531,42 +531,15 @@ def build_parser():
|
||||
}
|
||||
postprocessor = parser.add_argument_group("Post-processing Options")
|
||||
postprocessor.add_argument(
|
||||
"--zip",
|
||||
dest="postprocessors",
|
||||
action="append_const", const="zip", default=[],
|
||||
help="Store downloaded files in a ZIP archive",
|
||||
"-P", "--postprocessor",
|
||||
dest="postprocessors", metavar="NAME", action="append", default=[],
|
||||
help="Activate the specified post processor",
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--cbz",
|
||||
dest="postprocessors",
|
||||
action="append_const", const={
|
||||
"name" : "zip",
|
||||
"extension": "cbz",
|
||||
},
|
||||
help="Store downloaded files in a CBZ archive",
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--ugoira",
|
||||
dest="postprocessors", metavar="FORMAT", action=UgoiraAction,
|
||||
help=("Convert Pixiv Ugoira to FORMAT using FFmpeg. "
|
||||
"Supported formats are 'webm', 'mp4', 'gif', "
|
||||
"'vp8', 'vp9', 'vp9-lossless', 'copy'."),
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--ugoira-conv",
|
||||
dest="postprocessors", nargs=0, action=UgoiraAction, const="vp8",
|
||||
help=argparse.SUPPRESS,
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--ugoira-conv-lossless",
|
||||
dest="postprocessors", nargs=0, action=UgoiraAction,
|
||||
const="vp9-lossless",
|
||||
help=argparse.SUPPRESS,
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--ugoira-conv-copy",
|
||||
dest="postprocessors", nargs=0, action=UgoiraAction, const="copy",
|
||||
help=argparse.SUPPRESS,
|
||||
"-O", "--postprocessor-option",
|
||||
dest="options_pp", metavar="KEY=VALUE",
|
||||
action=PPParseAction, default={},
|
||||
help="Additional post processor options",
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--write-metadata",
|
||||
@ -592,11 +565,26 @@ def build_parser():
|
||||
action="append_const", const={"name": "metadata", "mode": "tags"},
|
||||
help="Write image tags to separate text files",
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--zip",
|
||||
dest="postprocessors",
|
||||
action="append_const", const="zip",
|
||||
help="Store downloaded files in a ZIP archive",
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--cbz",
|
||||
dest="postprocessors",
|
||||
action="append_const", const={
|
||||
"name" : "zip",
|
||||
"extension": "cbz",
|
||||
},
|
||||
help="Store downloaded files in a CBZ archive",
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--mtime",
|
||||
dest="postprocessors", metavar="FORMAT", action=MtimeAction,
|
||||
dest="postprocessors", metavar="NAME", action=MtimeAction,
|
||||
help=("Set file modification times according to metadata "
|
||||
"selected by FORMAT. Examples: 'date' or 'status[date]'"),
|
||||
"selected by NAME. Examples: 'date' or 'status[date]'"),
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--mtime-from-date",
|
||||
@ -604,6 +592,29 @@ def build_parser():
|
||||
const="date|status[date]",
|
||||
help=argparse.SUPPRESS,
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--ugoira",
|
||||
dest="postprocessors", metavar="FORMAT", action=UgoiraAction,
|
||||
help=("Convert Pixiv Ugoira to FORMAT using FFmpeg. "
|
||||
"Supported formats are 'webm', 'mp4', 'gif', "
|
||||
"'vp8', 'vp9', 'vp9-lossless', 'copy'."),
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--ugoira-conv",
|
||||
dest="postprocessors", nargs=0, action=UgoiraAction, const="vp8",
|
||||
help=argparse.SUPPRESS,
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--ugoira-conv-lossless",
|
||||
dest="postprocessors", nargs=0, action=UgoiraAction,
|
||||
const="vp9-lossless",
|
||||
help=argparse.SUPPRESS,
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--ugoira-conv-copy",
|
||||
dest="postprocessors", nargs=0, action=UgoiraAction, const="copy",
|
||||
help=argparse.SUPPRESS,
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"--exec",
|
||||
dest="postprocessors", metavar="CMD",
|
||||
@ -618,20 +629,9 @@ def build_parser():
|
||||
dest="postprocessors", metavar="CMD",
|
||||
action=AppendCommandAction, const={
|
||||
"name": "exec", "event": "finalize"},
|
||||
help=("Execute CMD after all files were downloaded successfully. "
|
||||
help=("Execute CMD after all files were downloaded. "
|
||||
"Example: --exec-after \"cd {_directory} "
|
||||
"&& convert * ../doc.pdf\""),
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"-P", "--postprocessor",
|
||||
dest="postprocessors", metavar="NAME", action="append",
|
||||
help="Activate the specified post processor",
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"-O", "--postprocessor-option",
|
||||
dest="options_pp", metavar="KEY=VALUE",
|
||||
action=PPParseAction, default={},
|
||||
help="Additional post processor options",
|
||||
)
|
||||
|
||||
return parser
|
||||
|
Loading…
Reference in New Issue
Block a user