From 5d4494b15f13b4ea1aaf59ea002691c169183a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 9 Jan 2021 02:35:51 +0100 Subject: [PATCH] add "ascii" as a special 'path-restrict' value --- docs/configuration.rst | 1 + gallery_dl/util.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index ae650009..0752b9c9 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -154,6 +154,7 @@ Description depending on the local operating system * ``"unix"``: ``"/"`` * ``"windows"``: ``"\\\\|/<>:\"?*"`` + * ``"ascii"``: ``"^0-9A-Za-z_."`` Note: In a string with 2 or more characters, ``[]^-\`` need to be escaped with backslashes, e.g. ``"\\[\\]"`` diff --git a/gallery_dl/util.py b/gallery_dl/util.py index 1733e093..ab8645b5 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -730,6 +730,7 @@ class PathFormat(): "auto" : "\\\\|/<>:\"?*" if WINDOWS else "/", "unix" : "/", "windows": "\\\\|/<>:\"?*", + "ascii" : "^0-9A-Za-z_.", } def __init__(self, extractor):