Recursively attempt to decode text
Project description
Multidecoder
Automatically attempt to (recursively) decode text using common encodings.
Supported encodings
- base64 (and its urlsafe variant)
- hexadecimal
- html escape characters
- url encoding
Supported unicode encodings
Via chardet:
- ASCII, UTF-8, UTF-16 (2 variants), UTF-32 (4 variants)
- Big5, GB2312, EUC-TW, HZ-GB-2312, ISO-2022-CN (Traditional and Simplified Chinese)
- EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP (Japanese)
- EUC-KR, ISO-2022-KR, Johab (Korean)
- KOI8-R, MacCyrillic, IBM855, IBM866, ISO-8859-5, windows-1251 (Cyrillic)
- ISO-8859-5, windows-1251 (Bulgarian)
- ISO-8859-1, windows-1252, MacRoman (Western European languages)
- ISO-8859-7, windows-1253 (Greek)
- ISO-8859-8, windows-1255 (Visual and Logical Hebrew)
- TIS-620 (Thai)
Install
The recommended way to install this is via pipx:
pipx install text-multidecoder
Or from git:
pipx install git+https://github.com/rshk/multidecoder.git@main
Or run from a source code checkout:
git clone https://github.com/rshk/multidecoder.git
cd ./multidecoder
uv sync
uv run multidecoder
Install via pip:
pip install text-multidecoder
Add to your uv project as a dependency:
uv add text-multidecoder
Command-line usage
multidecoder -t "string to decode"
multidecoder < decodeme.txt
Library usage
from multidecoder import multidecode, display_result
results = multidecode(text, max_depth=10)
display_result(results, sys.stdout)
Contributing
Just open an issue or pull request on gituhb.
If your're contributing a decoder, place short ones (max 10 lines or
so) inside the basic module. Longer ones should be placed in their
own module.
Decoders carrying extra dependencies should probably be made optional, and possibly installed as "extras". Support for optional decoders is not implemented yet, but please do reach out if this is something you might need.
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 text_multidecoder-0.1.1.tar.gz.
File metadata
- Download URL: text_multidecoder-0.1.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47dfe2c6f0047299e5041941291deb403d0fbbbe6697eb1cfd4acb5ff0ad771b
|
|
| MD5 |
f4735476e416cc33f3b874bc5b51fc23
|
|
| BLAKE2b-256 |
1bda90eab023a35e93cdec02cb00330fa153765b89f57936ec28376c5ccf00cc
|
File details
Details for the file text_multidecoder-0.1.1-py3-none-any.whl.
File metadata
- Download URL: text_multidecoder-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3571313511f5f8913b955cb2e8351fb9f2233ea5095b9ad6212f3fd2d7e9f50a
|
|
| MD5 |
cdc9724e60294484117b1a5864526021
|
|
| BLAKE2b-256 |
c90a12021d8938febe41721ee3848372ce4054586bc815b751c99824f2799fcc
|