PyRunes is a transliterator between runes and latin chars. It uses de default runic codes present in unicode.
pip install pyrunes
>>> from runes import to_rune
>>> print(to_rune('a'))
ᚠ
Without the print
, it will return the rune unicode code.
>>> to_rune('a')
u'\u16a8'
>>> from runes import from_rune
>>> from_rune(u'ᚱ')
'r'
The default behavior is to raise an exception if the rune does not exist.
>>> to_rune("q")
...
runes.exceptions.TransliterationDoesNotExist: The transliteration of "q" does not exist.
You can set the errors
argument to 'ignore', so instead of raising a exception, it will return an empty string.
>>> to_rune("q", errors='ignore')
u''
-
The current supported runic alphabet is elder_futhark.
-
Not all latin caracter has a respective rune. The table below shows the available runes.
Rune transliteration ᚨ a ᚦ þ ᛒ b ᛞ d ᛖ e ᚠ f ᚷ g ᚺ h ᛁ i ᛇ ï ᛃ j ᛚ l ᚲ k ᛗ m ᚾ n ᛜ ng ᛟ o ᛈ p ᚱ r ᛋ s ᛏ t ᚢ u ᚹ w ᛉ z
See documentation
See the contributing guide