LZBible is a javascript library to partially load compressed JSON bible chapter to the client browser for further processing, without the need to rely on server-side processing. The compressed data is between 1-10Kb, allowing fast loading for further usage and ideal to be cached for CDN.
- javscript bible app
- mobile application
The tools section contains small apps written in C# to convert csv into json. The program is written to extract bibledatabase.org csv bibles stored as submodule from bibledatabasecsv.
- Add new bible.csv into the db folder, following the same csv format
- Modify the language/SysDefs/bibles_index.csv with new bible entry
- Add books_language.txt following the same format
- Run the program which will generate the files
- Test the sample app that the bibles are loading
- Create separate pull request in bibledatabasecsv and in LzBible
Check the readme inside the tools
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js"></script>
<script type="text/javascript" src="../js/lzbible.js"></script>
var bibles = await LzBible.Init('http://lzbible/db/');
var books = await LzBible.GetBooks(bibles[0]);
var chapters = LzBible.GetChapters(0..65);
var verses = await LzBible.GetPassages(bookIdx, chapterIdx);
var verses = await LzBible.GetPassages(1, 1); // genesis, ch 1
Json compressed in Two Dimentional Array of Book e.g. Gen [ChapterVerses[]]
The file size is ranging 1kb to 56Kb totalling around 1Mb per bible.
(more loading time as oposed to LzwBibles)
The Bz2 files is good for powerful device to decompress bzip2, or for apps to rebuild the database. The files are compressed using SharpZipLib Decompression can be done using Javascript bzip2-js
Sample can be found in sample1
- convert more bibles and update copyrights
- more test cases
- better documentation
- Book index translation
- improve reporisoty speed, as files start accumulating?
- Clean up bible data