There are a bunch of interesting unicode charters. What's cool is that since most devices and applications support them, you can use them to hack some extra expressivity in traditionally limited platforms. A terminal is a great example of this. Typically thought of as an environment where you only send and receive text, groups like Textual and Charm use unicode characters to build entire UIs in the terminal. Projects like viu will even use characters to draw images in your terminal. It's also just fun to use them over limited chat apps like SMS to bring some ๐ ด๐ ผ๐ ฟ๐ ท๐ ฐ๐๐ ธ๐ แดแด ๐๐ธ๐พ๐ป ๐๐๐๐๐.
But, these Unicode characters are a pain to access.
I wanted an easy way to programmatically use some of these unique characters to spell words in Unicode characters.
Dress up is a command-line interface and Python library
that allows you to convert normal characters into special Unicode versions.
It maps the characters you know into their Unicode counterparts.
For example, Lorep ipsum
can become:
Style | Conversion |
---|---|
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 | ฤนลลรฉแน รญแนลรบแธฟ |
Math fraktur | ๐๐ฌ๐ฏ๐ข๐ญ ๐ฆ๐ญ๐ฐ๐ฒ๐ช |
Rock dots | แธถรถแนรซแน รฏแนแนกรผแน |
Small caps | สแดสแดแดฉ ษชแดฉ๊ฑแดแด |
Stroked | ลรธษษแตฝ ษจแตฝsแตพm |
Subscript | โโแตฃโโ แตขโโแตคโ |
Superscript | แดธแตสณแตแต โฑแตหขแตแต |
Inverted | ืoษนวd ฤฑdsnษฏ |
Reversed | โ oแดษq iq๊ um |
For quick and convenient access, these conversions can be accessed through a command line-interface.
For use in other applications, there is also a Python API:
>>> import dressup
>>> dressup.convert("Hello", unicode_type="negative circle")
'๐
๐
๐
๐
๐
'
Dress up also serves as a demonstration of what I think are the current best practices in Python development. It features strong linting via flake8 and select plugins high test coverage pytest generated documentation via Sphinx, and type hinting. All ran through a CI/CD framework powered by Nox and GitHub Actions.