Skip to main content

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.2.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

riimut-1.2.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file riimut-1.2.0.tar.gz.

File metadata

  • Download URL: riimut-1.2.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.13

File hashes

Hashes for riimut-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ace18ade653a27755c065817ed1363da677f66a66d86836155ecb7b1beb80d9a
MD5 f5e9eb82374adf9b3fde4e1d89cab69d
BLAKE2b-256 0a06d60130622818a5446e02106ca4ebd52378af3bac2ec1a7dde81a120b8a88

See more details on using hashes here.

File details

Details for the file riimut-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: riimut-1.2.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.13

File hashes

Hashes for riimut-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bdb6c5d190db648ced2bc70b6381675bf9d73aa2410b78460951aef76fe4624
MD5 aeb3e48b8438d26fc6c753e57c1141cb
BLAKE2b-256 4ceb066f7fdf5351ba8703b82ace9d07a848d5d3a16219a80f163d96762daac4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page