.. contents:: **pathvalidate-cli**
:backlinks: top
:depth: 2
Summary
============================================
``pathvalidate-cli`` is a command line interface for `pathvalidate <https://github.com/thombashi/pathvalidate>`__ library.
The tool can sanitize/validate strings such as file-names/file-paths.
|PyPI pkg ver| |Supported Python ver| |CI status| |CodeQL|
.. |PyPI pkg ver| image:: https://badge.fury.io/py/pathvalidate-cli.svg
:target: https://badge.fury.io/py/pathvalidate-cli
:alt: PyPI package version
.. |Supported Python ver| image:: https://img.shields.io/pypi/pyversions/pathvalidate-cli.svg
:target: https://pypi.org/project/pathvalidate-cli
:alt: Supported Python versions
.. |CI status| image:: https://github.com/thombashi/pathvalidate-cli/actions/workflows/ci.yml/badge.svg
:target: https://github.com/thombashi/pathvalidate-cli/actions/workflows/ci.yml
:alt: CI status of Linux/macOS/Windows
.. |CodeQL| image:: https://github.com/thombashi/pathvalidate-cli/actions/workflows/github-code-scanning/codeql/badge.svg
:target: https://github.com/thombashi/pathvalidate-cli/actions/workflows/github-code-scanning/codeql
:alt: CodeQL
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+
Related Project
============================================
- `pathvalidate <https://github.com/thombashi/pathvalidate>`__
Raw data
{
"_id": null,
"home_page": "https://github.com/thombashi/pathvalidate-cli",
"name": "pathvalidate-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "file, path, validate, sanitize",
"author": "Tsuyoshi Hombashi",
"author_email": "tsuyoshi.hombashi@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c5/fb/42c47f49de25dbd2691dcc63640223401fe9bcad5dcab779191fdd343f69/pathvalidate_cli-0.0.3.tar.gz",
"platform": null,
"description": ".. contents:: **pathvalidate-cli**\n :backlinks: top\n :depth: 2\n\n\nSummary\n============================================\n\n``pathvalidate-cli`` is a command line interface for `pathvalidate <https://github.com/thombashi/pathvalidate>`__ library.\nThe tool can sanitize/validate strings such as file-names/file-paths.\n\n|PyPI pkg ver| |Supported Python ver| |CI status| |CodeQL|\n\n.. |PyPI pkg ver| image:: https://badge.fury.io/py/pathvalidate-cli.svg\n :target: https://badge.fury.io/py/pathvalidate-cli\n :alt: PyPI package version\n\n.. |Supported Python ver| image:: https://img.shields.io/pypi/pyversions/pathvalidate-cli.svg\n :target: https://pypi.org/project/pathvalidate-cli\n :alt: Supported Python versions\n\n.. |CI status| image:: https://github.com/thombashi/pathvalidate-cli/actions/workflows/ci.yml/badge.svg\n :target: https://github.com/thombashi/pathvalidate-cli/actions/workflows/ci.yml\n :alt: CI status of Linux/macOS/Windows\n\n.. |CodeQL| image:: https://github.com/thombashi/pathvalidate-cli/actions/workflows/github-code-scanning/codeql/badge.svg\n :target: https://github.com/thombashi/pathvalidate-cli/actions/workflows/github-code-scanning/codeql\n :alt: CodeQL\n\n\nInstallation\n============================================\n::\n\n pip install pathvalidate-cli\n\n\nUsage\n============================================\n\nSanitize file paths\n--------------------------------------------\n\n::\n\n $ pathvalidate sanitize 'fi:l*e/p\"a?t>h|.t<xt'\n file/path.txt\n $ pathvalidate --filename sanitize 'fi:l*e/p\"a?t>h|.t<xt'\n filepath.txt\n\nValidate file paths\n--------------------------------------------\n\n::\n\n $ pathvalidate validate file/path.txt\n $ \n $ pathvalidate validate 'fi:l*e/p\"a?t>h|.t<xt'\n [PV1100] invalid characters found: invalids=(':', '*', '\"', '?', '>', '|', '<'), value='fi:l*e/p\"a?t>h|.t<xt', platform=Windows\n\nCommand Help\n--------------------------------------------\n\n::\n\n Usage: pathvalidate [OPTIONS] COMMAND [ARGS]...\n\n Options:\n --version Show the version and exit.\n --debug For debug print.\n -q, --quiet Suppress execution log messages.\n --filename Consider inputs as filenames.\n --max-len, --max-bytes BYTES Maximum byte counts of file paths. -1: same\n value as the platform limitation. [default:\n -1]\n --platform PLATFORM Target platform name (case-insensitive). Valid\n platform specifiers are Linux/Windows/macOS.\n Valid special values are: auto, universal,\n POSIX (a) auto: automatically detects the\n execution platform. (b) universal: platform\n independent. (c) POSIX: POSIX-compliant\n platform. [default: universal]\n --security-check Enable security checks.\n -v, --verbose Verbosity level [default: 0]\n -h, --help Show this message and exit.\n\n Commands:\n error Print error reasons.\n sanitize Sanitize file paths.\n validate Validate file paths.\n\n\nDependencies\n============================================\nPython 3.8+\n\n\nRelated Project\n============================================\n\n- `pathvalidate <https://github.com/thombashi/pathvalidate>`__\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "pathvalidate-cli is a command line interface for pathvalidate library.",
"version": "0.0.3",
"project_urls": {
"Changelog": "https://github.com/thombashi/pathvalidate-cli/releases",
"Homepage": "https://github.com/thombashi/pathvalidate-cli",
"Source": "https://github.com/thombashi/pathvalidate-cli",
"Tracker": "https://github.com/thombashi/pathvalidate-cli/issues"
},
"split_keywords": [
"file",
" path",
" validate",
" sanitize"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "37190a1717b6090e5ba0b3f17cc57b237d0e955793d5c10584c9fee11d1d3b8a",
"md5": "743bf7e548fe6050006c5e6716074be7",
"sha256": "ea9314ba2035ea1e300fb3944630ab2d8734f2d8ffb107786d9eba9725287fcd"
},
"downloads": -1,
"filename": "pathvalidate_cli-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "743bf7e548fe6050006c5e6716074be7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7777,
"upload_time": "2024-08-23T10:52:23",
"upload_time_iso_8601": "2024-08-23T10:52:23.429012Z",
"url": "https://files.pythonhosted.org/packages/37/19/0a1717b6090e5ba0b3f17cc57b237d0e955793d5c10584c9fee11d1d3b8a/pathvalidate_cli-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c5fb42c47f49de25dbd2691dcc63640223401fe9bcad5dcab779191fdd343f69",
"md5": "cf08618e7b6a144eedb5d1c58dcbc0ef",
"sha256": "87f3f49ebe84db3774f94a55219296c66b3ba46417ad228051b9455d6ecf7ac1"
},
"downloads": -1,
"filename": "pathvalidate_cli-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "cf08618e7b6a144eedb5d1c58dcbc0ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11917,
"upload_time": "2024-08-23T10:52:24",
"upload_time_iso_8601": "2024-08-23T10:52:24.744118Z",
"url": "https://files.pythonhosted.org/packages/c5/fb/42c47f49de25dbd2691dcc63640223401fe9bcad5dcab779191fdd343f69/pathvalidate_cli-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-23 10:52:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thombashi",
"github_project": "pathvalidate-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "pathvalidate-cli"
}