Skip to content

Go package for generating Sengkala (Javanese Chronogram)

License

Notifications You must be signed in to change notification settings

matriphe/sengkala

Repository files navigation

Sengkala

Sengkala is a Go package for generating sengkala (Javanese chronogram).

It will generate two types of sengkala:

  • Surya Sengkala, a Gregorian (sun) calendar based chronogram
  • Candra Sengkala, a Javanese (moon) calendar based chronogram

Usage Example

package main

import (
    "fmt"

    "github.com/matriphe/sengkala"
)

func main()  {
    // get sengkala for year 2020
    s := sengkala.FromYear("2020")
    // s.SetYear("2021")

    // get surya sengkala
    suryaSengkala := s.GetSuryaSengkala()
    // get year
    fmt.Println(suryaSengkala.GetYear())
    // get sentence
    fmt.Println(suryaSengkala.GetSengkala())
    // get meaning for every word
    // fmt.Println(suryaSengkala.GetMeaning())
    
    // get candra sengkala
    candraSengkala := s.GetCandraSengkala()
    // get year
    fmt.Println(candraSengkala.GetYear())
    // get sentence
    fmt.Println(candraSengkala.GetSengkala())
    // get meaning for every word
    // fmt.Println(candraSengkala.GetMeaning())
}

Results

2020
Talingan Langit Tanpa Nembah
1934
Keblat Naut Kori Semedi

Resource

License

Sengkala is distributed using MIT License.