Giter Site home page Giter Site logo

stscoundrel / riimut-java Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 151 KB

Transform latin letters to runes & vice versa. Java version.

Home Page: https://search.maven.org/artifact/io.github.stscoundrel/riimut

License: MIT License

Java 100.00%
futhark futhark-runes futhorc futhorc-runes futhork futhork-runes java maven runes runic

riimut-java's Introduction

Riimut

Transform latin letters to runes & vice versa. Java version.

Includes transformers for four main runic alphabets:

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

Install

As Maven dependency.

<dependency>
  <groupId>io.github.stscoundrel</groupId>
  <artifactId>riimut</artifactId>
  <version>0.5.0</version> <!-- Note! Check latest release number -->
</dependency>

For alternative install methods, see the Maven Central Repo

Usage

Text to runes:

// Ships four runic dialects under Riimut namespace.
import io.github.stscoundrel.riimut.dialects.YoungerFuthark;
import io.github.stscoundrel.riimut.dialects.ElderFuthark;
import io.github.stscoundrel.riimut.dialects.MedievalFuthork;
import io.github.stscoundrel.riimut.dialects.Futhorc;

// They all implement common "Dialect" interface 
import io.github.stscoundrel.riimut.dialects.Dialect;

Dialect youngerFuthark = new YoungerFuthark();
Dialect elderFuthark = new ElderFuthark();
Dialect medievalFuthork = new MedievalFuthork();
Dialect futhorc = new Futhorc();

// From Old Groms runestone.
String content = "auk tani karþi kristna";
String result1 = youngerFuthark.lettersToRunes(content);
System.out.println(result1); // ᛅᚢᚴ:ᛏᛅᚾᛁ:ᚴᛅᚱᚦᛁ:ᚴᚱᛁᛋᛏᚾᛅ

// From 4th century axe in Jutland
String content = "wagagastiz alu wihgu sikijaz aiþalataz";
String result2 = elderFuthark.lettersToRunes(content);
System.out.println(result2); // ᚹᚨᚷᚨᚷᚨᛋᛏᛁᛉ:ᚨᛚᚢ:ᚹᛁᚻᚷᚢ:ᛋᛁᚲᛁᛃᚨᛉ:ᚨᛁᚦᚨᛚᚨᛏᚨᛉ

// From Lord's Prayer, in Old Norse.
String content = "Faðer uor som ast i himlüm, halgað warðe þit nama";
String result3 = medievalFuthork.lettersToRunes(content);
System.out.println(result3); // ᚠᛆᚦᚽᚱ:ᚢᚮᚱ:ᛋᚮᛘ:ᛆᛋᛏ:ᛁ:ᚼᛁᛘᛚᚢᛘ,:ᚼᛆᛚᚵᛆᚦ:ᚠᛆᚱᚦᚽ:ᚦᛁᛏ:ᚿᛆᛘᛆ

// From 8th century Franks Casket, in late West Saxon.
String content = "fisc.flodu.ahofonferg | enberig |";
String result4 = futhorc.lettersToRunes(content);
System.out.println(result4); // ᚠᛁᛋᚳ.ᚠᛚᚩᛞᚢ.ᚪᚻᚩᚠᚩᚾᚠᛖᚱᚷ:|:ᛖᚾᛒᛖᚱᛁᚷ:|

Runes to text:

// All four dialects contain runesToLetters method.
import io.github.stscoundrel.riimut.dialects.YoungerFuthark;

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

System.out.println(latinText); // "auk tani karþi kristna"

Rune variants in Younger Futhark

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

import io.github.stscoundrel.riimut.dialects.YoungerFuthark;

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)

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

// Instance can also be created with default style. Then lettersToRunes will use that style.
YoungerFuthark youngerFutharkLongBranch = new YoungerFuthark(YoungerFuthark.Variant.LONG_BRANCH);
YoungerFuthark youngerFutharkShortTwig = new YoungerFuthark(YoungerFuthark.Variant.SHORT_TWIG);

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

There is also a "staveless" variant of Younger Futhark. However, staveless runes are less trivial to display without custom fonts, so some inscriptions may not be perfect a match. IN lieu of proper runic unicode, they are other characters that have similar shape. For example, the more dot-like notations use braille unicode. Therefore, be extra critical before trusting the staveless variant.

import io.github.stscoundrel.riimut.dialects.YoungerFuthark;

String letters = "fuþoRkhniastbmlR";

// Can be initialized with staveless enum
YoungerFuthark youngerFuthark = new YoungerFuthark(YoungerFuthark.Variant.STAVELESS);

// ...Or called with named method on any Younger Futhark instance.
String staveless = youngerFuthark.lettersToStavelessRunes(letters)

System.out.println(staveless); // ᛙ ╮ ו ˎ ⡄ ᛍ ᚽ ⸜ ᛁ ⸝ ╵ ⸍ ˏ ⠃ ⸌ ⡄ "

// Same style switch exists for staveless too.
youngerFuthark.useStaveless();

What's in the name?

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

riimut-java's People

Contributors

dependabot[bot] avatar stscoundrel avatar

Watchers

 avatar  avatar

riimut-java'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. Probably an overload. Keeps backwards compatibility.

Build/deploy step: excessive logs

May need batch mode or other argument, as right now output is bit too verbose to be useful. Literally 10 thousand or so rows per release

Deploy wont sign the main jar properly

Nexus validation errors:

failureMessage | Invalid Signature: '/io/github/stscoundrel/riimut/0.1.31/riimut-0.1.31.jar.asc' is not a valid signature for 'riimut-0.1.31.jar'.

It is noteworthy that all other files are validared correctly.

This has probably something to do with jar:jar portion of deploy cmd. Without that part it wont sign it at all, but will sign everything else.

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.