{"id":37061426,"url":"https://github.com/crashoz/usenc","last_synced_at":"2026-01-14T06:57:21.743Z","repository":{"id":324689894,"uuid":"1097696776","full_name":"crashoz/usenc","owner":"crashoz","description":"A universal string encoder CLI tool and Python library for encoding/decoding strings in various formats.","archived":false,"fork":false,"pushed_at":"2025-12-20T16:34:31.000Z","size":288,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-22T07:15:40.166Z","etag":null,"topics":["encoder-decoder","python","string-manipulation"],"latest_commit_sha":null,"homepage":"https://crashoz.github.io/usenc/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crashoz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-16T17:03:39.000Z","updated_at":"2025-12-20T17:58:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/crashoz/usenc","commit_stats":null,"previous_names":["crashoz/usenc"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/crashoz/usenc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashoz%2Fusenc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashoz%2Fusenc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashoz%2Fusenc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashoz%2Fusenc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crashoz","download_url":"https://codeload.github.com/crashoz/usenc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crashoz%2Fusenc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encoder-decoder","python","string-manipulation"],"created_at":"2026-01-14T06:57:21.130Z","updated_at":"2026-01-14T06:57:21.738Z","avatar_url":"https://github.com/crashoz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal String Encoder\n\n[![Tests](https://github.com/crashoz/usenc/workflows/Tests/badge.svg)](https://github.com/crashoz/usenc/actions)\n[![Documentation](https://github.com/crashoz/usenc/workflows/Deploy%20Documentation/badge.svg)](https://crashoz.github.io/usenc/)\n![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)\n[![PyPI version](https://badge.fury.io/py/usenc.svg)](https://pypi.org/project/usenc/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/usenc.svg)](https://pypi.org/project/usenc/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)\n\nA universal string encoder CLI tool and Python library for encoding/decoding strings in various formats.\n\nCheck out the [official documentation](https://crashoz.github.io/usenc/)\n\n## Features\n\n- 🚀 **Simple CLI** - Encode/decode from stdin or files\n- 🔌 **Extensible** - Easy to add new encoders\n- 🎯 **Flexible** - Support for custom character sets\n- 📦 **Lightweight** - No heavy dependencies\n- 🧪 **Well-tested** - Comprehensive test suite with snapshot testing\n\n## Install\n\nusenc is available on PyPi.\n\nInstall the CLI automatically\n\n```bash\npipx install usenc\n```\n\nOr with traditional `pip` (in a virtual env)\n\n```bash\npip install usenc\n```\n\n## Quick Example\n\n### CLI\n\n```bash\n# Get help and parameters\nusenc --help\nusenc \u003cencoder\u003e --help\n```\n\n```bash\n# Encode a string\necho \"hello world\" | usenc url\n# Output: hello%20world\n\n# Decode\necho \"hello%20world\" | usenc url -d\n# Output: hello world\n\n# File input/output\nusenc url -i input.txt -o output.txt\n\n# More complex encoding\necho \"hello world\" | usenc hex --prefix '${' --suffix '}' --lowercase\n# Output: ${68}${65}${6c}${6c}${6f}${20}${77}${6f}${72}${6c}${64}\n\n# Optional character selection\necho \"hello world\" | usenc cstring --include e\n# Output: h\\x65llo\\x20world\n```\n\n### Python\n\n```python\nfrom usenc import encode, decode\n\n# Encode\nencoded = encode(b'hello world', encoder='url')\nprint(encoded)  # hello%20world\n\n# Decode\ndecoded = decode(encoded, encoder='url')\nprint(decoded)  # hello world\n```\n\n## Available Encoders\n\n- **[base16](https://crashoz.github.io/usenc/encoders/base16/)** - Standard Base16 encoding (RFC 4648)\n- **[base32](https://crashoz.github.io/usenc/encoders/base32/)** - Standard Base32 encoding (RFC 4648)\n- **[base64](https://crashoz.github.io/usenc/encoders/base64/)** - Standard Base64 encoding (RFC 4648)\n- **[cstring](https://crashoz.github.io/usenc/encoders/cstring/)** - C string escaping\n- **[doubleurl](https://crashoz.github.io/usenc/encoders/doubleurl/)** - Double URL encoding (RFC 3986 percent encoding)\n- **[hash](https://crashoz.github.io/usenc/encoders/hash/)** - Base hash encoder using python hashlib\n- **[hex](https://crashoz.github.io/usenc/encoders/hex/)** - Hexadecimal string encoding\n- **[html](https://crashoz.github.io/usenc/encoders/html/)** - HTML Entities encoding\n- **[md5](https://crashoz.github.io/usenc/encoders/md5/)** - MD5 hash encoding\n- **[sha1](https://crashoz.github.io/usenc/encoders/sha1/)** - SHA-1 hash encoding\n- **[sha256](https://crashoz.github.io/usenc/encoders/sha256/)** - SHA-256 hash encoding\n- **[unicode](https://crashoz.github.io/usenc/encoders/unicode/)** - Unicode escapes encoding\n- **[url](https://crashoz.github.io/usenc/encoders/url/)** - Standard URL encoding (RFC 3986 percent encoding)\n\n\n\n## Optional Encoding\n\nSome encoders provide the option to select which characters should be encoded (e.g. `url` or `cstring`). Those have a default setting that can be augmented with `--include some_chars` and `--exclude some_chars`.\n\nAdvanced users can specify directly `--regex match_chars` that will override these parameters.\n\n## Global Parameters\n\nThe bulk (`-b`or `--bulk`) parameter makes the encoder process the whole file instead of line by line. This mode can be useful for encoders like **base64** or **md5**.\n\nFor some encoders, the way the input bytes and output bytes are interpreted into strings matter. You can use parameters `--input-charset` and `--output-charset` to set the charsets used by the encoder. They both default to `utf8` which should be fine in most situations.\n\n```bash\necho héllo | usenc url --output-charset utf8\n\u003e h%C3%A9llo\necho héllo | usenc url --output-charset latin1\n\u003e h%E9llo\necho h%E9llo | usenc url -d --input-charset latin1\n\u003e héllo\n```\n\n## Development\n\nSee the [Contributing Guide](https://crashoz.github.io/usenc/development/contributing/) and [How to add an encoder](https://crashoz.github.io/usenc/development/adding-encoders/)\n\n## License\n\nMIT License - see LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrashoz%2Fusenc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrashoz%2Fusenc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrashoz%2Fusenc/lists"}