repchar
This is a simple command line script that creates a list of all characters contained in a given document.
Download, Installation
repchar is available on PyPI <https://pypi.python.org/pypi/repchar/>.
Install with pip install repchar.
Usage
repchar [-h] -o OUTFILENAME [-v] [-c] INFILENAME
- positional arguments:
INFILENAME Filename
- optional arguments:
- -h, --help
show this help message and exit
- -o OUTFILENAME, --outfile OUTFILENAME, --out OUTFILENAME
Filename for report
- -v, --verbose
Set log level to INFO.
- --version
show program’s version number and exit
- -c, --comb, --combining
Create special report for combining characters
The Reporter class
You can also use the CharReporter class in your own code:
>>> from repchar import CharReporter
>>> s = u"ABCD"
>>> r = CharReporter()
>>> r.feed(s)
>>> print(r.report())
chr hex count unicode
A 0041 1 LATIN CAPITAL LETTER A
B 0042 1 LATIN CAPITAL LETTER B
C 0043 1 LATIN CAPITAL LETTER C
D 0044 1 LATIN CAPITAL LETTER D
The count of each letter is stored in CharReporter.chars:
>>> r.chars
{u'A': 1, u'C': 1, u'B': 1, u'D': 1}
Special information about combining characters can be collected in CharReporter.combdir if you say so at instantiation:
>>> from repchar import CharReporter
>>> r2 = CharReporter(combining=True)
>>> s = u"Caffe\u0300"
>>> r2.feed(s)
>>> print(r2.report().encode("UTF-8"))
chr hex count unicode
C 0043 1 LATIN CAPITAL LETTER C
a 0061 1 LATIN SMALL LETTER A
e 0065 1 LATIN SMALL LETTER E
f 0066 2 LATIN SMALL LETTER F
̀ 0300 1 COMBINING GRAVE ACCENT
1 with: LATIN SMALL LETTER E
>>> r2.combdir
{u'\u0300': {u'e': 1}}
Metadata
Release files for repchar 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| repchar-1.0.2.tar.gz | 4.7 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| repchar-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
| repchar-1.0.2-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 13.5 kB
Release files / repchar-1.0.2.tar.gz
| Download URL | repchar-1.0.2.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
406f300e39828ffb389d7b4c1f1a381c7035fb288b3ec5b4d6351b707c8347f2
|
|
BLAKE2b-256 checksum How to use checksums |
1140e7f1b96b29cae49a1f26c1551dbe621768bbe43ab0fdebf11e2b29178ce2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / repchar-1.0.2-py3-none-any.whl
| Download URL | repchar-1.0.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db415c57ce9e0e3ea5da4e9a49789db9369d6c32c4fe8c96b73de646c68c8646
|
|
BLAKE2b-256 checksum How to use checksums |
499b398cfbcd75c6d125f8a834a56170d53cf1263db4d36f0444d1ee7355cbb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / repchar-1.0.2-py2-none-any.whl
| Download URL | repchar-1.0.2-py2-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
96e57b5df90eb64f052ee57c6a419e8f3c0a998da070a5e74e3a64a09fb3fb7b
|
|
BLAKE2b-256 checksum How to use checksums |
93033113ddf98e90893347069be488302b7f0cbaab7a1b71e48643091056c735
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for repchar 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.