Giter Club home page Giter Club logo

biblemulticonverter's People

Contributors

bibelsammler avatar dependabot[bot] avatar rolf-smit avatar schierlm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

biblemulticonverter's Issues

OnLineBible export issues

I am converting USX to OnLineBible Format. The command I am running is C:\PROGS\BibleMultiConverter>java -Dparatext.allowrefsoutsidefootnotes=true -jar BibleMultiConverter.jar USX N:\Bibles\CARS\Text OnLineBible R:\_CARS.Exp IgnoreKJV
When trying to check in the Online Bible, I am getting a list of the following errors:

...
20:15:26 Runaway FootNote  At -  Line: 0; Ge 1:26
20:15:26 Runaway FootNote  At -  Line: 0; Ge 2:7
20:15:26 Runaway FootNote  At -  Line: 0; Ge 2:23
...

The two spaces before the footnote were found to be the source of the problem. Those.
Text[Space][Space]{Footnote} Text it is unacceptable. It should be like this: Text[Space]{Footnote} Text.

Here you can download my dump file to trace it yourself: dump.zip

NullPointerException when pointing USFM/USX import to file instead of directory

Hello

While converting USFM data to the QuickBible format, the converter gives this output:

Exception in thread "main" java.lang.NullPointerException
	at biblemulticonverter.format.paratext.AbstractParatextFormat.doImportAllBooks(AbstractParatextFormat.java:263)
	at biblemulticonverter.format.paratext.AbstractParatextFormat.doImportBooks(AbstractParatextFormat.java:211)
	at biblemulticonverter.format.paratext.AbstractParatextFormat.doImport(AbstractParatextFormat.java:55)
	at biblemulticonverter.Main.main(Main.java:66)

The java version is this:

$ java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

The command line for conversion is this:

$ java -jar BibleMultiConverter/biblemulticonverter/target/BibleMultiConverter-0.0-SNAPSHOT-dist/BibleMultiConverter.jar USFM 00_Bible/03_Genesis.usfm QuickBible out.yet

The USFM file is this:
03_Genesis.usfm.zip

How can I successfully convert the input USFM to the output .yet file?

Can't open BibleMultiConverter

Good afternoon, I am not sure if this is the right place to ask for some help but I downloaded the latest converter and I can seem to make it work. I downloaded the latest java and configured my windows 10 to run it but it is not loading up. Could someone please help me get it to load. I don't know what I am dong wrong. Thanks.
Juniju

mvn dependency jsword

For a successful build you need to build crosswire/jsword before, to have the jsword-2.1-SNAPSHOT.jar in local repo. The 2.1 tag will not produce this version. Commit 3db8802db3f94ec42b2201b65f6965de0e8c9d52 -DskipTests=true was successful.

Please remove dependency or document in Readme.md

Conversion of Hebrew and Greek Bibles

Hi,
I am trying to convert Hebrew and Greek Bibles and BibleMultiConverter crashes on this error:

C:\MBC>java -jar BibleMultiConverter.jar MyBibleZone HSB4.SQLite3 TheWord HSB4
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.substring(Unknown Source)
at biblemulticonverter.sqlite.format.MyBibleZone.doImport(MyBibleZone.java:177)
at biblemulticonverter.Main.main(Main.java:61)

Am I doing something wrong?

Regards,
Willem

USX to OnLineBible problem

I have successfully compiled BibleMultiConverter from source. However, I experience problems converting from USX to OnLineBible. I am including the error messages that were displayed.

C:\PROGS\BibleMultiConverter>java -jar BibleMultiConverter.jar USX N:\Bibles\CAR
S\rus-CARS-b19fcf462065a794-rev8-2019-07-26-release\release\USX_1 OnLineBible N:
\Bibles\CARS\CARS.Exp
WARNING: Unsupported book abbreviation Нач., using Gen instead
WARNING: Unsupported book abbreviation Исх., using Exod instead
WARNING: Unsupported book abbreviation Лев., using Lev instead
WARNING: Unsupported book abbreviation Чис., using Num instead
WARNING: Unsupported book abbreviation Втор., using Deut instead
WARNING: Unsupported book abbreviation Иеш., using Josh instead
WARNING: Unsupported book abbreviation Суд., using Judg instead
WARNING: Unsupported book abbreviation Руфь, using Ruth instead
WARNING: Unsupported book abbreviation 1Цар., using 1Sam instead
WARNING: Unsupported book abbreviation 2Цар., using 2Sam instead
WARNING: Unsupported book abbreviation 3Цар., using 1Kgs instead
WARNING: Unsupported book abbreviation 4Цар., using 2Kgs instead
WARNING: Unsupported book abbreviation 1Лет., using 1Chr instead
WARNING: Unsupported book abbreviation 2Лет., using 2Chr instead
WARNING: Unsupported book abbreviation Узайр, using Ezra instead
WARNING: Unsupported book abbreviation Неем., using Neh instead
WARNING: Unsupported book abbreviation Есф., using Esth instead
WARNING: Unsupported book abbreviation Аюб, using Job instead
WARNING: Unsupported book abbreviation Заб., using Ps instead
WARNING: Unsupported book abbreviation Мудр., using Prov instead
WARNING: Unsupported book abbreviation Разм., using Eccl instead
WARNING: Unsupported book abbreviation Песн., using Song instead
WARNING: Unsupported book abbreviation Ис., using Isa instead
WARNING: Unsupported book abbreviation Иер., using Jer instead
WARNING: Unsupported book abbreviation Плач, using Lam instead
WARNING: Unsupported book abbreviation Езек., using Ezek instead
WARNING: Unsupported book abbreviation Дан., using Dan instead
WARNING: Unsupported book abbreviation Ос., using Hos instead
WARNING: Unsupported book abbreviation Иоиль, using Joel instead
WARNING: Unsupported book abbreviation Ам., using Amos instead
WARNING: Unsupported book abbreviation Авд., using Obad instead
WARNING: Unsupported book abbreviation Юнус, using Jonah instead
WARNING: Unsupported book abbreviation Мих., using Mic instead
WARNING: Unsupported book abbreviation Наум, using Nah instead
WARNING: Unsupported book abbreviation Авв., using Hab instead
WARNING: Unsupported book abbreviation Соф., using Zeph instead
WARNING: Unsupported book abbreviation Агг., using Hag instead
WARNING: Unsupported book abbreviation Зак., using Zech instead
WARNING: Unsupported book abbreviation Мал., using Mal instead
WARNING: Unsupported book abbreviation Мат., using Matt instead
WARNING: Unsupported book abbreviation Мк., using Mark instead
WARNING: Unsupported book abbreviation Лк., using Luke instead
WARNING: Unsupported book abbreviation Ин., using John instead
WARNING: Unsupported book abbreviation Деян., using Acts instead
WARNING: Unsupported book abbreviation Рим., using Rom instead
WARNING: Unsupported book abbreviation 1Кор., using 1Cor instead
WARNING: Unsupported book abbreviation 2Кор., using 2Cor instead
WARNING: Unsupported book abbreviation Гал., using Gal instead
WARNING: Unsupported book abbreviation Эф., using Eph instead
WARNING: Unsupported book abbreviation Флп., using Phil instead
WARNING: Unsupported book abbreviation Кол., using Col instead
WARNING: Unsupported book abbreviation 1Фес., using 1Thess instead
WARNING: Unsupported book abbreviation 2Фес., using 2Thess instead
WARNING: Unsupported book abbreviation 1Тим., using 1Tim instead
WARNING: Unsupported book abbreviation 2Тим., using 2Tim instead
WARNING: Unsupported book abbreviation Тит, using Titus instead
WARNING: Unsupported book abbreviation Флм., using Phlm instead
WARNING: Unsupported book abbreviation Евр., using Heb instead
WARNING: Unsupported book abbreviation Якуб, using Jas instead
WARNING: Unsupported book abbreviation 1Пет., using 1Pet instead
WARNING: Unsupported book abbreviation 2Пет., using 2Pet instead
WARNING: Unsupported book abbreviation 1Ин., using 1John instead
WARNING: Unsupported book abbreviation 2Ин., using 2John instead
WARNING: Unsupported book abbreviation 3Ин., using 3John instead
WARNING: Unsupported book abbreviation Иуда, using Jude instead
WARNING: Unsupported book abbreviation Отк., using Rev instead
Exception in thread "main" java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Unknown Source)
        at java.util.regex.Matcher.reset(Unknown Source)
        at java.util.regex.Matcher.<init>(Unknown Source)
        at java.util.regex.Pattern.matcher(Unknown Source)
        at biblemulticonverter.data.Utils.validateString(Utils.java:31)
        at biblemulticonverter.data.FormattedText$CrossReference.<init>(Formatte
dText.java:249)
        at biblemulticonverter.data.FormattedText$CrossReference.<init>(Formatte
dText.java:237)
        at biblemulticonverter.data.FormattedText$AppendVisitor.visitCrossRefere
nce(FormattedText.java:703)
        at biblemulticonverter.format.paratext.AbstractParatextFormat$ParatextIm
portVisitor.visitReference(AbstractParatextFormat.java:574)
        at biblemulticonverter.format.paratext.ParatextCharacterContent$Referenc
e.acceptThis(ParatextCharacterContent.java:475)
        at biblemulticonverter.format.paratext.ParatextBook$ParatextCharacterCon
tentContainer.accept(ParatextBook.java:555)
        at biblemulticonverter.format.paratext.ParatextCharacterContent$AutoClos
ingFormatting.acceptThis(ParatextCharacterContent.java:190)
        at biblemulticonverter.format.paratext.ParatextBook$ParatextCharacterCon
tentContainer.accept(ParatextBook.java:555)
        at biblemulticonverter.format.paratext.AbstractParatextFormat$1.visitPar
atextCharacterContent(AbstractParatextFormat.java:227)
        at biblemulticonverter.format.paratext.ParatextCharacterContent.acceptTh
is(ParatextCharacterContent.java:35)
        at biblemulticonverter.format.paratext.ParatextBook.accept(ParatextBook.
java:113)
        at biblemulticonverter.format.paratext.AbstractParatextFormat.importPara
textBook(AbstractParatextFormat.java:128)
        at biblemulticonverter.format.paratext.AbstractParatextFormat.doImport(A
bstractParatextFormat.java:112)
        at biblemulticonverter.Main.main(Main.java:66)

C:\PROGS\BibleMultiConverter>

Using BibleMultiConverter to perform versification alignment

Firstly i would like to apologise because i didn't really understand the documentation when it coms to this software so was rather stumped when it came to using it in general... (probably doesn't help that i am not a java developer)

So basically what I was wondering was, if I input a bible (let's say a SWORD or ZefaniaXML bible) that does not follow the KJV canon, is it possible for me to reorder the given bible so as to fix the bible to the KJV canon format.

Take for example Schalter's Bible: At KJV Gen 31:55 that codes to SCH Gen 32:1 and so on. So I'd want SCH 31:55 to read "(32:1) Und Laban stand am Morgen fruh auf, kusste seine Sohne und Tochter segnete sie, ging und kehrte wieder an seinen ort zuruck". I was just wondering if this software could do that with its versifcation tools, and possibly, if not, there is an esay way to do this because I have been searching for a couple of days for a solution and your software is one of the only ones that uses the term Versification.

I did notice on Bible - Offline translations it was able to do this with SWORD bibles but sadly it isn't opensource so i couldn't work it out. I also notice that the BibleMultiTheLife had this same feature however it did it by manually storing the text that way so i couldn't work it out from that either.

Any help would be much appreciated,
Jim

Error when trying to convert a MyBible module to the word

Hi, When trying to convert MyBible module to theWord I get following error:

C:\MBCTest>java -jar BibleMultiConverter.jar MyBibleZone HSV17.SQLite3 TheWord HSV
Exception in thread "main" java.lang.IllegalArgumentException: value is invalid: i { color: %COLOR_BLUE%; }
em { color: %COLOR_BLUE%; }
a { text-decoration: none; }
span.sc { font-variant: small-caps; }
span.pn { text-decoration: underline; }
span.RTL { direction: rtl; display: inline; }
at biblemulticonverter.data.Utils.validateString(Utils.java:32)
at biblemulticonverter.data.MetadataBook.setValue(MetadataBook.java:67)
at biblemulticonverter.sqlite.format.MyBibleZone.doImport(MyBibleZone.java:157)
at biblemulticonverter.Main.main(Main.java:61)

C:\MBCTest>

Can you perhaps assist?

GUI interface

Hello, schierlm, thanks for your work for this tool. Can you make some advance to build a GUI interface? The command line is a bit of hard to use.

NumberFormatException to give more context

When doing $ ./run in the folder downloaded from http://bibleconsultants.nl/downloads/biblemulticonverter/NumberFormatException/ it gives this exception:

Exception in thread "main" java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:592)
	at java.lang.Integer.parseInt(Integer.java:615)
	at biblemulticonverter.format.paratext.USFM.doImportBook(USFM.java:180)
	at biblemulticonverter.format.paratext.USFM.doImportBook(USFM.java:62)
	at biblemulticonverter.format.paratext.AbstractParatextFormat.doImportAllBooks(AbstractParatextFormat.java:264)
	at biblemulticonverter.format.paratext.AbstractParatextFormat.doImportBooks(AbstractParatextFormat.java:211)
	at biblemulticonverter.format.paratext.AbstractParatextFormat.doImport(AbstractParatextFormat.java:55)
	at biblemulticonverter.Main.main(Main.java:66)

Would it be possible that the exception provides more context?
Yes, the cause is malformed USFM, that is the original problem.
But if the exception gives more context, it would make it easier for the USFM editor to find the malformed bit in the USFM.

SWORD to Zefania XML, without Note tags and correct bsname?

OK, I found so many mistakes in Bibles found here and there (missing verses, book name missing, ...), I'm re-converting from Sword.
The terrible thing is that the same version is copied, again and again with errors everywhere, for example Smith and van Dyck's al-Kitab al-Muqaddas, all files have the same error on all versions I found.
To help others (I didn't understand the passage about SWORD in the readme at first), here's the command:
java -jar BibleMultiConverter-AllInOneEdition.jar SWORD modules\texts\ztext\arasvd ZefaniaXMLMyBible arasvd_zef.xml
osisID is correct but I get NOTE tag in the way for verse 1 of each chapter only:

<BIBLEBOOK bname="Genesis" bnumber="1" bsname="Gen">
  <CHAPTER cnumber="1">
    <VERS vnumber="1">
      <DIV>
        <NOTE type="x-studynote">&lt;p&gt;<DIV>
            <NOTE> <BR art="x-nl"/>
            </NOTE>
          </DIV>&lt;/p&gt;</NOTE>
      </DIV>فِي الْبَدْءِ خَلَقَ اللهُ السَّمَاوَاتِ وَالأَرْضَ.</VERS>

My problem is that &lt;p&gt; &lt;p&gt; is interpreted as part of the verse. So I'd prefer without note at all. It's limitative, but I'll work on this features in JSON in the future.

The other Zefania export format doesn't handle osisID well:
<BIBLEBOOK bname="Genesis" bnumber="1" bsname="Genesis">
while bsname should be Gen like in ZefaniaXMLMyBible.

Is there a way to get the most basic version like:

<BIBLEBOOK bname="Genesis" bnumber="1" bsname="Genesis">
    <CHAPTER cnumber="1">
      <VERS vnumber="1">فِي الْبَدْءِ خَلَقَ اللهُ السَّمَاوَاتِ وَالأَرْضَ.</VERS>

?
God bless you!

TheWord Importer cannot import Strong numbers

Hi,

I am trying to convert a Bible with Strong numbers from TheWord to Logos. I have successfully converted Bibles without Strongs or other tags. Do I need any special export argument for the Strong numbers? (btw, is there a list of possible arguments somewhere, can't find it through the help, on the Logos forum you mentioned StripGrammar - I am not sure how to use it, and it obviously would do the opposite of what I want).

When I convert to LogosHTML, the tags still look the same as in the TheWord file (like WH5921 but in brackets that I cannot enter here). After I saved the file in LibreWriter as .docx I used this command:

java -jar BibleMultiConverter-LogosEdition.jar LogosNestedHyperlinkPostprocessor inputfile.docx outputfile.docx

Below is the error message I get.

Thanks,

Bernhard

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at biblemulticonverter.logos.tools.LogosNestedHyperlinkPostprocessor.run(LogosNestedHyperlinkPostprocessor.java:90)
at biblemulticonverter.Main.main(Main.java:53)

Handling of psalm titles across formats can be improved

It seems that every format has its own conventions how to treat Psalm titles (Descriptitve Titles).
Some formats have their own tags or formatting directives for them, other put them in verse 0 or title, other append a /t to the verse number.

Some of the migrations have been implemented in BibleMultiConverter, however not consistently (so it does not work from every format to every other format).

Therefore, all formats should be checked how they handle Psalm titles, and then decided how it should be handled in the intermediate format. Then all formats should be updated accordingly.

OnLineBible export: Improve footnote handling

The closing bracket must be at the end of the footnote text. If there is a NewLineCode \& after the closing bracket, then this creates a problem.
BibleMultiConverter works as follows:

  • Before:
   <para style="xxx">First paragraph in a note</para>
   <para style="xxx">Second paragraph in a note</para>
   <para style="xxx">Third paragraph in a note</para>
  • After BibleMultiConverter:
   First paragraph in a note\&Second paragraph in a note\&Third paragraph in a note\&

I propose to make a very simple solution to the problem, which will greatly improve the display of text in the Online Bible:

  • After BibleMultiConverter:
   \&First paragraph in a note\&Second paragraph in a note\&Third paragraph in a note

Put NewLineCode not at the end of the paragraph, but in front.

OnLineBible - Unicode

BibleMultiConverter creates the exp file in plain ASCII or ANSI format.
Any module containing characters greater than #127 should be in UTF8 format.
Otherwise, not all unicode characters are converted correctly.

Converting SWORD to OSIS

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?

How to ignore RMAC checks?

I am converting modules from MyBible, that have non standard morphology tags, and these get dropped because they do not match your RMAC check patterns.

Is it possible to add an option for turning off RMAC check while converting from MyBible?

Improved USFM validator/parser

As noticed in #22, the current USFM importer can give unclear error messages when parsing malformed USFM files.

It would be great to have a validator module (similar to XML validators) that can parse the USFM file and output detailed information where (file name, line number) validation errors occur. It would probably also need some kind of electronic description of available tags and their parameter types.

USX to OnLineBible - ref

In USX indicated references with the following XLM code.

   <ref loc="xxx">yyy</ref>

Where xxx is the reference id and yyy is the reference text.

When I run the converter, I get the following result:

  • Before:

    This text contains a reference here (<ref loc="NUM 20:1-13">Numbers 20:1-13</ref>).

  • After BibleMultiConverter:

    This text contains a reference here (Numbers 20:1-13).

The reference text is used as a reference.
However, the reference should look like this in OnLineBible:

This text contains a reference here (\\#Nu 20:1-13\\).

See topic "Adding Cross References to Notes" for more information.

Strong's numbers and Morphological tags in custom format

I am converting MyBible modules into TheWord format, and I need to have ability for the Multi Converter to accept and not through out my custom Strong's numbers and Morphological tags.

I have this type of Strongs:
3306, H3306, G3306, L3306
The H3306, G3306, L3306 are not accepted by the converter, at the moment.

I have custom type of Morphological tags.

When I run the converter, I get the following warnings:

WARNING: Invalid Strong number: L245
WARNING: Skipping malformed RMAC morphology code: N-N.MS
WARNING: Skipping malformed RMAC morphology code: R-PG.2S
WARNING: Skipping malformed RMAC morphology code: V-IFA.1P
WARNING: Skipping malformed RMAC morphology code: R-PA.MS
WARNING: Skipping malformed RMAC morphology code: R-PG.2S

Can you please make your code more flexible on treating "malformed" attribute types, please?

export EPUB for Equipd Bible

Hi!
I needed epub formats, different translations of the Bible (Croatian, Hungarian and Serbian) for app Equipd Bible.
You mentioned in planned formats - "EPUB export is also planned (but not high priority at the moment"
What's your plan for the epub format. For me it would be very important.
I've been looking around on the internet but I do not find any solution.
Best Regards!

Improve checking of export arguments to avoid exceptions

Hi @schierlm!

Thanks for fantastic effort in working on this project!

I am trying to import a sample of MyBible module and convert it into Logos.

I run

java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone ./AGP.SQLite3 LogosHTML

and get this output:

WARNING: Unclosed <J> tag at:
WARNING: Unclosed <J> tag at:
WARNING: Unclosed <J> tag at:
WARNING: Unclosed <J> tag at:
WARNING: Unclosed <J> tag at:
WARNING: Unclosed <J> tag at:
WARNING: Unclosed <J> tag at:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
	at biblemulticonverter.logos.format.LogosHTML.doExport(LogosHTML.java:196)
	at biblemulticonverter.Main.main(Main.java:67)

Import file attached: AGP.zip

Thanks for your help!

Ruslan

Charset lost from SWORD to YCHPalmBible

I'm trying to convert CzeCEP module from SWORD to YCHPalmBible and some chars as 'ů' or 'č' are being lost even that there is a ENCODE="Cp1252" attribute in the PARSERINFO tag. I tried to converting whole SWORD module (which is in UTF-8) to windows-1252 with no success. Any soultions?

USX to OnLineBible - combined verses

I am converting USX to OnLineBible Format, and USX file contains the combined verses.

  <para style="p">
    <verse number="10" style="v"/>FirstVerse <verse number="11-12" style="v"/>SecondVerse <verse number="13" style="v"/>ThirdVerse</para>

The SecondVerse should belong to verse 11 and should look like this in OnLineBible:

$$$ Ex 17:10
FirstVerse
$$$ Ex 17:11
\!(17:11-12)\! SecondVerse
$$$ Ex 17:13
ThirdVerse

When I run the converter, I get the following result, at the moment:

$$$ Ex 17:10
FirstVerse \!(17:11-12)\! SecondVerse
$$$ Ex 17:13
ThirdVerse

[request] new release?

Latest available release is from Oct 2019, can you please upload a more recent one for those among us who can't compile this project on their own? Thanks in advance

Does SWORD/MyBibleZone importer support non Bible / Commentary?

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.

mvn build fails with jaxb

[ERROR] Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate (generate) on project BibleMultiConverter-schemas: Execution generate of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed: A required class was missing while executing org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate: com/sun/xml/bind/api/ErrorListener

I guess the jaxb version is wrong:

http://search.maven.org/#search%7Cga%7C1%7Corg.jvnet.jaxb2.maven2

But I can't find 0.12.3 there. So I changed the version to 0.13.1 but then I get:

[ERROR] Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1:generate (generate) on project BibleMultiConverter-schemas: Execution generate of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1:generate failed: A required class was missing while executing org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1:generate: com/sun/xml/bind/api/ErrorListener
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.1

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: d:\Users\Oliver\apache-maven-3.3.9\bin..
Java version: 1.8.0_101, vendor: Oracle Corporation
Java home: c:\PROGRA~2\Java\jre1.8.0_101
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "x86", family: "dos"

Improve Raw HTML support in MyBibleZone importer

Example, (ESVGSB.SQLite3 downloaded from the link you provided)

$ java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone "ESVGSB.SQLite3" LogosHTML "ESVGSB.html"
WARNING: Skipping malformed metadata property html_style
WARNING: Unsupported HTML entity in &nbsp;
WARNING: Unsupported HTML entity in The English Standard Version (ESV) stands in the classic mainstream of English Bible translations over the past half-millennium. The fountainhead of that stream was William Tyndale&#39;s New Testament of 1526; marking its course were the King James Version of 1611 (KJV), the English Revised Version of 1885 (RV), the American Standard Version of 1901 (ASV), and the Revised Standard Version of 1952 and 1971 (RSV). In that stream, faithfulness to the text and vigorous pursuit of accuracy were combined with simplicity, beauty, and dignity of expression. Our goal has been to carry forward this legacy for a new century.
WARNING: Unsupported HTML entity in &lArr;
...

The resulting HTML is malformed. I found that a bunch of closing HTML comments are wrong, which can be fixed by sed 's/--&gt;/-->/g'.

Also, there's a bunch of warning on Unsupported HTML entity such as &lArr; but other similar variants as well.

MyBibleZone import fails if a chapter contains verse number 0

Hi, I encounters errors when I'm trying to convert resources from ph4.org in MyBibleZone format. The resources are in Chinese and I don't know if that might be the source of problems.

Steps to reproduce the bug:

# from https://www.ph4.org/b4_index.php, 聖經恢復本
# unzip and obtain CRV.SQLite3, CRV.commentaries.SQLite3
$ wget -qO- 'http://mybible.i-t.kz/mybible/CRV.zip' | bsdtar -xf-
$ java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone CRV.SQLite3 LogosVersificationDetector
Exception in thread "main" java.lang.IllegalArgumentException: number is invalid: 0
	at biblemulticonverter.data.Utils.validateString(Utils.java:32)
	at biblemulticonverter.data.Verse.<init>(Verse.java:11)
	at biblemulticonverter.sqlite.format.MyBibleZone.doImport(MyBibleZone.java:284)
	at biblemulticonverter.Main.main(Main.java:66)
$ java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone CRV.commentaries.SQLite3 LogosVersificationDetector
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)

Konvertierung nicht möglich

Ich habe die Volxbibel von https://bibel.github.io/ heruntergeladen und nach BibleMultiConverter-AllInOneEdition-0.0.6 extrahiert. Die anschließende Konvertierung lief wie folgt ab:

D:\Downloads\Programme\TheWordInstall\DeutscheBibelnHTML\BibleMultiConverter-AllInOneEdition-0.0.6>java -jar BibleMultiConverter-AllInOneEdition.jar RoundtripHTML "Volxbibel-RoundtripHTML" TheWord
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at biblemulticonverter.format.TheWord.doExport(TheWord.java:290)
at biblemulticonverter.Main.main(Main.java:67)

Ich bin blutiger Anfänger. Mache ich das was falsch?

E-Sword Import

It isn't clear to me if import from E-Sword format is possible. Can you provide details? Thanks

MyBible to USFM/USX issues

When trying to convert MyBible SQLite3 Bible modules to USFM/USX, I am getting a flood of the following warnings:

WARNING: Raw HTML is not supported
WARNING: No tag found for formatting: font-style: italic; myBibleType=note

The command I am running is java -Dmybiblezone.morphology.raw=true -jar ./BibleMultiConverter-SQLiteEdition/BibleMultiConverter-SQLiteEdition.jar MyBibleZone ./LCV’19r+.SQLite3 USFM ./zzz '#-*.usx'

Here you can download my file to trace it yourself: https://s2.igrnt.info/MyBible/%D0%BE%D1%84%D0%B8%D1%86%D0%B8%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9%20%D1%80%D0%B5%D0%BB%D0%B8%D0%B7/LCV%E2%80%9919r+.SQLite3

USX 3.0 support

First of all, thanks a lot for this extremely useful library.

Today I tried to convert a USX 3.0 file to USFM, but it seems BibleMultiConverter only supports USX 2.6. I tried updating the schema after converting it from Relax NG Compact to XSD using Trang, but my knowledge about XML and schema's is just lacking, and the converted schema contains a lot of errors, such as Unique Particle Attribution violations.

Anyhow, before I dive in deeper, do you have any plans to support USX 3.0? Java is no problem for me, however I usually don't work with XML, as a mobile developer XML is just not really part of the skill set I guess.

Is updating the schema even enough? Or does this also require a complete rewrite of the USX class and Usx class? I can imagine it does?

Update: I'm now working on adding USX 3.0 Import support and export for USFM 3.0. Once this works I might also start working on Export for USX 3.0 and Import for USFM 3.0.

Branch: https://github.com/Rolf-Smit/BibleMultiConverter/tree/feature/usx-3.0

Progress:

  • Create XSD file for USX 3.0
  • Update internal Paratext models ( format/paratext/*) with new tags from the USX 3.0 specification.
  • Create USX3 implementation of AbstractParatextFormat that imports USX 3.0 into the internal Paratext models.
  • Update USX (2) and USFM (2) classes so that they do not export USX 3 features.

OnLineBible - blank verses

BibleMultiConverter creates an exp file with blank verses. If there is no verse in the input file, BibleMultiConverter nevertheless uses $$$ <Verse reference> for it.

For example, if the source file does not contain verse Le 14:57, then BibleMultiConverter still places the $$$ Le 14:57 marker, after which there is no text, but the next verse marker is $$$ Le 15:1. This poses a problem when importing into the Online Bible program. Is it possible to make changes so that blank markers are not outputed into the exp file?

Importing MyBible format fails on a title from stories table(?)

I have another text that won't import, it complains about this:

Exception in thread "main" java.lang.IllegalArgumentException: text is invalid: Иисус
говорит о Своей смерти
at biblemulticonverter.data.Utils.validateString(Utils.java:32)
at biblemulticonverter.data.FormattedText$Text.(FormattedText.java:206)
at biblemulticonverter.data.FormattedText$Text.(FormattedText.java:202)
at biblemulticonverter.data.FormattedText$AppendVisitor.visitText(FormattedText.java:681)
at biblemulticonverter.sqlite.format.MyBibleZone.doImport(MyBibleZone.java:334)
at biblemulticonverter.Main.main(Main.java:61)

I don't know why that text is invalid, i found it in the title field in the stories table.

If I drop the stories table, it will convert fine. However, even if I keep the stories table and delete the eight (8) lines where this title is used, it still won't import, still complains about the same text string, which I can't find anywehre else, it is not in the verses text or any other table in the sqlite3 file that I can find.

I was able to do an SQLiteDump of that file, and had no errors, and cannot find the text in that file. I was trying to convert to Accordance, but cannot do Diffable or Compact either

I wish I could do more to give a better report, but I can't find the text anywhere else nor do I see any options to give better output as to where it is finding that.

Import of some MyBible.Zone bibles fail

MENG and Leo-RP05+ cannot be imported.

For MENG, two indexes are corrupted in the SQLite file (should be probably rebuilt during import)

Leo-RP05 contains unsupported book_metadata format.

Probably a good idea to download all the other MyBible.Zone bibles and test importing them.

NullPointerException when trying to convert MyBibleZone bible that contains footnotes

Trying to convert MyBibleZone module to OSIS
with BibleMultiConverter-AllInOneEdition-0.0.7

BibleMultiConverter-AllInOneEdition-0.0.7$ java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone ./BTI\'15.SQLite3 OSIS

WARNING: Rebuilding index verses_index on verses
WARNING: Rebuilding index stories_index on stories
WARNING: Unusual footnote mark:  [1]
Exception in thread "main" java.lang.RuntimeException: В НАЧАЛЕ сотворил Бог небо и землю. [1]
at biblemulticonverter.sqlite.format.MyBibleZone.doImport(MyBibleZone.java:292)
at biblemulticonverter.Main.main(Main.java:66)
Caused by: java.lang.NullPointerException
at biblemulticonverter.sqlite.format.MyBibleZone.convertFromVerse(MyBibleZone.java:545)
at biblemulticonverter.sqlite.format.MyBibleZone.doImport(MyBibleZone.java:286)
... 1 more

OSIS export does not provide options to choose which elements to milestone (but always milestones verse elements)

Hi,

First of all, thank you very much for this tool, a true open source bible tool is fresh air!

My first try from Zefania XML to OSIS produced the XML file, but format is incorrect, here are details:

Zefania XML format for verse is:
<VERS vnumber="1">Au commencement, Dieu créa les cieux et la terre.</VERS>

Result from BibleMultiConverter is:
<verse osisID="Gen.1.1" sID="Gen.1.1"/>Au commencement, Dieu créa les cieux et la terre.<verse eID="Gen.1.1"/>
You can see that tags are self closing before and after verse, " is kept, and attributes are duplicated before and after. Result should be something like:
<verse osisID='Gen.1.1'>Au commencement, Dieu créa les cieux et la terre.</verse>

Additionally, header "work/title" tag is written in the header, but following header work tags are written to "a new first div", in place of Genesis.

Is it possible to fix? Or to indicate where is the XSL Template to fix it?
Thank you very much, God bless you!

USX to OnLineBible - Invalid conversion

When trying to convert USX to Online Bible format, I am getting a following invalid conversion:

Before (Input File):

  <chapter number="12" style="c"/>
  <para style="p">
    <verse number="14" style="v"/>Блюстители же Закона, выйдя, стали совещаться о том, как им убить Ису.</para>
  <para style="s1">Кроткий и смиренный Раб Всевышнего</para>
  <para style="r">(<ref loc="MRK 3:7-12">Мк. 3:7-12</ref>; <ref loc="LUK 6:17-19">Лк. 6:17-19</ref>)</para>
  <para style="p">Узнав об этом, Иса ушёл из тех мест. <verse number="15" style="v"/>За Ним последовало много людей, и Он исцелил их всех. <verse number="16" style="v"/>Но Он запретил им разглашать о том, кто Он<note caller="+" style="f"><char style="fr" closed="false">12:16 </char><char style="ft" closed="false">Иса, вероятно, не хотел, чтобы люди видели в Нём только чудотворца-целителя. Другая возможная причина – растущая популярность, которая мешала Его служению (см. <char style="xt"><ref loc="MRK 1:43-45">Мк. 1:43-45</ref></char>).</char></note>. <verse number="17" style="v"/>Так исполнялись слова, сказанные через пророка Исаию:</para>

After (Output File):

$$$ Mt 12:14 
Блюстители же Закона, выйдя, стали совещаться о том, как им убить Ису.\&
$$$ Mt 12:15 
 {\$Кроткий и смиренный Раб Всевышнего\$} {\$\@(Мк. 3:7-12; Лк. 6:17-19)Узнав об этом, Иса ушёл из тех мест. \@\$} За Ним последовало много людей, и Он исцелил их всех. 
$$$ Mt 12:16 
Но Он запретил им разглашать о том, кто Он {12:16 Иса, вероятно, не хотел, чтобы люди видели в Нём только чудотворца-целителя. Другая возможная причина – растущая популярность, которая мешала Его служению (см. Мк. 1:43-45).} . 
$$$ Mt 12:17 
Так исполнялись слова, сказанные через пророка Исаию:

In Mt 12:15, the text Узнав об этом, Иса ушёл из тех мест. became part of the footnote. In addition, two footnotes escaped from verse 14 to verse 15. It should be like this:

$$$ Mt 12:14 
Блюстители же Закона, выйдя, стали совещаться о том, как им убить Ису.\&
 {\$Кроткий и смиренный Раб Всевышнего\$} {\$\@(Мк. 3:7-12; Лк. 6:17-19)\@\$} Узнав об этом, Иса ушёл из тех мест.
$$$ Mt 12:15 
За Ним последовало много людей, и Он исцелил их всех. 

The command I am running is java -jar BibleMultiConverter.jar USX N:\Bibles\CARS\Text OnLineBible N:\Bibles\CARS\CARS.Exp
In the directory N:\Bibles\CARS\Text I put the file MAT.usx. I send MAT.usx as an attachment to trace it yourself:
MAT.zip

OnLineBible export: Merge adjacent references

Starting from this comment by @Michahel, when exporting to OnLineBible, adjacent references should be merged so that clicking them opens one reference window and not multiple ones.

References are adjacent if they are only separted by whitespace or certain punctuation (I would suggest semicolon, comma, period; as I have seen those in separating references in various input formats).

So, instead of exporting

{\\#Ref1\\; \\#Ref2\\.\\#Ref3\\}

it should get exported as

{\\#Ref1 Ref2 Ref3\\}

YouVersion

I am successfully converting MyBible modules, though not without hickups, into TheWord, BWT...
my question is about YouVersion.

Any clue on how to convert into YouVersion format?

Metadata handling between different formats should be improved

Different Bible formats provide different kind of metadata (like author, description, publisher, language, copyright, etc.).

At the moment, during import everything except the book title is added to a "Metadata book" at the beginning of the exported Bible. During export, this "Metadata book" generally gets added as prolog before the actual bible books, or gets written into a single metadata field of the destination format.

This way, no metadata gets lost, but when converting e. g. Zefania XML to OSIS (as pointed out in issue #8), there is often manual work required to clean up the metadata of the modules after conversion.

This leaves some way to improvements.

[Contributions / patches for this issue greatly appreciated]

USX to Validate - PrintSpecialVerseSummary

I am converting USX to Validate, and I use PrintSpecialVerseSummary argument.
When I run the converter, I get the following warnings:

...
Exception in thread "main" java.lang.RuntimeException: Validation error at Gen 1
:1
        at biblemulticonverter.data.FormattedText.validate(FormattedText.java:86
)
        at biblemulticonverter.data.Chapter.validate(Chapter.java:37)
        at biblemulticonverter.data.Book.validate(Book.java:35)
        at biblemulticonverter.data.Bible.validate(Bible.java:51)
        at biblemulticonverter.tools.Validate.doExport(Validate.java:130)
        at biblemulticonverter.Main.main(Main.java:67)
Caused by: java.lang.IllegalStateException: No whitespace allowed at end of elem
ent
        at biblemulticonverter.data.FormattedText$ValidatingVisitor.visitEnd(For
mattedText.java:950)
        at biblemulticonverter.data.FormattedText.accept(FormattedText.java:46)
        at biblemulticonverter.data.FormattedText$CSSFormatting.acceptThis(Forma
ttedText.java:279)
        at biblemulticonverter.data.FormattedText.accept(FormattedText.java:45)
        at biblemulticonverter.data.FormattedText$Footnote.acceptThis(FormattedT
ext.java:233)
        at biblemulticonverter.data.FormattedText.accept(FormattedText.java:45)
        at biblemulticonverter.data.FormattedText.validate(FormattedText.java:84
)
        ... 5 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.