Skip to main content

Dependency-free lightweight fork of the package "dressup" to convert strings to use Unicode formatting

Project description

dressuplite

dressuplite is a Python 3.11 package to convert strings to use Unicode formatting. It can for instance replace "words" into "๐”ด๐”ฌ๐”ฏ๐”ก๐”ฐ", "๐Ÿ††๐Ÿ…พ๐Ÿ†๐Ÿ…ณ๐Ÿ†‚", and "๐”€๐“ธ๐“ป๐“ญ๐“ผ". It is a lightweight fork of the original package dressup, but without any third-party runtime dependencies.

As a disclaimer, this package has no association with dressup.

cicd badge

Links

Caption Link
Repo https://github.com/impredicative/dressuplite/
Changelog https://github.com/impredicative/dressuplite/releases
Package https://pypi.org/project/dressuplite/

Development

For software development purposes only, the project can be set up on Ubuntu as below.

make setup-ppa
make install-py
make setup-venv
source ./venv/bin/activate
make install
make test

Installation

Python โ‰ฅ3.11 is required due to the use of tomllib. This is due ot the use of TOML in the original package.

To install, run:

$ pip install dressuplite

Usage

To convert characters:

>>> import dressuplite

>>> dressuplite.convert("Hello", unicode_type="negative circle")
'๐Ÿ…—๐Ÿ…”๐Ÿ…›๐Ÿ…›๐Ÿ…ž'

To show all possible conversions:

>>> import dressuplite

>>> for unicode_type, text in dressuplite.show_all("Hello").items():
...     print(f'{unicode_type.lower()}: {text}')
... 
circle: โ’ฝโ“”โ“›โ“›โ“ž
negative circle: ๐Ÿ…—๐Ÿ…”๐Ÿ…›๐Ÿ…›๐Ÿ…ž
monospace: ๏ผจ๏ฝ…๏ฝŒ๏ฝŒ๏ฝ
math bold: ๐‡๐ž๐ฅ๐ฅ๐จ
math bold fraktur: ๐•ณ๐–Š๐–‘๐–‘๐–”
math bold italic: ๐‘ฏ๐’†๐’๐’๐’
math bold script: ๐“—๐“ฎ๐“ต๐“ต๐“ธ
math double struck: โ„๐•–๐•๐•๐• 
math monospace: ๐™ท๐šŽ๐š•๐š•๐š˜
math sans: ๐–ง๐–พ๐—…๐—…๐—ˆ
math sans bold: ๐—›๐—ฒ๐—น๐—น๐—ผ
math sans bold italic: ๐™ƒ๐™š๐™ก๐™ก๐™ค
math sans italic: ๐˜๐˜ฆ๐˜ญ๐˜ญ๐˜ฐ
parenthesized: โ’ฃโ’ โ’งโ’งโ’ช
square: ๐Ÿ„ท๐Ÿ„ด๐Ÿ„ป๐Ÿ„ป๐Ÿ„พ
negative square: ๐Ÿ…ท๐Ÿ…ด๐Ÿ…ป๐Ÿ…ป๐Ÿ…พ
cute: Hรฉฤบฤบล‘
math fraktur: โ„Œ๐”ข๐”ฉ๐”ฉ๐”ฌ
rock dots: แธฆรซแธทแธทรถ
small caps: สœแด‡สŸสŸแด
stroked: ฤฆษ‡ล‚ล‚รธ
subscript: โ‚•โ‚‘โ‚—โ‚—โ‚’
superscript: แดดแต‰หกหกแต’
inverted: ษฅวืŸืŸo
reversed: Hษ˜โ…ƒโ…ƒo

Character mappings are precomputed and defined in translator.toml.

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

dressuplite-0.1.2.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

dressuplite-0.1.2-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file dressuplite-0.1.2.tar.gz.

File metadata

  • Download URL: dressuplite-0.1.2.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for dressuplite-0.1.2.tar.gz
Algorithm Hash digest
SHA256 23e0b013a7e0770a281dd44352927ee8a45d5fe7fdd9fa6635302e5876623b42
MD5 643280f8ff091864a31d45f511c4c14f
BLAKE2b-256 4642584a10e17fb1cdc0469120d45b3b287b83bf64063a4cc12667147c3ab52d

See more details on using hashes here.

File details

Details for the file dressuplite-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dressuplite-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for dressuplite-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b33d6a241771d74154d896b1f03cac16cb49389eb268fc98db10f1ab8cdaa9f3
MD5 300f731d35a18cfcd4264da482d11858
BLAKE2b-256 c231dc67d4d613eaec9ab887e8d9073e84ad9c34b78573e7aeec0fcbed5349fc

See more details on using hashes here.

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