schierlm / BibleMultiConverter

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

Does SWORD/MyBibleZone importer support non Bible / Commentary? #24

Closed ickc closed 5 years ago

ickc commented 5 years ago

Hi, this question is a bit broad.

So far I am only able to import MyBibleZone's SQLite3 Bible, but not others such as dictionary, or commentaries that doesn't come with a Bible (e.g. jqql.commentaries.SQLite3 that doesn't come with jqql.SQLite3).

And for SWORD importer, I can only import Bible or Bible Commentary, but not others, such as dictionaries and generic books.

Is this intensional or did I miss something? I use the same command in these cases (e.g. dict.) as those I used for Bible.

Example,

$ java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone jqql.commentaries.SQLite3 LogosHTML jqql.html
Exception in thread "main" org.tmatesoft.sqljet.core.SqlJetException: Table not found: verses: error code is ERROR
        at org.tmatesoft.sqljet.core.internal.table.SqlJetTable.<init>(SqlJetTable.java:63)
        at org.tmatesoft.sqljet.core.table.SqlJetDb$2.runWithLock(SqlJetDb.java:197)
        at org.tmatesoft.sqljet.core.table.SqlJetDb$1.runSynchronized(SqlJetDb.java:172)
        at org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.runSynchronized(SqlJetEngine.java:217)
        at org.tmatesoft.sqljet.core.table.SqlJetDb.runWithLock(SqlJetDb.java:170)
        at org.tmatesoft.sqljet.core.table.SqlJetDb.getTable(SqlJetDb.java:195)
        at biblemulticonverter.sqlite.format.MyBibleZone.doImport(MyBibleZone.java:165)
        at biblemulticonverter.Main.main(Main.java:66)
java -jar $HOME/.local/bin/BibleMultiConverter-AllInOneEdition.jar SWORD /Finney LogosHTML Finney.html
Loading locally installed books...
...

======
Exception in thread "main" java.lang.ClassCastException: class org.crosswire.jsword.passage.TreeKey cannot be cast to class org.crosswire.jsword.passage.Verse (org.crosswire.jsword.passage.TreeKey and org.crosswire.jsword.passage.Verse are in unnamed module of loader 'app')
    at biblemulticonverter.sword.format.SWORD.doImport(SWORD.java:61)
    at biblemulticonverter.sword.format.SWORD.doImport(SWORD.java:49)
    at biblemulticonverter.Main.main(Main.java:66)

Also, how to import SWORD module built locally, e.g. generated using xml2gbs? It seems that it is trying to look for "Loading locally installed books..." only.

schierlm commented 5 years ago

MyBibleZone can only import Bible modules and Footnote modules (which are named .commentary in the file name as well). Dictionary and Commentary and Devotions and Crossreference and Reading Plans (and maybe others) are not supported.

This is true in general for other formats, too. Only Bible/Scripture modules can be imported and exported (footnotes are an exception since for most formats they are part of the actual Bible module). The only exception being Strong dictionaries, which can be imported from Zefania XML and MyBibleZone and exported to HTML, Mobipocket, MyBibleZone and Logos. But the format names are different (e. g. ZefDic or MyBibleZoneDictionary).

To import SWORD modules you built yourself, you need to create the required metadata (mods.d/*.conf, modules/texts/*) like they are packaged in a SWORD module that can be downloaded. Then point the SWORD import to that directory that contains both modules and modules.d, and add / and the name to the module to it, e.g. (on Windows) c:/mymods/MyModuleName or (on Linux) /tmp/mymods/MyModuleName to import a module called MyModuleName.

In case you already have installed them to a directory where you point your favourite SWORD bible program to, just point the importer to the same directory and it will find all of the modules (and download additional ones there).

ickc commented 5 years ago

Thanks for the clarification. Could you add it in the readme?

Also, that might explain something I'm seeing in importing commentaries from SWORD. There's a lot of repeated entries. The worst one I've seen is Luther module, where many entries are repeated over and over again for different verse/chapter. It causes it to explode to ~500 MB of size. A similar thing happened for others such as DTN, but is more useable. Would you consider improving the support on Bible Commentaries?

Thanks again.

ickc commented 5 years ago

Also, in light of your clarification, I now understand this line in the readme:

While the focus of this tool is for bible texts, there is also limited support for (Strong) dictionaries.

schierlm commented 5 years ago

Do you have a suggestion how to make the README more clear? Feel free to send a Pull Request also :)

About the comment about commentaries: Do you mean footnotes? And to which format do you import them? Can you show the command line you are using?