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 hashes)

Uploaded Source

Built Distribution

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

Uploaded 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