Tools for converting Bibles from USFM to OSIS XML
Usage: usfm2osis <osisWork> [OPTION] ... <USFM filename|wildcard> ...
-h, --help print this usage information
-d debug mode (single-threaded, verbose output)
-e ENCODING input encoding override (default is to read the USFM file's
\ide value or assume UTF-8 encoding in its absence)
-o FILENAME output filename (default is: <osisWork>.osis.xml)
-r enable relaxed markup processing (for non-standard USFM)
-s MODE set book sorting mode: natural (default), alpha, canonical,
usfm, random, none
-t NUM set the number of separate processes to use (your maximum
thread count by default)
-l LANG set the language value to a BCP 47 code (\'und\' by default)
-v verbose feedback
-x disable XML validation
As an example, if you want to generate the osisWork <Bible.KJV> and your USFM
are located in the ./KJV folder, enter:
python usfm2osis Bible.KJV ./KJV/*.usfm
To install the most recent release of usfm2osis, issue the command:
pip install usfm2osis
If your Python 3.x environment still uses the filename python3, you may need to substitute pip3:
pip3 install usfm2osis
To install the current GitHub HEAD (most recent updates on GitHub, but possibly unreleased & less stable), issue the commands:
git clone https://github.com/chrislit/usfm2osis.git cd usfm2osis python setup.py install
If your Python 3.x environment still uses the filename python3, you will need to substitute python3 for python in the above.