[sword-devel] usfm2osis.pl

Chris Little chrislit at crosswire.org
Wed Jun 4 20:27:07 MST 2008

I'm currently working on a recommended process for converting (U)SFM to 
OSIS. So keep an eye on 
http://www.crosswire.org/wiki/index.php/Converting_SFM_Bibles_to_OSIS in 
the coming days. Truthfully, I don't think I can recommend using 
usfm2osis.pl. I think Snowfall Software's USFMToOSIS will probably work 
better (but is much more difficult to get working).

But to answer your question, the input files argument of usfm2osis.pl 
just takes a path argument to the files. So if your files are in a 
directory called VB (relative to the directory containing usfm2osis.pl) 
and the SFM files all have a .txt extension, then you would run:
./usfm2osis.pl VB -o vb.xml VB/*.txt

(This will grab every .txt file in that directory, so anything that 
isn't SFM but has a .txt extension should be moved or renamed. I wrote 
the script with the assumption that SFM files would have distinctive 
extensions like .sfm, .sfc, .ptx, or such.)


Daniel Owens wrote:
> I am trying to use usfm2osis.pl to convert some USFM files to an OSIS 
> file for import. I was able to use the Bibledit export feature, but it 
> doesn't preserve paragraph tags. I haven't been able to get usfm2osis.pl 
> to actually find the data I am wanting to transform. I put the script in 
> the folder with the USFM files (named 01GENVB6.txt, 02EXOVB26.txt, and 
> so on), but I am not sure what to enter in the terminal.  ./usfm2osis.pl 
> VB -o vb.xml vb26.txt isn't right (VB being the module, vb.xml being the 
> output file). I am not sure how to use the wildcards for this script. I 
> know there must be a simple answer, but it's escaping me.
> Daniel

More information about the sword-devel mailing list