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
.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dressuplite-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33d6a241771d74154d896b1f03cac16cb49389eb268fc98db10f1ab8cdaa9f3 |
|
MD5 | 300f731d35a18cfcd4264da482d11858 |
|
BLAKE2b-256 | c231dc67d4d613eaec9ab887e8d9073e84ad9c34b78573e7aeec0fcbed5349fc |