sbrcli

sbrcli is an experimental build with an ambition to support Simple Bible Reader on multiplatform including Linux and Mac without much change to the code base which is written in C#. Due to lack of GUI/Windows Forms support on non-Windows platforms by .NET Core, the software is CLI based and archived.

The multi-platform console version of Simple Bible Reader. This open-source software is aimed to be simple command-line to convert from/to all available bible formats. It is developed to bridge the gap between multiple Bible software so that the user can choose their favourite Bible software and import/export of favourite Bible translation through this software. The software allows to import and export from/to any supported Bible format.

Screenshot:

Supported formats:

  • Bibles – Zefania XML Bibles4, The Unbound Bible (Unmapped-BCV, Mapped-BCVS, Unmapped-BCVS), Open Scripture Information Standard (OSIS), General Bible Format (GBF), XML Scripture Encoding Model (XSEM), The Word Bible Modules (ONT, ONTX, OT, OTX, NT and NTX)2, e-Sword Bible Modules (BBLX, BBLI)4, Unified Scripture Format XML (USFX), The SWORD Project1,4 , Verse Per Line (VPL), Go Bible, Theological Markup Language (ThML), Open Song Bibles (XMM, OpenLP.org Bibles, Bible Companion (BIB), MySword for Android, Bible Analyzer (BIB), MP3 Bibles, LOGOS Import (DOCX), Online Bibles, PalmBible+, HeavenWorld Bibles for Windows 8, VerseVIEW, MyBible4, SwordSearcher.
  • Commentaries – XML Format, SWORD Commentary Modules (ZIP), The Word (cmt.twm), e-Sword 9.x and above (CMTX), MySword for Android, Bible Analyzer (CMT), OnlineBible Commentaries, MyBible, SwordSearcher.
  • Dictionaries – Zefania Dictionary Format (XML), SWORD Dictionary Modules (ZIP), The Word (dct.twm), e-Sword 9.x and above (DCTX), MySword for Android, Bible Analyzer (DCT), MyBible, SwordSearcher.
  • Books/topics – XML Format (XML), The Word (gbk.twm), e-Sword 9.x and above (TOPX/REFX)3, SWORD Book Modules (ZIP), MySword for Android, Bible Analyzer (BK), STEP Modules, SwordSearcher

1 The SWORD Project from CrossWire Bible Society has many software applications that can open on various platforms. They mostly use the same bible format. You can export and use them in any of the SWORD Applications which runs on various platforms.
2 The Word format also supports Android’s Open Bible.
3 Export is only of TOPX (Topics) type which can be converted to REFX (Reference Library) by Ctrl+right click on e-Sword Topic interface itself.
4 Supports Bible modules with Apocrypha/Deuterocanonical books.

License: Public Domain

Version:  1.0.0.2

Latest Release:  3-Sep-2023

Release Notes

  • 1.0.0.2
    • SWORD bible on windows doesn’t use the Sword Engine – fixed.
  • 1.0.0.1
    • Export to the SWORD project bible hangs – fixed.
    • Custom abbreviation, description, information can be set.
    • Custom parser options using regular expression plugins and/or scripts.
    • Important bug fix that prevents conversion on several formats.
  • 1.0.0.0
    • Initial release.
    • Same code-base as Simple Bible Reader v5.4.1 with components not supported for cross-platform compatibility removed. i.e, eSword 8.x, EasySlides.
    • Supports multiple platforms

Downloads:

Below downloads are self-contained and does not have any prerequisites.

Windows x86sbrcli-1.0.0.2_win-x86.zip (45.19 MB)
Windows x64sbrcli-1.0.0.2_win-x64.zip (49.28 MB)
Linux x641sbrcli-1.0.0.2_linux-x64.tar.gz (32.33 MB)

Below downloads require .Net Runtime 6 installed to run.

Windows x64sbrcli-1.0.0.2_win-x64_dotnet6.zip (17.93 MB)
Linux x641sbrcli-1.0.0.2_linux-x64_dotnet6.tar.gz (2.21 MB)
MacOS x641sbrcli-1.0.0.2_osx-x64_dotnet6.zip (1.84 MB)

1 Does not come with native SWORD Engine libraries. They can be installed seperately if the operating system supports (e.g., Linux). If not installed, Cross-Connect libraries will be used to handle SWORD modules.

Source Code: sbrcli-1.0.0.2_src.zip (1.53 MB)

Command Line Usage:

Syntax:
    sbrcli [Options]

Below are the list of supported options:

--format-type [Format-Type]
Format type defines if the conversion is a bible, commentary, dictionary or a book. The following values are accepted. This is optional. If not specified, the default value is BIB.
    BIB - Bible
    CMT - Commentary
    DCT - Dictionary
    BOK - Book

--input-format <Format-Value>
Refer Format Values section.

--input-file <Input-File>
Absolute or relative input file path.

--output-format <Format-Value>
Refer Format Values section.

FORMAT VALUES:
The following format values are supported for --input-format or --output-format. This is optional. If not specified, the default value for --input-format is auto detect based on file extension and the default value for --output-format is 1 (Zefania XML).
Format values for bible (format type BIB)
	0 - Auto Detect
	1 - Zefania XML Bibles (*.xml)
	2 - The Unbound Bible (Unmapped-BCV) (*.txt)
	3 - The Unbound Bible (Unmapped-BCVS) (*.txt)
	4 - Open Scripture Information Standard (OSIS) (*.xml)
	5 - General Bible Format (GBF) (*.gbf)
	6 - XML Scripture Encoding Model (XSEM) (*.xml)
	7 - The Word Bible  (*.ont, *.ot, *.nt, *.ontx, *.otx, *.ntx)
	9 - e-Sword Bible 9.x and above (BBLX) (*.bblx)
	10 - e-Sword HD Bible (BBLI) (*.bbli)
	11 - The SWORD Project (*.zip)
	12 - Verse Per Line (*.vpl)
	13 - Bible Companion (*.bib)
	14 - Go Bible (*.jar)
	15 - Theological Markup Language (ThML) (*.xml, *.thm, *.thml)
	16 - Open Song Bibles (*.xmm, *.xml)
	17 - OpenLP.org Bibles (*.sqlite)
	18 - MySword for Android (*.bbl.mybible.gz, *.bbl.mybible)
	19 - Bible Analyzer Bibles (*.bib)
	22 - LOGOS Import File (*.docx)
	23 - OnlineBible (*.exp)
	24 - Palm Bible+ (*.pdb)
	25 - HeavenWorld Bibles for Windows 8 (*.hbb)
	26 - VerseVIEW (*.xml, *.db)
	27 - MyBible (*.SQLite3, *.sqlite3)
	28 - Unified Scripture Format XML (USFX) (*.xml)
	29 - SwordSearcher/Forge for SwordSearcher (*.ss5bible, *.ss6bible, *.ss7bible, *.ss8bible, *.txt
Format values for commentary (format type CMT)
	0 - Auto Detect
	1 - Zefania XML Format (*.xml)
	2 - SWORD Commentary Modules (*.zip)
	3 - The Word Commentary Modules (*.cmt.twm)
	5 - e-Sword 9.x and above (CMTX)  (*.cmtx)
	6 - e-Sword HD (CMTI)  (*.cmti)
	7 - Bible Analyzer Commentary (*.cmt)
	8 - OnlineBible Commentary (*.exp)
	9 - MyBible Commentary (*.commentaries.SQLite3, *.commentaries.sqlite3)
	10 - SwordSearcher/Forge for SwordSearcher (*.ss5cmty, *.txt)
	11 - MySword for Android (*.cmt.mybible.gz, *.cmt.mybible
Format values for dictionary (format type DCT)
	0 - Auto Detect
	1 - Zefania XML Dictionaries (*.xml)
	3 - e-Sword 9.x and above Dictionary Modules (*.dctx)
	4 - e-Sword HD Dictionary Modules (*.dcti)
	5 - The Word Dictionary Modules (*.dct.twm)
	6 - SWORD Dictionary Modules (*.zip)
	7 - MySword for Android (*.dct.mybible.gz, *.dct.mybible)
	8 - Bible Analyzer Dictionary (*.dct)
	9 - MyBible Dictionary (*.dictionary.SQLite3, *.dictionary.sqlite3)
	10 - SwordSearcher/Forge for SwordSearcher (*.ss5book, *.txt
Format values for book (format type BOK)
	0 - Auto Detect
	1 - XML Books (*.xml)
	2 - The Word Bible Books (*.gbk.twm)
	4 - e-Sword Bible 9.x Topics / References (*.topx *.refx)
	5 - e-Sword Bible HD References (*.refi)
	6 - SWORD Book Modules (*.zip)
	7 - Bible Analyzer Book (*.bk)
	8 - MySword for Android (*.bok.mybible.gz, *.bok.mybible)
	9 - STEP Files (BOOK.DAT)
	10 - SwordSearcher/Forge for SwordSearcher (*.ss5book, *.txt)

--output-file <OutputFile>
Absolute or relative output file path.

--metadata-abbr <Abbreviation>
Specify abbreviation on output file if the format supports. Default is the abbreviation found in input file.

--metadata-desc <Description>
Specify description on output file if the format supports. Default is the description found in input file.

--metadata-comment <Comment>
Specify comment/note/information on output file if the format supports. Default is 'Exported from sbrcli application'.

--custom-parser [Custom parser script]
Provide a custom parser as a (Regular Expression Plugin) .rxp plugin or as a batch/shell script. For batch/shell scripts, the input verse will be in VERSE_IN environment variable and the script output in console will be captured as parsed output. Please refer to customer parser documentation

--clean [true or false]
Parses and clean RTF tags for Bibles and Books while exporting. Value can be either true or false. This is optional and default is true.

--log [File Path, console or nolog] 
Log file path. This is optional and default is console.

PREFERENCES:
The following options are optional and common for all format types. The default is true.
--parse [true or false]
Enables parsing of input text. If set to false, the output will have raw data as provided in input.

--autoset-parsing [true or false]
Auto parsing allows the program to automatically set parsing options (rtf/html/strip tag etc) based on input type. This option will be ignored if --parse is set to false.

--convert-rtf-to-html [true or false]
Converts RTF to HTML in output. This option will be ignored if either --parse or --autoset-parsing is set to false.

--convert-html-to-rtf [true or false]
Converts HTML to RTF in output. This option will be ignored if either --parse or --autoset-parsing is set to false.

--strip-html-tags [true or false]
Strips HTML tags from output. This option will be ignored if either --parse or --autoset-parsing is set to false.

--sword-versification [Versification]
The following options for sword versification is valid on Windows. On Linux platforms, they are valid only if sword engine (libsword) is installed. If the sword engine is not installed, cross-connect library will be used with no apographa and only KJV versification support. The below options are optional and only available for bible format type. i.e., BIB. If no versification is provided, the default KJVA versification will be used. The below mentioned versifications are supported.
    KJV         - King James Version
    CALVIN      - French Bible d'Olivétan and followers, 1560+ Bible de Genève, 1707-1855, etc. 
    CATHOLIC    - Catholic Bibles with 10 chapters in Esther
    CATHOLIC2   - Catholic Bibles with 16 chapters in Esther
    DARBYFR     - French Bibles by J.N. Darby
    GERMAN      - Identical to Luther, but without the deuterocanonical books and with Vulgate/KJV book order.
    KJVA        - KJV + Apocrypha
    LENINGRAD   - Leningrad Codex, the book order is different
    LUTHER      - Luther
    LXX         - Greek LXX & translations of the LXX
    MT          - Masoretic Text for Hebrew Bibles
    NRSV        - New Revised Standard Version
    NRSVA       - NRSV + Apocrypha
    ORTHODOX    - LXX, but different book order with fewer books
    SEGOND      - French Bibles L. Segond 1880, 1910, 1978, 2002 (NBS), 2007 (SG21)
    SYNODAL     - Russian Synodal Bible and related Bibles
    SYNODALPROT - The ParaText Synodal Protestant used by IBT for Bibles having protocanonical books only
    VULG        - Vulgate

--add-red-text [true or false]
Adds red text styling for word of Jesus Christ.

--debug [true or false]
Prints debug messages to log.

E.g.,
    sbrcli --format-type bib --input-file kjv.ont --output-file kjv.bbl

Custom Parser Documentation

Custom parsers allow parsing every verse (or content for other format types) individually before exporting. If parsing options are set to true, the software will parse the text prior to sending content to custom parser. To stop this behavior, you must set parsing options to false. Custom parser can be either a regular expression plugin which is faster or a script which is slower. Custom parser can be set using –custom-parser parameter.

Plugin

Each plugin is a simple text file with extension .rxp (Regular Expression Plugin) that has multiple lines, in which if a line specifies the pattern to match then the next line specifies the replacement content, in regular expression. Any line which starts with # is treated as a comment.

E.g.,

# sbrcli Plugin
# Converts God to GOD
God
GOD

Scripts

The input verse (or content for other format types) will be set in an environment variable called VERSE_IN. The script will use this VERSE_IN environment variable as the input and outputs the parsed verse or content to console. This console output will be captured by the software as parsed text.

E.g.,

@ECHO OFF
REM Converts God to GOD
SET FIND=God
SET REPLACE=GOD
CALL SET VERSE_IN=%%VERSE_IN:%FIND%=%REPLACE%%%
ECHO %VERSE_IN%

It is important to note that the script can be of any script or binary. E.g, bash, powershell, python or even a executable binary. As long as it can process input variable VERSE_IN and provides console output, it can be used.