-
-
Save maartenberg/0ecfcfc6d6b0aac96b9e128a104b511f 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