Created
November 2, 2017 07:20
-
-
Save Kronopath/35eb64930d5406243272650f1f199b5b to your computer and use it in GitHub Desktop.
Elian script unicode conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
def elianchar(char): | |
chars = { | |
"a": "𠃍", | |
"b": "コ", | |
"c": "┘", | |
"d": "冂", | |
"e": "口", | |
"f": "凵", | |
"g": "厂", | |
"h": "匚", | |
"i": "𠃊", | |
"j": "ᒣ", | |
"k": "ᓕ", | |
"l": "ᒧ", | |
"m": "ᒉ", | |
"n": "ᑲ", | |
"o": "ᘂ", | |
"p": "ᒥ", | |
"q": "ᓕ", | |
"r": "ᒪ", | |
"s": "ᒭ", | |
"t": "ᓘ", | |
"u": "ᒨ", | |
"v": "ᒕ", | |
"w": "ᑰ", | |
"x": "ᒎ", | |
"y": "ᒕ", | |
"z": "ᓘ", | |
" ": " " | |
} | |
try: | |
return chars[char] | |
except KeyError: | |
return char | |
def elianify(text): | |
return "".join(map(elianchar, text.lower())) | |
try: | |
for line in iter(sys.stdin.readline, ''): | |
print(elianify(line), end='') | |
except KeyboardInterrupt: | |
quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your K is backwards in line 20, shouldn't it be
ᓗ
?