Skip to main content

A set of tools for converting between OSIS abbreviations and localized biblical book names

Project description

OSIS Book Tools

This packages contains tools for converting between OSIS abbreviations (both IDs and paratext abbreviations) for books in the canonical Old and New Testaments and localized book names.

The core of this is a sqlite database which does all the mappings, and ensures basic data integrity. Data is currently loaded once during module init. After that, all operations are in-memory.

This abbreviations were compiled from https://wiki.crosswire.org/OSIS_Book_Abbreviations (fetched 2019-03-25).

Usage Examples

Reference a book via enumeration value

OSISBook.Gen    # Genesis
OSISBook._1Sam  # 1 Samuel (note the leading underscore to make the identifier valid)

Construct a book from a paratext value

OSISBook.from_paratext("GEN")

Get the paratext abbreviation for a book

OSISBook.Gen.paratext_abbreviation

Get the localized name of a book

This function expects the shortest possible ISO 639 code available for the language. English is guaranteed to be available, so use this as a fallback.

OSISBook.Gen.localized_name("en")

Get the localized chapter descriptor for a book

This function returns the chapter descriptor, which may be slightly different from the name. Use this when constructing a reference string. For example, you write Psalm 23, not Psalms 23. This is the difference between localized_name and chapter_descriptor.

Like localized_name, this function expects the shortest possible ISO 639 code available for the language. English is guaranteed to be available, so use this as a fallback. If a localized name exists, a chapter descriptor must also exist.

OSISBook.Gen.chapter_descriptor("en")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osis_book_tools-1.0.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osis_book_tools-1.0.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file osis_book_tools-1.0.1.tar.gz.

File metadata

  • Download URL: osis_book_tools-1.0.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for osis_book_tools-1.0.1.tar.gz
Algorithm Hash digest
SHA256 59cb8f6f1c61c749ee376a48335fe08cc0112aa714982eea2ccbe580f0ff68ee
MD5 ffee17f58040a2a7d19358b014878998
BLAKE2b-256 52d353dd985aeb1d92fcdd8d06d06c8cf277483c2343f1fc1a70b3a775ee67d6

See more details on using hashes here.

File details

Details for the file osis_book_tools-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: osis_book_tools-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for osis_book_tools-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ebe5df6910ac8238ab5443a08a761bff034b034a96de9df2ad6a77446614f40
MD5 4ed27871059e28a229dadfd4a7815e91
BLAKE2b-256 19255799adfa561b26a7d649968958a15256b4d75fad2ad00a664cf6282109d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page