Remove control characters from filesystem paths
- add 'path-remove' option to specify the set of characters that should be removed - rename 'restrict-filenames' to 'path-restrict' - #348, #380
This commit is contained in:
@@ -108,21 +108,36 @@ Description Directory path used as the base for all download destinations.
|
||||
=========== =====
|
||||
|
||||
|
||||
extractor.*.restrict-filenames
|
||||
------------------------------
|
||||
extractor.*.path-restrict
|
||||
-------------------------
|
||||
=========== =====
|
||||
Type ``string``
|
||||
Default ``"auto"``
|
||||
Example ``"/!? ()[]{}"``
|
||||
Description Characters to replace with underscores (``_``) when generating
|
||||
directory and file names.
|
||||
Example ``"/!? (){}"``
|
||||
Description Set of characters to replace with underscores (``_``)
|
||||
in generated path segment names.
|
||||
|
||||
Special values:
|
||||
|
||||
* ``"auto"``: Use characters from ``"unix"`` or ``"windows"``
|
||||
depending on the local operating system
|
||||
* ``"unix"``: ``"/"``
|
||||
* ``"windows"``: ``"<>:\"\\|/?*"``
|
||||
* ``"windows"``: ``"\\\\|/<>:\"?*"``
|
||||
|
||||
Note: In a set with 2 or more characters, ``[]^-\`` need to be
|
||||
escaped with backslashes, e.g. ``"\\[\\]"``
|
||||
=========== =====
|
||||
|
||||
|
||||
extractor.*.path-remove
|
||||
-----------------------
|
||||
=========== =====
|
||||
Type ``string``
|
||||
Default ``"\\u0000-\\u001f\\u007f"`` (ASCII control characters)
|
||||
Description Set of characters to remove from generated path names.
|
||||
|
||||
Note: In a set with 2 or more characters, ``[]^-\`` need to be
|
||||
escaped with backslashes, e.g. ``"\\[\\]"``
|
||||
=========== =====
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
"proxy": null,
|
||||
"skip": true,
|
||||
"sleep": 0,
|
||||
"path-restrict": "auto",
|
||||
"path-remove": "\\u0000-\\u001f\\u007f",
|
||||
"user-agent": "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0",
|
||||
"restrict-filenames": "auto",
|
||||
|
||||
"artstation":
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user