This library contains a selection of tools for performing high level operations on the LiberPrimus
from cicada import LiberPrimus
from cicada.gematria import Latin, Runes
# load the lp from file
lp = LiberPrimus()
shift = 0
# for pages 0 - 3 of the lp
for page in lp.pages[0:3]:
# page is a Runes() object so we can do some cool things:
# atbash substitution
page.atbash()
# caesar shift
page.shift(shift)
# use .text to get the contents of a Gematria() object such as Runes()
# Note: it will also convert to str with str(Runes()) or equiv
print("Runes: %s" % page.text)
print("Plaintext: %s" % page.to_latin())
# example of automated shifting
shift += 1
print(Runes("ᚠᚢᚦᚩᚱᚳᚷᚹᚻᚾᛁᛄᛇᛈᛉᛋᛏᛒᛖᛗᛚᛝᛟᛞᚪᚫᚣᛡᛠ").to_latin())
# FUTHORKGWHNIJEOPXZTBEMLINGOEDAAEYIAEA
print(Latin("Hello World!").to_runes())
# ᚻᛖᛚᛚᚩ ᚹᚩᚱᛚᛞ!
print(Latin("How would cicada type question everything?").to_runes().to_latin())
# HOW WOULD CICADA TYPE CWESTION EUERYTHING?
A class for accessing the contents of the Liber Primus
Returns an array of LiberPrimus() objects containing each page
Returns an array of LiberPrimus() objects containing each line
Returns an array of LiberPrimus() objects containing each chapter
Returns an array of LiberPrimus() objects containing each segment
Returns an array of LiberPrimus() objects containing each paragraph
Returns an array of LiberPrimus() objects containing each clause
Returns an array of LiberPrimus() objects containing each word
Returns a Runes() object of the contents
A base class for translating and manipulating the runes
A base class for manipulating text given an alphabet
Runs a substitution cipher where abc is the plain alphabet, and cba is the desired alphabet.
Runs a caesar shift on the contents. alpha
determines if the shift should be on the runic alphabet or the
latin one
Returns the gematria sum of the contents
Returns atbashed contents
Returns integer sum of prime values
returns list of integer sums of prime values for each word
returns list of integer sums of prime values for each line
Converts text contents to runes
Converts text contents to latin
Converts text contents to gematria values
rune_string
: The string of runes from which the object should be initialized
latin_string
: The string of latin characters from which the object should be initialized
hex_string
: The string of hex characters from which the object should be initialized