Character analysis and visualization tool for ASCII and UTF-8 text.
Project description
CharScope
CharScope is a Python library that analyzes, visualizes, and reports character-level statistics from any input string using UTF-8 and ASCII encoding. It combines colorful CLI visualization with powerful statistical and graphical tools like matplotlib and numpy.
🎯 Features
- Detects and separates ASCII vs UTF-8 characters
- Visualizes character code distribution using histograms
- Displays encoding ratio with pie charts
- Computes entropy of character usage
- Shows Unicode name and code point of each character
- Colorful CLI outputs using
colorama - ASCII banner using
pyfiglet - Filters printable vs non-printable characters
- Displays UTF-8 byte values and their uniqueness
- Summary and stats output
📦 Installation
pip install charscope
Or from source:
git clone https://github.com/yourname/CharScope.git
cd CharScope
pip install .
🚀 Example Usage
from chars.core import analyze_text, summary, print_banner
text = "Hello 世界! Python 🐍 ASCII & UTF-8 ❤️🧠"
print_banner()
analyze_text(text)
summary(text)
This will display:
A cool ASCII title banner
Colorful statistics in the terminal
Character breakdown (name, code point, encoding type)
UTF-8 byte stats
Pie chart and histogram pop-ups
📊 Visual Output
Pie chart showing ASCII vs UTF-8 ratio
Histogram showing character distribution
Textual entropy value (in bits per character)
📌 Requirements
Python 3.7+
numpy
matplotlib
colorama
pyfiglet
All dependencies are listed in requirements.txt.
🔧 10 Feature Ideas for Future Versions
Export analysis result to JSON or CSV
Command-line interface (CLI) for shell usage
Support for file input (e.g. .txt, .md)
Highlight common non-ASCII symbols (like emojis, CJK, etc.)
Add color heatmap to histogram
Analyze frequency of bigrams and trigrams
Detect encoding anomalies or byte corruption
Interactive mode for stepping through character info
Add language detection using Unicode ranges
Web-based viewer (using Flask or Streamlit)
📄 License
MIT License
🤝 Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change or improve.
🙌 Author
Created by [Eden Simamora]
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file charscope-0.1.0.tar.gz.
File metadata
- Download URL: charscope-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54c8a0cb1fea704789970df463e43a40572a55255db8c783391a6a2489ad1f0f
|
|
| MD5 |
1584e7dbb5d07267b6daf18c4a2dd5b8
|
|
| BLAKE2b-256 |
8c9f84ef3d77538bd5ec26932b58847b38a7b9b2f8d7a745851e8f8507306db9
|
File details
Details for the file charscope-0.1.0-py3-none-any.whl.
File metadata
- Download URL: charscope-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d07b156254735c8808163344deb539e6ee141876dfd2e73d0e75f5c5fe0162a
|
|
| MD5 |
313b9e93aef10526381b5abf3e454bfd
|
|
| BLAKE2b-256 |
e6cf0b60b2aa57e0ff845f2747a55e9163078fa4506daca15bd2626c2e98e1a9
|