Skip to content

PonteIneptique/mufidecode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mufidecode

Transliterate Unicode text into plain 7-bit ASCII with Medieval flavor.

from mufidecode import mufidecode
from unidecode import unidecode

string = " soffroient Torm̃z⁊"
assert unidecode(string) == " soffroient Tormz7"  # Lostfirst character, et is converted to seven.
assert mufidecode(string) == "et soffroient Tormzet"
assert mufidecode(string, join=False) == ('et', ' ', 's', 'o', 'f', 'f', 'r', 'o', 'i', 'e', 'n', 't', ' ', 'T', 'o', 'r', 'm', 'z', 'et')


assert mufidecode("ꝮꝯꝮꝯ") == "usususus"

Add a new token

1. Get the code

string = "ꝯ"
print((ord(string) >> 8, ord(string) % 256))
# (167, 111)

2. Add the code to MUFI

MUFI[(167, 111)] = "us"  # Accepted transliteration

3. Pull Request

4. Enjoy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published