Freely-Given.org Bible Organisational System (BOS)

Picture of the FG Logo

Introduction

The Bible Organisational System (BOS) is a combination of XML data files and Python3 software modules that handle the basic organisational foundations of internationalised Bible data.

It was first started in 2010 and has been in continual development since then (although only as a hobby project thus far due to other commitments). Some of the initial (and still current) design philosophy can be seen at the OpenScriptures blog. (You should really read that first before proceeding here if want to fully understand the system.) The source code is hosted on the OpenScriptures repository at GitHub.

Philosophy

The Bible Organisational System (BOS) uses hand-crafted XML files to represent the internationalised Biblical data tables (e.g., Books codes, lists of verses per chapter, etc.). However, each data file has a corresponding converter module that does several things:

  1. Reads and tightly checks the XML data files,
  2. Imports the data into Python data structures such as lists and dictionaries for use in BOS and other Python programs, and
  3. Exports the data into various formats, including pickle files (Python), and JSON (Java) for use in programs written in other programming languages.

Main modules

BOS Internal Bible format

Internally, the BOS uses Python objects and data structures to store representations of Bibles. The most important of these are:

  1. InternalBible:
  2. InternalBibleBook (stored in InternalBible.books):
  3. InternalBibleExtra (stored in InternalBibleExtraList): stores extras which are not usually displayed as part of the inline text (such as footnotes, verse cross-references, Strong's numbers, etc.)
  4. InternalBibleEntry (stored in InternalBibleEntryList):
  5. InternalBibleIndex:

Current status

Thus far the BOS is a bit over 70,000 lines of code (plus quite a bit of work invested in the XML data files). It's not optimized for either memory or speed, but merely finished to the minimum standard of getting it to work reliably. Some things are not completed, especially mapping from one versification system to another (via a "reference" versification system). However, it is used in a production environment as the foundation of the Bible Drop Box and thus it has proved rugged enough to load and process several hundred different Bible versions.

BOS is developed on Ubuntu Linux and has had limited testing on Windows. As well as the Bible Drop Box mentioned above, it is also the foundation of the Biblelator Bible editor.

Installation

You need to have Python3 installed on your system. You can run any module in demo mode by starting it with no parameters. You can start any module with the --help parameter to get a list of available parameters. (It's also recommended to start it in debug mode with the --debug command line flag the very first time in order to get extra debugging information in case it fails on your system.) The standard command line parameters for most modules are:

Sample

Here's a sample program out of the Apps folder. Given a folder on your computer, it loads an autodetected Bible (one of several formats) and does one of several possible exports.

BOS Manager

BOSManager.py is a small graphical program which is packaged with the Biblelator Bible editor which allows the user to graphically view the data files from the Bible Organisational System. It's easiest to work through the Biblelator installation instructions here and then to run BOSManager.py rather than Biblelator.py. (It can also be run from within Biblelator.)

Sword Manager

SwordManager.py is a small graphical program which is packaged with the Biblelator Bible editor which allows the user to download and install Sword Bible or commentary modules and view the versified data. It's easiest to work through the Biblelator installation instructions here and then to run SwordManager.py rather than Biblelator.py. (It can also be run from within Biblelator.)

Future plans

Licence

GPLv3 -- see also this quick guide.

This means that you get the program source code, and are even encouraged to change or extend how the programs work.

Notes

Any of our code which is still in proof-of-concept stage and not yet publicly released can be requested using the Contact Page.