schierlm/BibleMultiConverter

Issue Converting USFM to LogosHTML

amrhone opened this issue · 4 comments

I am using BibleMultiConvertor for the first time to try and create a Bible that can be used in Logos Bible Software, but I seem to be running into an issue during the process of converting from USFM to LogosHTML. Below is the command that I used and the message that was returned when I ran the command. I assume that I must have done something incorrectly as it doesn't appear that a LogosHTML file was created after I ran the command (if it was created then I must be looking for it in the wrong location).

java -jar BibleMultiConverter-AllInOneEdition.jar USFM SOTW LogosHTML

WARNING: Skipping unknown tag \cl
WARNING: Skipping unknown tag \cp
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
        at java.base/java.util.Objects.checkIndex(Objects.java:359)
        at java.base/java.util.ArrayList.get(ArrayList.java:427)
        at biblemulticonverter.format.paratext.ParatextBook.extractTrailingWhitespace(ParatextBook.java:165)
        at biblemulticonverter.format.paratext.ParatextBook.fixTrailingWhitespace(ParatextBook.java:156)
        at biblemulticonverter.format.paratext.ParatextBook.fixTrailingWhitespace(ParatextBook.java:132)
        at biblemulticonverter.format.paratext.AbstractParatextFormat.importParatextBook(AbstractParatextFormat.java:131)
        at biblemulticonverter.format.paratext.AbstractParatextFormat.doImport(AbstractParatextFormat.java:115)
        at biblemulticonverter.Main.main(Main.java:66)

Note: "SOTW" is the file folder that contains the individual .usfm files that were exported from Bibledit. The Bible I'm attempting to convert includes the OT, NT, and Apocrypha.

Hello amrhone,

nice to see you again.

In fact, the LogosHTML module has its own output command options, which you can see by running java -jar BibleMultiConverter-AllInOneEdition.jar help LogosHTML. And you will need at least an output file name (probably also a verse map name), so the argument list is currently too short.

You are not the first one running into this issue (compare #35, for example), yet I am still open for ideas how to make this more clear, without updating each module individually and adding extra error messages to it.

Hi @schierlm,

Thank you for your response. I reviewed the help and tried using the following command based on what I read, but unfortunately, I received the same error message:

java -jar BibleMultiConverter-AllInOneEdition.jar USFM SOTW LogosHTML SOTW.html Bible

WARNING: Skipping unknown tag \cl WARNING: Skipping unknown tag \cp Exception in thread "main" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) at java.base/java.util.Objects.checkIndex(Objects.java:359) at java.base/java.util.ArrayList.get(ArrayList.java:427) at biblemulticonverter.format.paratext.ParatextBook.extractTrailingWhitespace(ParatextBook.java:165) at biblemulticonverter.format.paratext.ParatextBook.fixTrailingWhitespace(ParatextBook.java:156) at biblemulticonverter.format.paratext.ParatextBook.fixTrailingWhitespace(ParatextBook.java:132) at biblemulticonverter.format.paratext.AbstractParatextFormat.importParatextBook(AbstractParatextFormat.java:131) at biblemulticonverter.format.paratext.AbstractParatextFormat.doImport(AbstractParatextFormat.java:115) at biblemulticonverter.Main.main(Main.java:66)

Is there something else that I may have input incorrectly?

This is the SOTW folder that I mentioned in my previous message that contains the individual .usfm files:
SOTW.zip

Ah, thank you for the input file. I should have had a closer look at the stack trace details, as this is an issue which was fixed in e850bc5, but there is no official release for that yet (will come in 0.0.9).

You can try the nightly version at
https://nightly.link/schierlm/BibleMultiConverter/workflows/main.yaml/master/BibleMultiConverter-AllInOneEdition-Release.zip

which worked fine with your command line for me (note that I only tested the conversion in BibleMultiConverter and not importing into Logos).

Thank you @schierlm, using the nighlty version did work for me and I was able to succesfully complete the import to Logos.