Skip to main content

allows to convert ascii to unicode specials including bold italic greek fraktur script

Project description

This script allows to convert ascii to unicode specials including bold italic greek fraktur script.

Examples:

unicoder.py bold foobar
unicoder.py ital foobar
unicoder.py boldital foobar
unicoder.py double foobar
unicoder.py mono foobar
unicoder.py sans foobar
unicoder.py greek foobar
unicoder.py greek FOOBAR
unicoder.py fraktur foobar
unicoder.py boldfraktur foobar
unicoder.py fract 15 1/4
unicoder.py 15 1/4 km/h
unicoder.py value 15 1/4 km/h
unicoder.py thin 15 1/4 km/h
unicoder.py nobr 15 1/4 km/h

This script helps to bold or slanted text to various social media platforms. The nobr thin fract parts are particularly useful for Wikipedia.

RESULT

Just for amusement, this is the result when running the commands shown above. Note that the bold and italic text snippets do not rely on <i> <b> <font> hints or some similar style markup, instead they use different codepoints from the Mathematical Alphanumeric Symbols unicode blocks. Likewise fraktur and greek and double stroke characters are used often in the field of mathematics. The sans and mono are rarely used however.

๐Ÿ๐จ๐จ๐›๐š๐ซ
๐‘“๐‘œ๐‘œ๐‘๐‘Ž๐‘Ÿ
๐’‡๐’๐’๐’ƒ๐’‚๐’“
๐•—๐• ๐• ๐•“๐•’๐•ฃ
๐š๐š˜๐š˜๐š‹๐šŠ๐š›
foobar
ฯ†ฯ‰ฮฒฮฑฯ
ฮฆฮฉฮ’ฮ‘ฮก
๐”ฃ๐”ฌ๐”ฌ๐”Ÿ๐”ž๐”ฏ
๐–‹๐–”๐–”๐–‡๐–†๐–—
15ยผ
15ยผโ€ฏkm/h
15ยผโ€ฏkm/h
15โ€ฏ1/4โ€ฏkm/h
15โ€‡1/4โ€‡km/h

TESTSUITE

Yes, there is a testsuite with more than a hundred unittests for the functions. The module can also be imported as helper to other scripts.

For developers, please use "make check" for the testsuite and do run also the "make type" for mypy typehints checks and "make pep" for pep8 style checks.

Project details


Download files

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

Source Distribution

unicoder-1.0.tar.gz (13.9 kB view details)

Uploaded Source

File details

Details for the file unicoder-1.0.tar.gz.

File metadata

  • Download URL: unicoder-1.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.15

File hashes

Hashes for unicoder-1.0.tar.gz
Algorithm Hash digest
SHA256 57f9968781d228a5b6d967e122fc34494e6bd76e738eef5ab60a7cf482431d6e
MD5 bcda2213e128c47786d4f6fcae3f291a
BLAKE2b-256 9ca6998fc394b193bf37f6a0a0069a0002b0adef54c0632cb3e04377c18c3c7e

See more details on using hashes here.

Supported by

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