Name | unicodecheck JSON |
Version |
1.2.1
JSON |
| download |
home_page | None |
Summary | Check if Unicode text files are Unicode-normalized |
upload_time | 2024-04-27 17:41:27 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT |
keywords |
unicode
character encoding
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Unicodecheck
Simple tool to check if Unicode text files are Unicode-normalized
## Install
```sh
pip3 install unicodecheck
```
## Usage
### Quickstart
```sh
unicodecheck -iv SPAM.txt
```
To check files in a directory recursively:
```sh
unicodecheck -ivr Ham/Eggs/
```
### Synopsis
The main program can be invoked either through the `unicodecheck` command or through the Python main module option `python3 -m unicodecheck`.
```txt
usage: unicodecheck [-h] [-V] [-m {NFC,NFD,NFKC,NFKD}] [-d] [-u [NUMBER]] [-r] [-i] [-v]
PATH [PATH ...]
positional arguments:
PATH describe input file or directory (pass '-' to specify stdin)
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-m {NFC,NFD,NFKC,NFKD}, --mode {NFC,NFD,NFKC,NFKD}
target Unicode normalization (default: NFC)
-d, --diff show diffs between the original and normalized (default: False)
-u [NUMBER], -U [NUMBER], --unified [NUMBER]
show unified diffs with NUMBER lines of context [NUMBER=3] (default: False)
-r, --recursive follow the directory tree rooted in each PATH argument (default: False)
-i, --include-hidden include hidden files and directories (default: False)
-b PATTERN [PATTERN ...], --blacklist PATTERN [PATTERN ...]
notify if having PATTERN (case-sensitive) (default: None)
-e, --error return non-zero exit code on detection (default: False)
-v, --verbose report non-essential logs (default: False)
```
## Tips
### Check whether filenames are normalized
`convmv` command is suitable.
#### NFC
```sh
convmv -f utf8 -t utf8 --nfc -r ./
```
#### NFD
```sh
convmv -f utf8 -t utf8 --nfd -r ./
```
## Notes
- This tool doesn't provide auto in-place (write) file normalization because Unicode normalization doesn't guarantee content equivalence.
- The procedure for determining the binary file refers to Git's algorithm.
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "unicodecheck",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "curegit <contact@curegit.jp>",
"keywords": "Unicode, character encoding",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/99/cb/b3db363662749cd06ac908699554c918d68b1d8c53e685000612461d378c/unicodecheck-1.2.1.tar.gz",
"platform": null,
"description": "# Unicodecheck\n\nSimple tool to check if Unicode text files are Unicode-normalized\n\n## Install\n\n```sh\npip3 install unicodecheck\n```\n\n## Usage\n\n### Quickstart\n\n```sh\nunicodecheck -iv SPAM.txt\n```\n\nTo check files in a directory recursively:\n\n```sh\nunicodecheck -ivr Ham/Eggs/\n```\n\n### Synopsis\n\nThe main program can be invoked either through the `unicodecheck` command or through the Python main module option `python3 -m unicodecheck`.\n\n```txt\nusage: unicodecheck [-h] [-V] [-m {NFC,NFD,NFKC,NFKD}] [-d] [-u [NUMBER]] [-r] [-i] [-v]\n PATH [PATH ...]\n\npositional arguments:\n PATH describe input file or directory (pass '-' to specify stdin)\n\noptions:\n -h, --help show this help message and exit\n -V, --version show program's version number and exit\n -m {NFC,NFD,NFKC,NFKD}, --mode {NFC,NFD,NFKC,NFKD}\n target Unicode normalization (default: NFC)\n -d, --diff show diffs between the original and normalized (default: False)\n -u [NUMBER], -U [NUMBER], --unified [NUMBER]\n show unified diffs with NUMBER lines of context [NUMBER=3] (default: False)\n -r, --recursive follow the directory tree rooted in each PATH argument (default: False)\n -i, --include-hidden include hidden files and directories (default: False)\n -b PATTERN [PATTERN ...], --blacklist PATTERN [PATTERN ...]\n notify if having PATTERN (case-sensitive) (default: None)\n -e, --error return non-zero exit code on detection (default: False)\n -v, --verbose report non-essential logs (default: False)\n```\n\n## Tips\n\n### Check whether filenames are normalized\n\n`convmv` command is suitable.\n\n#### NFC\n\n```sh\nconvmv -f utf8 -t utf8 --nfc -r ./\n```\n\n#### NFD\n\n```sh\nconvmv -f utf8 -t utf8 --nfd -r ./\n```\n\n## Notes\n\n- This tool doesn't provide auto in-place (write) file normalization because Unicode normalization doesn't guarantee content equivalence.\n- The procedure for determining the binary file refers to Git's algorithm.\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Check if Unicode text files are Unicode-normalized",
"version": "1.2.1",
"project_urls": {
"homepage": "https://github.com/curegit/unicodecheck",
"repository": "https://github.com/curegit/unicodecheck.git"
},
"split_keywords": [
"unicode",
" character encoding"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dee4766b2ebeff927cbcc7597fa61118a4a6921c41a7861fe30a525d55e5892a",
"md5": "1072bcfa5643688cdfe4af46a7571f9c",
"sha256": "e3633fc1d96029ef8b2f6744cdbcc3bd1c50dd6e35517de828fedb8096ba96d3"
},
"downloads": -1,
"filename": "unicodecheck-1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1072bcfa5643688cdfe4af46a7571f9c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 8494,
"upload_time": "2024-04-27T17:41:26",
"upload_time_iso_8601": "2024-04-27T17:41:26.109341Z",
"url": "https://files.pythonhosted.org/packages/de/e4/766b2ebeff927cbcc7597fa61118a4a6921c41a7861fe30a525d55e5892a/unicodecheck-1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "99cbb3db363662749cd06ac908699554c918d68b1d8c53e685000612461d378c",
"md5": "12d5cbeabade2fdec2268f5a0bf6dd1a",
"sha256": "e87270809900cecf30d2c9b12d7c56786141742e93a37c8e58071f402fc73f93"
},
"downloads": -1,
"filename": "unicodecheck-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "12d5cbeabade2fdec2268f5a0bf6dd1a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 7995,
"upload_time": "2024-04-27T17:41:27",
"upload_time_iso_8601": "2024-04-27T17:41:27.919284Z",
"url": "https://files.pythonhosted.org/packages/99/cb/b3db363662749cd06ac908699554c918d68b1d8c53e685000612461d378c/unicodecheck-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-27 17:41:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "curegit",
"github_project": "unicodecheck",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "unicodecheck"
}