This piece of software takes an html bible (generated with Haiola), and converts these to a JSON file of "verses by paragraph".
An example of the output is as follows:
{
"Genesis": {
"01": [
[1, 2],
[3, 4, 5],
[6, 7, 8],
[9, 10, 11, 12, 13],
[14, 15, 16, 17, 18, 19],
[20, 21, 22, 23],
[24, 25],
[26, 27, 28, 29, 30]
]
}
}
This dataset was taken from the World English Bible British Edition (because these Bibles are in the public domain).
> python .\main.py -h
usage: main.py [-h] --folder FOLDER --xmlname XMLNAME
A software for getting verse positions by paragraph
optional arguments:
-h, --help show this help message and exit
--folder FOLDER, -f FOLDER
choose the folder with the bible dataset
--xmlname XMLNAME, -x XMLNAME
select the name of the xml file (don't pass a path)
For example, on the World English Bible British Edition:
> python .\main.py -f .\engwebpb_html\ -x engwebpb-VernacularParms.xml
This software has ONLY been tested on the "World English Bible British Edition" because that is the bible I was analysing this text!
- Choose a copy of the bible from ebible.org's download page. I personally chose WEBPB.
- Download the "Zipped mobile HTML" file. For WEBPB this was:
engwebpb_html.zip
. - Note down from this website the
ID
of your bible: - Unzip this folder into a folder with the same name, i.e:
.\engwebpb_html
- Download a copy of CR_bible and extract it to your downloads folder. This created a folder called
CR_bible-master
for me. - Copy this folder to the same directory as CR_bible (the
CR_bible-master
folder) - Open a powershell in this folder (Shift+Right-Click
Open PowerShell window here
) - Execute the following command:
> python .\main.py -f .\<folder including bible>\ -x <bible ID>-VernacularParms.xml
For the WEBP:
> python .\main.py -f .\engwebpb_html\ -x engwebpb-VernacularParms.xml
- Now you have this JSON, you can use this in your own projects, or you can move the
dataset.json
file into the same folder as bible-maker and execute the following command:
> python .\main.py -p .\dataset.json -o .\<bible>.txt