Skip to main content

A character encoding detective for text files and URLs - catch encoding issues before they evolve into problems!

Project description

🔥 CharMinder

A character encoding detective for text files and URLs - catch encoding issues before they evolve into problems!

PyPI version CI/CD Pipeline codecov Python 3.11+ License: Apache 2.0 Ruff uv

CharMinder is a powerful encoding validation tool that detects character encoding issues in text files with precise, character-level reporting. It supports both local files and remote URLs (including GitHub).

✨ Features

  • 🕵️ Precise Detection: Character-level reporting with exact line/column positions
  • 🌐 URL Support: Works with HTTP/HTTPS URLs and GitHub blob URLs
  • 🎯 Multiple Encodings: UTF-8, UTF-16, UTF-32, ASCII validation
  • 📊 Detailed Reports: Unicode codepoints, context, and confidence levels
  • 🔄 GitHub Integration: Automatic blob-to-raw URL conversion
  • Fast & Reliable: Built on charset_normalizer for accurate detection

🚀 Quick Start

Installation

pip install charminder

Basic Usage

# Check a local file
charminder -f myfile.txt -e UTF8

# Check a remote URL
charminder -f https://example.com/data.csv -e ASCII

# Check a GitHub file (blob URL auto-converted)
charminder -f https://github.com/user/repo/blob/main/data.json -e UTF8

📖 Usage Examples

Valid File

$ charminder -f clean_file.txt -e UTF8
✓ clean_file.txt: Valid UTF8 encoding

File with Issues

$ charminder -f problematic_file.txt -e UTF8
✗ problematic_file.txt: Invalid UTF8 encoding
   Invalid character '—' (U+2014) at line 15, column 23
    Context: ...Hello  this is...
   Invalid character '©' (U+00A9) at line 20, column 5
    Context: ...© 2024 Company...

🛠️ Development

CharMinder is built with:

  • charset_normalizer for encoding detection
  • click for the CLI interface
  • urllib for URL handling

📝 License

Apache License, Version 2.0, (LICENSE)

🤝 Contributing

Contributions welcome! Please read our Contributing Guide first.


CharMinder - I choose you! 🔥⚡

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

charminder-0.1.0.tar.gz (46.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

charminder-0.1.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file charminder-0.1.0.tar.gz.

File metadata

  • Download URL: charminder-0.1.0.tar.gz
  • Upload date:
  • Size: 46.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for charminder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 99a72b341ff3acde8c9a3d7c98f008df4e8a430f977ac2b60047883f6c0aebe9
MD5 c8479464361907914a512081d8cc7894
BLAKE2b-256 987005353e5ba68ec089ea032611a045435e1014a66ef737644f804dc4caf422

See more details on using hashes here.

Provenance

The following attestation bundles were made for charminder-0.1.0.tar.gz:

Publisher: ci-cd.yml on nelsonwmoore/CharMinder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file charminder-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: charminder-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for charminder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d88150a0bc30fd4acfbe5f38ba6048e50d1067ad45a9bf12cb915381473b023
MD5 6a5a020e4a9b14036958d5e08e37eb8c
BLAKE2b-256 f7d3f812bd7b2438b66f1a8eb5edfdb6f7a4a3bdc9e11230eb780e3592acec1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for charminder-0.1.0-py3-none-any.whl:

Publisher: ci-cd.yml on nelsonwmoore/CharMinder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page