Skip to main content

Translate fancy text to regular text

Project description

Unfancy text

This program converts "fancy text", that is, text written with an alternative set of Latin characters, such as mathematical alphabet to plain Latin characters.

Usage

Use as commandline interface:

$ python unfancy.py
Press Ctrl+C or Ctrl+D to exit
𝐓𝐡𝐞 𝐪𝐮𝐢𝐜𝐤 𝐛𝐫𝐨𝐰𝐧 𝐟𝐨𝐱 𝐣𝐮𝐦𝐩𝐬 𝐨𝐯𝐞𝐫 𝐭𝐡𝐞 𝐥𝐚𝐳𝐲 𝐝𝐨𝐠
Fancy type: mathematical bold
The quick brown fox jumps over the lazy dog

Use as a library

from unfancy import create_multi_alphabet_map, translate_text

alphabet_map = create_multi_alphabet_map()
# alphabet_map parameter is optional,
# but it is recommended to create it separately to avoid repetition
fancy_text = "𝐓𝐡𝐞 𝐪𝐮𝐢𝐜𝐤 𝐛𝐫𝐨𝐰𝐧 𝐟𝐨𝐱 𝐣𝐮𝐦𝐩𝐬 𝐨𝐯𝐞𝐫 𝐭𝐡𝐞 𝐥𝐚𝐳𝐲 𝐝𝐨𝐠"
unfancy_text, label = translate_text(fancy_text, alphabet_map)

To do

  • Support Greek mathematical alphabets
  • Allow select specific character sets to make translation
  • Package the thing

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

unfancy-1.0.tar.gz (11.7 kB view hashes)

Uploaded Source

Built Distribution

unfancy-1.0-py2.py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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