So, armed with a hex editor and existing EWB files, I attempted to dig a little deeper into their EWB format. Here’s what we know so far:
For my script, I have settled on using Zefania XML - main reason being that the translations I was working with (and many other public domain translations) are readily available in that format (on SourceForge, and also You do not have permission to view the full content of this post. Log in or register now.). You can learn more about Zefania XML on You do not have permission to view the full content of this post. Log in or register now. and You do not have permission to view the full content of this post. Log in or register now..
Of course, that is not to say the script cannot be modified for other scripture formats - if you feel comfortable, knock yourself out! It should hopefully be more straightforward now with assistance below.
- EWB files are just an SQLite database
- Verse metadata and the text itself are separately stored
- Verses are stored as ZLib compressed data in a blob, per book
- Every 8th byte in the ‘verse_info’ attribute of the ‘books’ table represents the Bible translation ID
- Individual words are stored in a lookup table for the ‘search for passages by words or phrases’ functionality to work
- ‘book_info’: Number of chapters in the book, and number of verses in each chapter
- ‘verse_info’: Length of the verse, position of where the verse starts in the text stream, verse number, chapter number, book number, translation ID
For my script, I have settled on using Zefania XML - main reason being that the translations I was working with (and many other public domain translations) are readily available in that format (on SourceForge, and also You do not have permission to view the full content of this post. Log in or register now.). You can learn more about Zefania XML on You do not have permission to view the full content of this post. Log in or register now. and You do not have permission to view the full content of this post. Log in or register now..
Of course, that is not to say the script cannot be modified for other scripture formats - if you feel comfortable, knock yourself out! It should hopefully be more straightforward now with assistance below.
You do not have permission to view the full content of this post. Log in or register now.
Step-by-Step: Properly Install Python (with PATH)