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
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23e0b013a7e0770a281dd44352927ee8a45d5fe7fdd9fa6635302e5876623b42 |
|
MD5 | 643280f8ff091864a31d45f511c4c14f |
|
BLAKE2b-256 | 4642584a10e17fb1cdc0469120d45b3b287b83bf64063a4cc12667147c3ab52d |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33d6a241771d74154d896b1f03cac16cb49389eb268fc98db10f1ab8cdaa9f3 |
|
MD5 | 300f731d35a18cfcd4264da482d11858 |
|
BLAKE2b-256 | c231dc67d4d613eaec9ab887e8d9073e84ad9c34b78573e7aeec0fcbed5349fc |