Skip to main content

pathvalidate-cli is a command line interface for pathvalidate library.

Project description

Summary

pathvalidate-cli is a command line interface for pathvalidate library.

Installation

pip install pathvalidate-cli

Usage

$ 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

$ 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 with the platform limitation.  [default:
                                -1]
  --platform PLATFORM           Execution platform name (case-insensitive).
                                Valid platform specifiers are
                                Linux/Windows/macOS. Valid special values are:
                                POSIX, universal (a) auto: automatically
                                detects the execution platform. (b) universal:
                                platform independent.  [default: universal]
  -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


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.1.tar.gz (8.2 kB view hashes)

Uploaded Source

Built Distribution

pathvalidate_cli-0.0.1-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page