[options] add '--restrict-filenames' & '--windows-filenames'
This commit is contained in:
@@ -24,6 +24,10 @@
|
|||||||
('/O' for "original" filenames)
|
('/O' for "original" filenames)
|
||||||
-d, --destination PATH Target location for file downloads
|
-d, --destination PATH Target location for file downloads
|
||||||
-D, --directory PATH Exact location for file downloads
|
-D, --directory PATH Exact location for file downloads
|
||||||
|
--restrict-filenames VALUE Replace restricted filename characters with
|
||||||
|
underscores. One of 'windows', 'unix', 'ascii',
|
||||||
|
'ascii+', or a custom set of characters
|
||||||
|
--windows-filenames Force filenames to be Windows-compatible
|
||||||
-X, --extractors PATH Load external extractors from PATH
|
-X, --extractors PATH Load external extractors from PATH
|
||||||
--clear-cache MODULE Delete cached login sessions, cookies, etc. for
|
--clear-cache MODULE Delete cached login sessions, cookies, etc. for
|
||||||
MODULE (ALL to delete everything)
|
MODULE (ALL to delete everything)
|
||||||
|
|||||||
@@ -268,6 +268,19 @@ def build_parser():
|
|||||||
dest="directory", metavar="PATH",
|
dest="directory", metavar="PATH",
|
||||||
help="Exact location for file downloads",
|
help="Exact location for file downloads",
|
||||||
)
|
)
|
||||||
|
general.add_argument(
|
||||||
|
"--restrict-filenames",
|
||||||
|
dest="path-restrict", metavar="VALUE", action=ConfigAction,
|
||||||
|
help=("Replace restricted filename characters with underscores. "
|
||||||
|
"One of 'windows', 'unix', 'ascii', 'ascii+', "
|
||||||
|
"or a custom set of characters"),
|
||||||
|
)
|
||||||
|
general.add_argument(
|
||||||
|
"--windows-filenames",
|
||||||
|
dest="path-restrict", nargs=0, action=ConfigConstAction,
|
||||||
|
const="windows",
|
||||||
|
help="Force filenames to be Windows-compatible",
|
||||||
|
)
|
||||||
general.add_argument(
|
general.add_argument(
|
||||||
"-X", "--extractors",
|
"-X", "--extractors",
|
||||||
dest="extractor_sources", metavar="PATH", action="append",
|
dest="extractor_sources", metavar="PATH", action="append",
|
||||||
|
|||||||
Reference in New Issue
Block a user