@@ -39,9 +39,18 @@ Features
3939- Sanitize/Validate a string as a:
4040 - file name
4141 - file path
42- - file name/path argument validator/sanitizer for ``argparse `` and ``click ``
42+ - Sanitize will do:
43+ - Remove invalid characters for a target platform
44+ - Replace reserved names for a target platform
45+ - Normalize
46+ - Remove unprintable characters
47+ - Argument validator/sanitizer for ``argparse `` and ``click ``
4348- Multi platform support:
44- - sanitize/validate file names/paths for a specific platform (``Linux ``/``Windows ``/``macOS ``/``POSIX ``) or ``universal `` (platform independent)
49+ - ``Linux ``
50+ - ``Windows ``
51+ - ``macOS ``
52+ - ``POSIX ``
53+ - ``universal `` (platform independent)
4554- Multibyte character support
4655
4756Examples
@@ -110,9 +119,9 @@ Validate a filename
110119:Output:
111120 .. code-block ::
112121
113- [PV1100] invalid characters found: target- platform=universal, description=invalids=('/'), value='fi:l*e/p"a?t>h|.t<xt'
122+ [PV1100] invalid characters found: platform=universal, description=invalids=('/'), value='fi:l*e/p"a?t>h|.t<xt'
114123
115- [PV1002] found a reserved name by a platform: 'COM1' is a reserved name, target- platform=universal, reusable_name=False
124+ [PV1002] found a reserved name by a platform: 'COM1' is a reserved name, platform=universal, reusable_name=False
116125
117126 Check a filename
118127------------------
@@ -161,7 +170,7 @@ filename/filepath validator for ``argparse``
161170 filename: eg
162171 $ ./examples/argparse_validate.py --filename e?g
163172 usage: argparse_validate.py [-h] [--filename FILENAME] [--filepath FILEPATH]
164- argparse_validate.py: error: argument --filename: [PV1100] invalid characters found: invalids=(':'), value='e:g', target- platform=Windows
173+ argparse_validate.py: error: argument --filename: [PV1100] invalid characters found: invalids=(':'), value='e:g', platform=Windows
165174
166175 .. note ::
167176 ``validate_filepath_arg `` consider ``platform `` as of ``"auto" `` if the input is an absolute file path.
@@ -228,7 +237,7 @@ filename/filepath validator for ``click``
228237 Usage: click_validate.py [OPTIONS]
229238 Try 'click_validate.py --help' for help.
230239
231- Error: Invalid value for '--filename': [PV1100] invalid characters found: invalids=('?'), value='e?g', target- platform=Windows
240+ Error: Invalid value for '--filename': [PV1100] invalid characters found: invalids=('?'), value='e?g', platform=Windows
232241
233242 filename/filepath sanitizer for ``click ``
234243-------------------------------------------
0 commit comments