Get character frequency inside files
Project description
charfreq
Get the frequency of characters in your files! Outputs JSON with character counts
Install
pip3 install charfreq
Example usage
charfreq --only "[()]" ./**/*.py
This outputs the following JSON
{
"(": 83281,
")": 83286
}
More random examples
# Have a look at the options available
charfreq --help
# Check a file
charfreq script.py
# Check many files
charfreq script.py test.py api.js
# Test all py files recursively using glob (only tested on bash shell)
charfreq ./**/*.py
# Use multiple globs! (only tested on bash shell)
charfreq ./**/*.py ./**/*.html
# Exclude characters based on regex
charfreq --exclude "[a-zA-Z]" ./**/*.py
# Only capture characters based on regex
charfreq --only "[a-zA-Z]" ./**/*.py
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
charfreq-23.8.2.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file charfreq-23.8.2.tar.gz
.
File metadata
- Download URL: charfreq-23.8.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d535c79cd4d0a1d25be1dfec63c3573705bb98bdf930513fd6fd35b5199deaa4 |
|
MD5 | e1e799539eee11316de62b0d13337502 |
|
BLAKE2b-256 | 5948011967e72ec7cd47376858c08f220d4ecd16bfc05e89561dfde4f3ea1f77 |
File details
Details for the file charfreq-23.8.2-py3-none-any.whl
.
File metadata
- Download URL: charfreq-23.8.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5d0d8277cea3c9d9a6c4291d2f8924686d37419c96ec4db8e06320b25637776 |
|
MD5 | 402f87f4774158be77d00d3c1e841ad4 |
|
BLAKE2b-256 | 42c5640d2526588b6c0a71534ef872d37dc25877244b5967e22c5d99bc595176 |