Skip to main content

uni-translate

Python library to "translate" a variety of unicode special characters to normal text

can be used as a command line util for strings and text files, or as a library for easier and more flexible integration


Lib Examples:

examples can be found in the /examples directory

Lib Documentation:

  • [class] translator

    • [kwarg] Union[dict, List[str]]=None key:

      • key used to contruct a translation table, can be a list of strings contaning 52 characters (one for each letter, upper and lowercase), or a dict contaning key/value pairs that map each character in the key to a character in the value. (default is provided)


    • [kwarg] Union[str, List[str]]=None remove:

      • characters to be stripped during translation (default is provided)


    • [kwarg] (bool)=False debug:

      • toggles debug prints in the __init__


    • [method] translate -> str:

      • [arg] (str) text: text to be translated


    • [method] text_to_unicode -> str:

      • [arg] (str) text: text to be translated

      • [kwarg] (int) mode: translation mode to use, this should correspond to an index in the key


    • [staticmethod] _trans -> str:

      • method to translate text via the given table

      • [arg] (str) text: text to be translated

      • [arg] Union[dict, Union[List[str], Tuple[str]]] table: table to use for translation, when a list or tuple is passed, the first element is treated as the key and the second element is treated as the value. dict should only be passed if it is a valid translation table (as obtained from str.maketrans)


    • [staticmethod] clean_key -> Tuple[str]:

      • returns the key cleaned of "normal" characters and duplicates, and its respective alphabet value

      • [arg] (str) key - key to be cleaned


Command line:

  • uni-translate -t #unicode here

  • paths to text files can be passed aswell, if nothing is passed the user will be prompted

Metadata

Release files for uni-translate 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uni-translate 0.0.5
File Size Uploaded Provenance Actions
uni-translate-0.0.5.tar.gz 19.6 kB Without provenance Details for uni-translate-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for uni-translate 0.0.5
File Interpreter ABI Platform Actions
uni_translate-0.0.5-py3-none-any.whl Python 3 none any Details for uni_translate-0.0.5-py3-none-any.whl

Total release size: 38.9 kB

Release files / uni-translate-0.0.5.tar.gz

Download URL uni-translate-0.0.5.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
acc5dd0ad171b6dcaf13a3ee46bdce8152d6dd4f5f6a7deaa81849e07e489627
BLAKE2b-256 checksum
How to use checksums
7cd08cedfc6f518528a2eb5cc556ca1e9bc0a07feeaf71e162d31cffeab040e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.7

Release files / uni_translate-0.0.5-py3-none-any.whl

Download URL uni_translate-0.0.5-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a1c8dd3258c827fdbdddf671ac67101d4ff7c326bfff47e204713ffc41f7f5a
BLAKE2b-256 checksum
How to use checksums
506953ffec59a26d173333ab31f23bac7f49ddeed2f238fef4ae3beb1539a9a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.7

Security for uni-translate 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page