bibleTools

Bible tools to manipulate bible references!

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 1.2.5
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:25

Authors

  • Thiago Navarro

Installation

nimble install bibleTools
choosenim install bibleTools
git clone https://github.com/thisago/bibleTools

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
bibleTools - - - - - - -

Dependencies

Package Version Optional
nim >= 1.6.4 No
util - No

Source

Repository https://github.com/thisago/bibleTools
Homepage https://github.com/thisago/bibleTools
Registry Source nimble_official

README

# **Bible Tools** Bible tools to manipulate bible references! [Examples](#examples) - [TODO](#todo) - [License](#license)

Examples

For more examples, please see the tests

Identify books

doAssert "second bar".identifyBibleBookEn == Baruk2
doAssert "ex".identifyBibleBookEn == Exodus
doAssert "Jo".identifyBibleBookPt == John

Smart book identification

doAssert "second bar".identifyBibleBook == (Baruk2, ALEnglish)
doAssert "tg".identifyBibleBook == (James, ALPortuguese)
doAssert "1ts".identifyBibleBook == (book: Thessalonians1, lang: ALPortuguese)

Parse verse

doAssert "Mt 5:17-20".parseBibleVerse == BibleVerse(
  book: AnyLangBook (Matthew, ALPortuguese),
  chapter: 5,
  verses: @[17, 18, 19, 20],
  translation: "",
  error: false
)

Parse multiple verses

from pkg/bibleTools import ALPortuguese, ALEnglish
let found = "Gen 1:1; exod 2:2; Lv 3:3".parseBibleVerses
doAssert found[2].parsed.book.lang == ALPortuguese
doAssert found[0].parsed.book.lang == ALEnglish
doAssert $found[1].parsed == "Exo 2:2"
doAssert found[1].raw == "exod 2:2"

Stringify verse

doAssert $BibleVerse(
  book:  (Proverbs, ALPortuguese),
  chapter: 29,
  verses: @[27],
  translation: "",
  error: false
) == "Pv 29:27"

To Ozzuu Bible URL

doAssert "Revelation 14:12".parseBibleVerse.inOzzuuBible("en_wyc2014") ==
  "https://bible.ozzuu.com/en_wyc2014/Rev/14#12"

More examples!

Please see the tests files to see more examples!

TODO

  • [ ] Add documentation
  • [-] Add missing hebrew book names
  • [ ] Add hebrew transliteration book identification
  • [x] Add a function to get the short version of a book

License

MIT