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 hashes)
Built Distribution
Close
Hashes for charfreq-23.8.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5d0d8277cea3c9d9a6c4291d2f8924686d37419c96ec4db8e06320b25637776 |
|
MD5 | 402f87f4774158be77d00d3c1e841ad4 |
|
BLAKE2b-256 | 42c5640d2526588b6c0a71534ef872d37dc25877244b5967e22c5d99bc595176 |