schierlm / BibleMultiConverter

Converter written in Java to convert between different Bible program formats
Other
126 stars 32 forks source link

Converting SWORD to OSIS #31

Closed petabyt closed 4 years ago

petabyt commented 4 years ago

I am a complete newbie to this software, but I am trying to use it to convert SWORD to OSIS format. I have C:\modules\NETtext with the following folders:

NETtext
 mods.d
 modules

I ran this command: java -jar BibleMultiConverter-AllInOneEdition.jar SWORD C:\modules\NETtext OSIS And it returns:

Loading locally installed books...
======
Exception in thread "main" java.lang.NullPointerException
        at biblemulticonverter.sword.format.SWORD.doImport(SWORD.java:54)
        at biblemulticonverter.sword.format.SWORD.doImport(SWORD.java:49)
        at biblemulticonverter.Main.main(Main.java:66)

How do I get around this problem?

schierlm commented 4 years ago

Hello,

thanks for trying the software. Yes I know, the input validation is not the best, so sometimes you get ugly stack traces.

Inside a SWORD module directory there can be multiple modules, so you also need to give the module name. Also, for the export format you need a filename to convert to.

Assuming that the module name is nettext (i.e, there is a NETtext\mods.d\nettext.conf), and you want the resulting file to be called NETtext.osis, you can try

java -jar BibleMultiConverter-AllInOneEdition.jar SWORD C:\modules\NETtext/nettext OSIS NETtext.osis

And just a note: In case the SWORD module has been produced from OSIS (i.e. it has SourceType=OSIS in its conf file), you may get better results when you use the mod2osis tool from the libsword-utils package. My converter will still work, but since it will first try to normalize things to make conversion to any format possible, many advanced formatting may get lost on the way. If all you need is bible text, Strongs numbers, bold/italic/underlined, footnotes and paragraph separators, you should be fine either way.

petabyt commented 4 years ago

Thanks for clearing that up. It is working good now.