pathvalidate-cli is a command line interface for pathvalidate library.
Project description
Summary
pathvalidate-cli is a command line interface for pathvalidate library. The tool can sanitize/validate strings such as file-names/file-paths.
Installation
pip install pathvalidate-cli
Usage
Sanitize file paths
$ pathvalidate sanitize 'fi:l*e/p"a?t>h|.t<xt' file/path.txt $ pathvalidate --filename sanitize 'fi:l*e/p"a?t>h|.t<xt' filepath.txt
Validate file paths
$ pathvalidate validate file/path.txt $ $ pathvalidate validate 'fi:l*e/p"a?t>h|.t<xt' [PV1100] invalid characters found: invalids=(':', '*', '"', '?', '>', '|', '<'), value='fi:l*e/p"a?t>h|.t<xt', platform=Windows
Command Help
Usage: pathvalidate [OPTIONS] COMMAND [ARGS]... Options: --version Show the version and exit. --debug For debug print. -q, --quiet Suppress execution log messages. --filename Consider inputs as filenames. --max-len, --max-bytes BYTES Maximum byte counts of file paths. -1: same value as the platform limitation. [default: -1] --platform PLATFORM Target platform name (case-insensitive). Valid platform specifiers are Linux/Windows/macOS. Valid special values are: auto, universal, POSIX (a) auto: automatically detects the execution platform. (b) universal: platform independent. (c) POSIX: POSIX-compliant platform. [default: universal] --security-check Enable security checks. -v, --verbose Verbosity level [default: 0] -h, --help Show this message and exit. Commands: error Print error reasons. sanitize Sanitize file paths. validate Validate file paths.
Dependencies
Python 3.8+
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pathvalidate_cli-0.0.2.tar.gz
(11.8 kB
view details)
Built Distribution
File details
Details for the file pathvalidate_cli-0.0.2.tar.gz
.
File metadata
- Download URL: pathvalidate_cli-0.0.2.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f10f8d0023e957c06076a27f6eec1876611cd555dffc0980399af46f966b74e2 |
|
MD5 | e090920eb396f521ad0669502bcb5a81 |
|
BLAKE2b-256 | e70d49346ceefb66ab9bb30163c4a59f88d5c8df3eb8b82bb4f45bd1d5c62c67 |
File details
Details for the file pathvalidate_cli-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pathvalidate_cli-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6090b628a582f608b15a57176a531825a2b710fe641f23e74e6da18b836883aa |
|
MD5 | a0f8c1388edc32102b462a6d80ca14b6 |
|
BLAKE2b-256 | a6b7de4c35c81a8f762342e5a3cace97458de9a8aac106d90ee47b2b918b92a2 |