[sword-devel] usfm2osis.py

Chris Little chrislit at crosswire.org
Tue May 7 14:18:02 MST 2013

On 05/07/2013 11:20 AM, Kahunapule Michael Johnson wrote:
> On 05/07/2013 02:18 AM, David Haslam wrote:
>> Apart from Chris, has anyone else done any testing on his Python script
>> usfm2osis.py ?
>> Seehttp://crosswire.org/wiki/Converting_SFM_Bibles_to_OSIS#usfm2osis.py
> Yes. I found that it works for a small subset of USFM, and produces
> proper OSIS fragments for those files that use only those tags. For
> support of a broader range of USFM tags, see http://haiola.org. That has
> source in C# instead of Python.

I'm not sure if this was trollbait (in which case, sorry all for feeding 
the troll) or genuine ignorance, but you don't know what you're talking 
about. Maybe you're thinking of usfm2osis.pl, which is definitely less 
capable, though it hardly only 'works for a small subset of USFM'. (So, 
I'm leaning towards trollbait.)

usfm2osis.py handles the full set of USFM tags (excepting perhaps any 
that were added within the last year). As such, I would estimate that 
usfm2osis.py supports more USFM tags than does Haiola. The fact you 
claim it supports a 'broader range' suggests that it does not support 
all USFM tags, and thus falls short of usfm2osis.py's support.

On top of this, usfm2osis.py actually targets the OSIS schema and best 
practices, rather than a private non-standard derivative.

And in general, anyone interested in converting USFM to OSIS for use 
with Sword ought really to employ usfm2osis.py since it's the only 
supported pathway for USFM->OSIS->Sword, inasmuch as its author has a 
fairly close connection with Sword and regularly commits stuff to Sword 
filters and whatnot. I definitely will not make the least effort to 
accommodate any non-standard output from converters other than usfm2osis.py.


More information about the sword-devel mailing list