Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Translate ASCII text into readable non-ASCII text

Project Description

Use deasciiify to translate ASCII text into readable non-ASCII text. It was created for the purpose of test data generation to detect unicode bugs and to use as a fake language on a webpage to simulate how foreign languages can break webpage layouts and whatnot. The output is deterministic to make automated testing easier.

Installation

$ pip install deasciiify

Usage

>>> from deasciiify import deasciiify
>>> print(deasciiify('The quick brown fox jumps over the lazy dog.'))
Ṱḥẹ ʠǚîĉʞ ɓṙōẇṇ ᶂø× ǰúṁᶈș óʋᶒṝ ᵵĥĕ ȴạᵶý ḍọḡ.

>>> # elongate by 50%
>>> print(deasciiify('The quick brown fox jumps over the lazy dog.',
...                  elongate=0.5))
𝕋ȟẹ ʠůḭċḱ ᵬṙồẁñ ḟḟᶂᵮợẋᶍ ǰưḿṁᵱṣᵴṣ ǫṽếṛᵳ ṭħȇ ɫäǎąẩžɀẓẑẕᶎᶎẓẓỹÿŷӮ ḋöᵷ.

>>> # elongate by 100 characters
>>> print(deasciiify('The quick brown fox jumps over the lazy dog.',
...                  elongate=100))
Ʈɦẻ ʠűȋḉƙḱᶄḵḳķʞǩƙḱᶄḵḳ ƀᶉŏẁἦ ƒḟḟᶂḟƒởᶍ×ẍẋᶍ ĵứȗửǔǚṷȕǜûủũṳṹữụṻưṃɱḿṁḿɱḿṁᶈşᵴșŝș
ȫṽḙɽᵳɾŕŕŗȓṙɼᵳȑᵳɽȓȑᶉᵳᶉ ƭẖė ℓἂậẳẩầạẳἇầǡᶏạᶏƶžźƶȥᶎẑᵶżȥᶎẑᶎγƴẏӲӰýỳŷẏγẏỳ ᶑốǥ.

>>> # preserve HTML, entities, and gettext params
>>> print(deasciiify(
...     'The <em>quick</em> <strong style="color:brown;">brown</strong> '
...     'fox %(verb)s over the &ldquo;lazy&rdquo; %s.'))
Ṯȟè <em>ʠúᶖćḵ</em> <strong style="color:brown;">ḃᵲóẅἢ</strong> ḟọẍ %(verb)s
ȏʋềŕ ṱȟḝ &ldquo;ḽӓżӮ&rdquo; %s.

Release History

This version
History Node

0.0.1

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
deasciiify-0.0.1.tar.gz
(6.4 kB) Copy SHA256 Hash SHA256
Source None Sep 19, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting