.. |travis| image:: https://travis-ci.org/chrislit/usfm2osis.svg :target: https://travis-ci.org/chrislit/usfm2osis :alt: Build Status
.. |coveralls| image:: https://coveralls.io/repos/chrislit/usfm2osis/badge.svg :target: https://coveralls.io/r/chrislit/usfm2osis :alt: Coverage Status
.. |pypi| image:: https://img.shields.io/pypi/v/usfm2osis.svg :target: https://pypi.python.org/pypi/usfm2osis :alt: PyPI
.. |docs| image:: https://readthedocs.org/projects/usfm2osis/badge/?version=latest :target: https://usfm2osis.readthedocs.org/en/latest/ :alt: Documentation Status
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black :alt: black
.. |license| image:: https://img.shields.io/badge/License-GPL%20v3+-blue.svg?logo=gnu :target: https://www.gnu.org/licenses/gpl-3.0 :alt: License: GPL v3.0+
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.