Once in a while, or weirdness, some strange package or project would show up somewhere. weirdify is yet another weird proof. From its README:
Weirdify input text
$ python3 weirdify.py Make this text look stupid Ⓜªₖᵉ ᵗℎⁱₛ ₜᵉⅹⓣ ⓛⓞᵒₖ ⓢⓣᵘₚⁱⅾ
Before I checked the source code, I thought it probably had a huge list of mapping for the characters, but, no. The entire code only has 38 lines including blank lines. It turns out there is already a standard Python module for Unicode data called unicodedata. Of which, it utilizes the normalize function with NFKD form to convert the characters:
The normal form KD (NFKD) will apply the compatibility decomposition, i.e. replace all compatibility characters with their equivalents.
While skimming over the code, another caught my eyes, the os.EX_USAGE, which probably was first time I have seen in being used in Python code. I recognized it because I knew a few C code uses that.
Not sure if this has any usefulness outside of weird or stupid domains. Maybe in chat room, like this?
Kªₚₚⓐ Kᵃₚᵖⓐ Kₐⓟᵖₐ Ⓚₐⓟᵖₐ Kªᵖⓟª
weirdify is written in Python 3 by Sebastian Hanula under the GPLv2.
Ⓐⓡⓔ ⓨₒⓤ ₛᵗⓤⓟⓘⓓ ᵒⓡ ⓦℎₐₜ?
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.