schierlm / BibleMultiConverter

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

Crashed when converting Berean Study Bible #58

Closed buchankn closed 2 years ago

buchankn commented 2 years ago

I'm attempting to convert the Berean Study Bible USFM (from the Berean Study Bible website) to a Logos personal book, but am getting exceptions when running BibleMultiConverter.

I also tried to first use WordSend to convert to usfx, and give that to BibleMultiConverter, and am still getting an exception:

java -jar BibleMultiConverter-LogosEdition.jar USFX bsb.usfx LogosHTML WARNING: Schema validation failed: [Error] org.xml.sax.SAXParseException; systemId: file:/home/kevin/BibleMultiConverter/biblemulticonverter-logos/target/BibleMultiConverter-LogosEdition-0.0-SNAPSHOT-dist/bsb.usfx; lineNumber: 1; columnNumber: 1045; cvc-complex-type.2.4.a: Invalid content was found starting with element 'v'. One of '{ref, nd, c, tl, it, qt, sls, dc, bdit, bk, pn, k, ord, add, bd, sc, wh, wg, wr, wj, cs, optionalLineBreak, em, fp, fr, fk, fq, fqa, fl, fdc, fv, ft, fm, xo, xk, xq, xt, xot, xnt, xdc}' is expected. [Error] org.xml.sax.SAXParseException; systemId: file:/home/kevin/BibleMultiConverter/biblemulticonverter-logos/target/BibleMultiConverter-LogosEdition-0.0-SNAPSHOT-dist/bsb.usfx; lineNumber: 1; columnNumber: 1213; cvc-complex-type.2.4.a: Invalid content was found starting with element 'b'. One of '{c, v, ve, qt, nd, tl, milestone, ca, cp, va, vp, qs, qac, table, generated, f, ef, fm, x, ex, sls, dc, bk, pn, k, ord, add, sig, bd, it, bdit, sc, no, fig, ndx, w, wh, wg, wr, quoteStart, quoteRemind, quoteEnd, ior, wj, cs, fs, wtp, da, cl, optionalLineBreak, ref, rq, em, periph, rem, xt, gw}' is expected. [Error] org.xml.sax.SAXParseException; systemId: file:/home/kevin/BibleMultiConverter/biblemulticonverter-logos/target/BibleMultiConverter-LogosEdition-0.0-SNAPSHOT-dist/bsb.usfx; lineNumber: 1; columnNumber: 282660; cvc-complex-type.2.4.a: Invalid content was found starting with element 'book'. One of '{rem, h, cl, p, q, mt, d, s, sectionBoundary, b, generated, c, ca, toc, milestone, table, periph, v, ve, cp, f}' is expected. WARNING: Parsing anyway after validation errors WARNING: Unsupported paragraph kind: null WARNING: Skipping text outside of verse/headline/prolog Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 0 at biblemulticonverter.logos.format.LogosHTML.doExport(LogosHTML.java:197) at biblemulticonverter.Main.main(Main.java:67)

bsb.zip

schierlm commented 2 years ago

In general, USFM should work better than USFX. With USFX you could run into #56, in case you are trying with the 0.0.8 release.

But your main problem is that you do not have enough arguments for the LogosHTML export format:

java -jar BibleMultiConverter-LogosEdition.jar help LogosHTML shows:

Usage: LogosHTML <outfile> [<versemap> [<template> [-inline|-nochapter] [-notitle]]]

Add an output file name, and your conversion will work (tested with your attached file and latest git version).