Transform latin letters to runes and vice versa
Project description
Riimut
Transform latin letters to runes & vice versa. Python version.
Includes transformers for main runic alphabets and common variants:
- Elder Futhark
- Younger Futhark
- Medieval Futhork
- Futhorc (Anglo-Frisian runes)
- Staveless Futhark
Install
pip install riimut
Usage
Riimut ships four runic dialect modules. Each contains methods for transforming text to runes, or runes to text.
Text to runes:
from riimut import younger_futhark, elder_futhark, medieval_futhork, futhorc, staveless_futhark
# From Old Groms runestone.
content1 = "auk tani karþi kristna"
result1 = younger_futhark.letters_to_runes(content1)
print(result1)# ᛅᚢᚴ:ᛏᛅᚾᛁ:ᚴᛅᚱᚦᛁ:ᚴᚱᛁᛋᛏᚾᛅ
# From 4th century axe in Jutland
content2 = "wagagastiz alu wihgu sikijaz aiþalataz"
result2 = elder_futhark.letters_to_runes(content2)
print(result2) # ᚹᚨᚷᚨᚷᚨᛋᛏᛁᛉ:ᚨᛚᚢ:ᚹᛁᚻᚷᚢ:ᛋᛁᚲᛁᛃᚨᛉ:ᚨᛁᚦᚨᛚᚨᛏᚨᛉ
# From Lord's Prayer, in Old Norse.
content3 = "Faðer uor som ast i himlüm, halgað warðe þit nama"
result3 = medieval_futhork.letters_to_runes(content3)
print(result3) # ᚠᛆᚦᚽᚱ:ᚢᚮᚱ:ᛋᚮᛘ:ᛆᛋᛏ:ᛁ:ᚼᛁᛘᛚᚢᛘ,:ᚼᛆᛚᚵᛆᚦ:ᚠᛆᚱᚦᚽ:ᚦᛁᛏ:ᚿᛆᛘᛆ
# From 8th century Franks Casket, in late West Saxon.
content4 = "fisc.flodu.ahofonferg | enberig |"
result4 = futhorc.letters_to_runes(content4)
print(result4) # ᚠᛁᛋᚳ.ᚠᛚᚩᛞᚢ.ᚪᚻᚩᚠᚩᚾᚠᛖᚱᚷ:|:ᛖᚾᛒᛖᚱᛁᚷ:|
# From Old Norse text in Hög runestone.
content5 = "kuþniutr þru sun lit rita stin þina ak bru kirþi aftiʀ bruþr sina asbiurn ak at kuþlaf"
result5 = staveless_futhark.letters_to_runes(content)
print(result5) # ᛍ╮ו⸜ᛁ╮⸍◟:ו◟╮:╵╮⸜:⸌ᛁ⸍:◟ᛁ⸍⸝:╵⸍ᛁ⸜:וᛁ⸜⸝:⸝ᛍ:ˏ◟╮:ᛍᛁ◟וᛁ:⸝ᛙ⸍ᛁʀ:ˏ◟╮ו◟:╵ᛁ⸜⸝:⸝╵ˏᛁ╮◟⸜:⸝ᛍ:⸝⸍:ᛍ╮ו⸌⸝ᛙ
Runes to text:
# All four dialects contain runes_to_letters function.
from riimut import younger_futhark
runic = "ᛅᚢᚴ:ᛏᛅᚾᛁ:ᚴᛅᚱᚦᛁ:ᚴᚱᛁᛋᛏᚾᛅ"
latin = younger_futhark.runes_to_letters(runic)
print(latin) # "auk tani karþi kristna"
Younger Futhark comes with long branch (Danish) and short twig (Norwegian & Swedish) variants.
from riimut import younger_futhark
letters = "aábcdðeéfghiíjklmnoópqrstþuúvwxyýzåäæöøǫþ"
# Comes with named functions per style.
long_branch = younger_futhark.letters_to_long_branch_runes(letters)
short_twig = younger_futhark.letters_to_short_twig_runes(letters)
print(long_branch) # ᛅᛅᛒᛋᛏᚦᛁᛁᚠᚴᚼᛁᛁᛁᚴᛚᛘᚾᚢᚢᛒᚴᚱᛋᛏᚦᚢᚢᚢᚢᛋᚢᚢᛋᚢᛅᛅᚢᚢᚢᚦ
print(short_twig) # ᛆᛆᛒᛌᛐᚦᛁᛁᚠᚴᚽᛁᛁᛁᚴᛚᛘᚿᚢᚢᛒᚴᚱᛌᛐᚦᚢᚢᚢᚢᛌᚢᚢᛌᚢᛆᛆᚢᚢᚢᚦ
# Default function can also be called with variant enum to define the runeset.
long_branch_result = younger_futhark.letters_to_runes(letters, younger_futhark.Variant.LONG_BRANCH)
short_twig_result = younger_futhark.letters_to_runes(letters, younger_futhark.Variant.SHORT_TWIG)
What's in the name?
"Riimut" is the Finnish word for "runes".
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
riimut-1.3.0.tar.gz
(7.8 kB
view details)
Built Distribution
riimut-1.3.0-py3-none-any.whl
(11.4 kB
view details)
File details
Details for the file riimut-1.3.0.tar.gz
.
File metadata
- Download URL: riimut-1.3.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 886a69c1936c6a4941471398fe3384fbd75fc49c63a4b4d09ce0becd514ae160 |
|
MD5 | a8b11de8a7135f7968f28483a6711a54 |
|
BLAKE2b-256 | 905b7ac13bef0069ba26cd29bebb9bb1d6cb1fb76e947ce67b182737fd4aa88b |
File details
Details for the file riimut-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: riimut-1.3.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a3264efd89ea3a9275e8d446252bc66b23469376deaf9973c730e65a85099eb |
|
MD5 | 118ca8d0f39b00c6cc35646ffb5563af |
|
BLAKE2b-256 | 9094350c25e2db78d56c7194f9d3b3764ed157ccb567fd86ef2833acea5e5e30 |