Last active
August 29, 2015 14:21
-
-
Save inky/4ba2ec291249afd6eef6 to your computer and use it in GitHub Desktop.
Traumae in Fuþorc
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
ᚳᛁ ᛉᛁ ᛋᛁ | |
ᛏᛁ ᛞᛁ ᛚᛁ | |
ᛈᛁ ᛒᛁ ᚠᛁ | |
ᚳᚫ ᛉᚫ ᛋᚫ | |
ᛏᚫ ᛞᚫ ᛚᚫ | |
ᛈᚫ ᛒᚫ ᚠᚫ | |
ᚳᚩ ᛉᚩ ᛋᚩ | |
ᛏᚩ ᛞᚩ ᛚᚩ | |
ᛈᚩ ᛒᚩ ᚠᚩ | |
ki xi si | |
ti di li | |
pi bi vi | |
ka xa sa | |
ta da la | |
pa ba va | |
ko xo so | |
to do lo | |
po bo vo |
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 python | |
""" | |
Encode Traumae text into Futhorc runes using the following scheme: | |
c x s i | |
t d l ae | |
p b f o | |
Info on Traumae by @aliceffekt: http://wiki.xxiivv.com/Traumae | |
Recommended font: http://junicode.sourceforge.net | |
Script by @inky. | |
""" | |
LETTERS = 'ktpxdbslviao' | |
RUNES = (u'\u16b3\u16cf\u16c8\u16c9\u16de\u16d2' | |
u'\u16cb\u16da\u16a0\u16c1\u16ab\u16a9') | |
LETTER_TO_RUNE = { L: RUNES[i] for i, L in enumerate(LETTERS) } | |
RUNE_TO_LETTER = { r: LETTERS[i] for i, r in enumerate(RUNES) } | |
CORE_WORDS_TABLE = """\ | |
ki\txi\tsi | |
ti\tdi\tli | |
pi\tbi\tvi | |
ka\txa\tsa | |
ta\tda\tla | |
pa\tba\tva | |
ko\txo\tso | |
to\tdo\tlo | |
po\tbo\tvo | |
""" | |
def encode(unicode_str): | |
return ''.join(LETTER_TO_RUNE.get(c, c) for c in unicode_str.lower()) | |
def decode(unicode_str): | |
return ''.join(RUNE_TO_LETTER.get(c, c) for c in unicode_str.lower()) | |
def print_core_words(): | |
rune_table = encode(CORE_WORDS_TABLE) | |
print(rune_table) | |
print(decode(rune_table)) | |
if __name__ == '__main__': | |
print_core_words() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment