Skip to content

IuryAlves/pyrunes

Repository files navigation

Build Status Coverage Status PyPI version

PyRunes

rune snake

PyRunes is a transliterator between runes and latin chars. It uses de default runic codes present in unicode.

Table of contents

  1. Installing
  2. Usage
  3. Notes and Documentation
  4. Contributing

Installing

  pip install pyrunes

Usage

To rune

>>> 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 rune

>>> from runes import from_rune
>>> from_rune(u'ᚱ')
'r'

Exceptions

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''

Notes and Documentation

Notes

  • 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

Documentation

See documentation

Contributing

See the contributing guide

About

Transliterate latin characters into runes

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages