[pp:exec] support more replacement fields for '--exec' (#4633)
- {_directory}
- {_filename}
- {_path} (alias for {})
This commit is contained in:
@@ -510,6 +510,8 @@ def build_parser():
|
||||
dest="postprocessors", metavar="CMD",
|
||||
action=AppendCommandAction, const={"name": "exec"},
|
||||
help=("Execute CMD for each downloaded file. "
|
||||
"Supported replacement fields are "
|
||||
"{} or {_path}, {_directory}, {_filename}. "
|
||||
"Example: --exec \"convert {} {}.png && rm {}\""),
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
@@ -518,7 +520,8 @@ def build_parser():
|
||||
action=AppendCommandAction, const={
|
||||
"name": "exec", "event": "finalize"},
|
||||
help=("Execute CMD after all files were downloaded successfully. "
|
||||
"Example: --exec-after \"cd {} && convert * ../doc.pdf\""),
|
||||
"Example: --exec-after \"cd {_directory} "
|
||||
"&& convert * ../doc.pdf\""),
|
||||
)
|
||||
postprocessor.add_argument(
|
||||
"-P", "--postprocessor",
|
||||
|
||||
Reference in New Issue
Block a user