Giter VIP home page Giter VIP logo

riimut-cs's Introduction

Riimut

Transform latin letters to runes & vice versa. C# version.

Includes transformers for five main runic alphabets:

  • Elder Futhark
  • Younger Futhark
  • Medieval Futhork
  • Futhorc (Anglo-Frisian runes)
  • Staveless Futhark

Install

dotnet add package Riimut

Usage

Text to runes:

// Ships four runic dialects under Riimut namespace.
using Riimut;

// From Old Groms runestone.
string content = "auk tani karþi kristna";
Dialect youngerFuthark = new YoungerFuthark();
string result = youngerFuthark.LettersToRunes(content);
Console.WriteLine(result); // ᛅᚢᚴ:ᛏᛅᚾᛁ:ᚴᛅᚱᚦᛁ:ᚴᚱᛁᛋᛏᚾᛅ

// From 4th century axe in Jutland
string content = "wagagastiz alu wihgu sikijaz aiþalataz";
Dialect elderFuthark = new ElderFuthark();
string result = elderFuthark.LettersToRunes(content);
Console.WriteLine(result); // ᚹᚨᚷᚨᚷᚨᛋᛏᛁᛉ:ᚨᛚᚢ:ᚹᛁᚻᚷᚢ:ᛋᛁᚲᛁᛃᚨᛉ:ᚨᛁᚦᚨᛚᚨᛏᚨᛉ

// From Lord's Prayer, in Old Norse.
string content = "Faðer uor som ast i himlüm, halgað warðe þit nama";
Dialect medievalFuthork = new MedievalFuthork();
string result = MedievalFuthork.LettersToRunes(content);
Console.WriteLine(result); // ᚠᛆᚦᚽᚱ:ᚢᚮᚱ:ᛋᚮᛘ:ᛆᛋᛏ:ᛁ:ᚼᛁᛘᛚᚢᛘ,:ᚼᛆᛚᚵᛆᚦ:ᚠᛆᚱᚦᚽ:ᚦᛁᛏ:ᚿᛆᛘᛆ

// From 8th century Franks Casket, in late West Saxon.
string content = "fisc.flodu.ahofonferg | enberig |";
Dialect futhorc = new Futhorc();
string result = futhorc.LettersToRunes(content);
Console.WriteLine(result); // ᚠᛁᛋᚳ.ᚠᛚᚩᛞᚢ.ᚪᚻᚩᚠᚩᚾᚠᛖᚱᚷ:|:ᛖᚾᛒᛖᚱᛁᚷ:|

// From Old Norse text in Hög runestone.
string content = "kuþniutr þru sun lit rita stin þina ak bru kirþi aftiʀ bruþr sina asbiurn ak at kuþlaf";
Dialect staveless = new StavelessFuthark();
string result = staveless.LettersToRunes(content);
Console.WriteLine(result); // ᛍ╮ו⸜ᛁ╮⸍◟:ו◟╮:╵╮⸜:⸌ᛁ⸍:◟ᛁ⸍⸝:╵⸍ᛁ⸜:וᛁ⸜⸝:⸝ᛍ:ˏ◟╮:ᛍᛁ◟וᛁ:⸝ᛙ⸍ᛁʀ:ˏ◟╮ו◟:╵ᛁ⸜⸝:⸝╵ˏᛁ╮◟⸜:⸝ᛍ:⸝⸍:ᛍ╮ו⸌⸝ᛙ

Runes to text:

// All four dialects contain RunesToLetters method.
using Riimut;

string runicText = "ᛅᚢᚴ:ᛏᛅᚾᛁ:ᚴᛅᚱᚦᛁ:ᚴᚱᛁᛋᛏᚾᛅ";
Dialect youngerFuthark = new YoungerFuthark();
string latinText = youngerFuthark.RunesToLetters(runicText);

Console.WriteLine(latinText); // "auk tani karþi kristna"

Rune variants in Younger Futhark:

Younger Futhark comes with long branch (Danish) and short twig (Norwegian & Swedish) variants.

using Riimut;

string letters = "aábcdðeéfghiíjklmnoópqrstþuúvwxyýzåäæöøǫþ";
YoungerFuthark youngerFuthark = new YoungerFuthark();

// Comes with named methods per style.
string longBranch = youngerFuthark.LettersToLongBranchRunes(letters);
string shortTwig = youngerFuthark.LettersToShortTwigRunes(letters);

Console.WriteLine(longBranch); // ᛅᛅᛒᛋᛏᚦᛁᛁᚠᚴᚼᛁᛁᛁᚴᛚᛘᚾᚢᚢᛒᚴᚱᛋᛏᚦᚢᚢᚢᚢᛋᚢᚢᛋᚢᛅᛅᚢᚢᚢᚦ"
Console.WriteLine(shortTwig); // ᛆᛆᛒᛌᛐᚦᛁᛁᚠᚴᚽᛁᛁᛁᚴᛚᛘᚿᚢᚢᛒᚴᚱᛌᛐᚦᚢᚢᚢᚢᛌᚢᚢᛌᚢᛆᛆᚢᚢᚢᚦ

// Instance can also be created with default style. Then LettersToRunes will use that style.
YoungerFuthark youngerFutharkLongBranch = new YoungerFuthark(YoungerFuthark.Variant.LongBranch);
YoungerFuthark youngerFutharkShortTwig = new YoungerFuthark(YoungerFuthark.Variant.ShortTwig);

// Or you can switch the style of instance at will.
youngerFutharkLongBranch.EnableShortTwig();
youngerFutharkShortTwig.EnableLongBranch();

What's in the name?

"Riimut" is the Finnish word for "runes".

riimut-cs's People

Contributors

dependabot[bot] avatar stscoundrel avatar

Watchers

 avatar  avatar

riimut-cs's Issues

Younger Futhark: add short twig runes

Currently Younger Futhark always transcribes text to long twig runes. Note: runes to text does transform short twigs too, does not need edits.

  • Offer separate methods for separate rune sets.
  • Alter current methods to accept rune dialect, which defaults to current long branch. Keeps backwards compatibility.

Package with readme & desc

NuGet seems to be wasteland of souls that does not pick anything automatically. Provide it with readme & desc of the package

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.