GithubHelp home page GithubHelp logo

schierlm / biblemulticonverter Goto Github PK

View Code? Open in Web Editor NEW
124.0 22.0 33.0 1.51 MB

Converter written in Java to convert between different Bible program formats

License: Other

Java 98.60% JavaScript 1.06% CSS 0.05% HTML 0.29%
bible converter java online-bible osis theword quick-bible accordance json logos

biblemulticonverter's Introduction

BibleMultiConverter

Converter written in Java to convert between different Bible program formats

Copyright (c) 2007-2024 Michael Schierl Licensed unter MIT License; for details, see the LICENSE file.

Usage

If you clone from Git or download a source zip, you will need a Java JDK 8 or above (tested up to 11), and Apache Maven 3.5 or above, to build. Just run "mvn package" and you will find a suitable distribution .zip file in the TARGET folder.

If you download a precompiled .zip file, you will need a Java Runtime Environment 8 or above, available from java.com. Just run

java -jar BibleMultiConverter.jar

on the command line for usage information. Each module has its own help, which can be shown by using the "help" module.

Documentation

The documentation is currently a bit lacking. Try the commands, or look at the source, or open an issue if anything is unclear.

Supported Formats

BibleMultiConverter supports four custom formats, which are loss-less (support all features supported by the BibleMultiConverter framework) and are supported both for import and for export:

  • Compact: Designed for creating small text files that compress well
  • Diffable: Designed to make comparing different bibles easier
  • RoundtripTaggedText: Similar to Diffable, but optimized for automated editing using regular expression, at the expense of legibility
  • RoundtripXML: Useful for interchange of modules with converters written in other programming languages (that prefer XML binding to plaintext parsing)

Note that the Diffable format got new features in v0.0.3, v0.0.8 and v0.0.9, which are backwards compatible but not forwards compatible. Use the OldDiffable format to export Bibles in v0.0.9 so that v0.0.8 or older versions are guaranteed to be able to read them.

In addition, there are other formats that can preserve all features supported by the BibleMultiConverter framework, and can therefore used for exchanging or editing modules without loss of data:

  • RoundtripHTML: HTML format that can be read back if desired (originally intended for publishing on free website hosters, but with the advent of free file hosters this feature is pretty much obsolete).
  • RoundtripODT: Export as an editable .odt (OpenOffice/LibreOffice Document Text), which can be edited in LibreOffice (tested with LibreOffice 6.0) and later imported again. Large bibles can take a minute or so to open in LibreOffice 6, which is quite some improvement since LibreOffice 5.x sometimes took more than 15 minutes. Note that all formatting is exported as named Paragraph or Text styles, and other individual formatting will be ignored when importing.

In addition, the following other formats are supported, with varying accuracy:

In combination with third party tools, other export formats are available:

  • In combination with LibreOffice 4.4 to 7.5, it is possible to export bibles for Logos Bible Software (see below for details)
  • In combination with the E-Sword ToolTipTool NT v2.51, it is possible to export bibles for E-Sword (see below for details)

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

The StrongDictionary import filter downloads a public domain Strong dictionary and compiles it for exporting as HTML, MobiPocket, Logos or ZefDic (currently no other exporters support dictionaries).

The StrongConcordance import filter takes a Strong dictionary and a Bible and augments the dictionary with concordance information (i. e. links that link back to all verses that contain this word in that particular Bible).

Three utility exporters are also available: Validate validates the syntax of a bible file, and StrippedDiffable exports a Diffable, but removes certain features (like prologs, footnotes, headlines, etc.) In case you want to rename or remove certain books automatically, have a look at the Diffable importer, which provides options for that. HeatMapHTML can generate heat maps (or verse statistics) which show how often a certain feature (e. g. a footnote, a divine name, or the word "Jesus") appears in the Bible and where exactly.

AugmentGrammar can analyze the use of grammar information (Strongs, morphology, source indices) in one or more bible modules and use this information to augment other modules (e.g. modules that contain Strongs but no morphology). It can also be used to dump grammar information as a CSV file to analyze it elsewhere, or generate source indices in Original Language modules by counting grammar info tags.

The ValidateXML tool can be used to validate an input XML file against a XSD schema. The schema can be given as a file, as an URL or one of the embedded schema names OSIS, ZefaniaXML, HaggaiXML, RoundtripXML, USFX, USX or ZefDic. This is useful as in case of an invalid XML input file, the schema usually provides better error messages than what is provided by the import modules.

The SQLiteDump tool (part of the SQLite edition) can dump SQLite databases in a diffable text format; useful for diagnosing problems with Bible programs that use SQLite based formats or for importing MyBible.Zone bibles.

The ParatextConverter tool can be used to convert between USFM/USFX/USX formats without converting to BibleMultiConverter's internal format first, or to remove tagged OT/NT/Deuterocanonical content from such a file. It can also be used to convert from/to ParatextDump (which is a diffable plain text dump of the internal Paratext structure and useful for comparing different Paratext formats) and ParatextVPL (which is a different diffable format that looks more like VPL, but uses Paratext tags) formats.

The MyBibleZoneListDownloader tool (part of SQLite edition) can be used to download the list of available MyBible.Zone modules from the module registry (that is also queried by the Android app) and create a HTML file with download links and (JavaScript) filters. This is needed as the website apparently does not include all modules available in the app.

Planned formats

EPUB export is planned (but not high priority at the moment).

If you want to see any other formats, feel free to open an issue (or a pull request :-D).

Limitations

When comparing the bible formats that are currently used (both free and commercial), they can be divided into two broad categories (or paradigms).

The first category uses books, prologs, chapters, verses and head-lines as primary structural elements. As a consequence, formattings/styles cannot span verse boundaries, and paragraph separators are always inside (or often at the end of) verses.

Zefania XML, Haggai XML, TheWord, PalmBible+, e-Sword, SWORD, most online bible websites, and also the commercial MfChi format follow this category. Therefore, the format internally used by this converter follows this category.

The other category, which covers popular formats like Logos Bible Software or USFM, treats formattings and paragraphs as primary structural elements. Within these formattings, so-called milestone markers are used to denote the beginning and end of chapters and verses. Prologs, appendixes, or headlines are a concept that does not exist (and neither is required) for this paradigm - text that is inside a chapter but before the first verse happens to be a chapter prolog, for example.

Non-bible-specific Export formats like MobiPocket, HTML or ePub can also handle these formats quite well, by skipping all the milestone markers.

OSIS is some kind of hybrid format, as the creator can decide whether formatting or structural elements are represented as nested tags; the other type is then represented as milestones.

As this converter internally uses the first category, conversions between different second-category formats (like from verse-milestoned OSIS to Logos) will always lose more information than needed; if you want to convert this way, perhaps another converter tool is more appropriate for your needs. As soon as either the input or the output format is of first category, this converter probably outperforms other converters easily.

In addition, some Bible formats have very sophisticated formatting features (which are not used by most of the available modules), like several paragraph styles or even list and tables. All these formats get reduced to the bare minimum: paragraph breaks as well as line breaks with and without indentation.

Reporting exporter bugs

In case you are trying to export a module, but the exporter throws an error message you do not understand, I'd prefer if you could share a Diffable version of the module with me. However, I understand that this is not always possible, e.g. due to copyright restrictions. In that case, you can try if the bug can still be reproduced after exporting export the module using the ScrambledDiffable export format; this format is designed to leave the structure of the document intact but scramble all the (Greek and Latin) letters and digits are scrambled beyond repair (or repairable with a password if you prefer).

Try using =23 as argument first, which should replace all letters by 'X', resulting in a well compressible file. In case that one does not reproduce the bug, use without arguments (random numbers). In case you want to share a Bible where others are able to compare if their verses are the same, use '#SHA-1' as argument; that way, the same verse will scramble to the same 'ciphertext', so the resulting files are still diffable although unreadable. In case you have to be able to reverse the scrambling (if the whole file is unchanged), you can use '+Password' for initial scrambling and '-Password' for later decrypting. To verify if two bible were scrambled from the same source (using different parameters), scramble them again in constant mode, and diff the results. Note that since 'encrypting' uses a stream cipher, if you use the same password for more than one file, an attacker with cryptanalysis background that knows only this piece of information can use it for correlation attacks to get the plain text. Therefore, use different passwords for multiple bibles (like, add the bible name to them), or better, use real encryption like AES instead.

Versification handling

Most Bible formats do not care about versifications (they just store book chapter:verse without caring how many verses a certain chapter has), or support only a single versification (usually KJV or KJVA). Exceptions being SWORD and Logos, which encode the versification mapping in the bible itself. Therefore, this converter usually does not care about versifications; in case a format is limited to a versification, verses will be merged until they fit.

However, there is some support for handling "external" versification mappings (stored in .bmcv files). A Versification tool can be used to import and export versification mappings from different formats, and perform some other modifications (like renaming or deleting versifications, or joining or comparing them). A VersificationDetector export filter can be used to determine which versification in a .bmcv file fits a given bible best. And a VersificationMappedDiffable can be used to "change" the versification of an existing Bible text.

When referring to versification mappings in a file, the general syntax is from/to or from/to/number. Use the latter form (number starts with 1) in case there is more than one mapping stored in your file between the same two versifications. If you use the form without number, but there are multiple mappings, the system will automatically try to find the "best" mapping; i. e. the one that maps more verses and/or maps them more precisely (e. g. a mapping that maps Gen 1:1 to Gen 1:1 and Gen 1:2 to Gen 1:2 is more precise than a mapping that maps Gen 1:1-2 to Gen 1:1-2). In case this cannot be determined, an error message is shown.

When merging mappings from multiple files, you can come into a situation where you have two versifications that represent essentially the same bible, but have different names. Trying to join a path between these two versifications will fail (as there is no common mapping). In this case, you can write name1/name2/-1 to dynamically create an identity mapping: all verses that exist in both versifications automatically map to themselves, all other verses are unmapped.

Supported Versification formats:

  • BMCV (own database format): Import and export (versifications and mappings)
  • KJV (hard-coded KJV versification): "Import" only (no mapping)
  • CCEL: Import and export (versifications and mappings)
  • OpenScriptures: Import only (versifications only, no mappings)
  • SWORDVersification: Import versifications and mappings from SWORD
  • AccordanceReferenceList: Import a reference list from Accordance
  • SoftProjectorVersification: Import versification mapping from SoftProjector bible
  • ReportHTML: Export only (HTML report that shows difference of covered verses)

SWORD import

As the SWORD format is quite complex, I'm using a third party library JSword for parsing it. That library adds quite some footprint to the application (almost 20MB) so SWORD import is only available in a special SWORD edition, which is available as a separate download (but in the same source repository).

SWORD is special in the sense that you do not have a file to import, but a module directory and some bibles in there to import (specified by initials). Just separate those by a slash, and use this as the filename.

In case you do not have a SWORD module directory locally, you can use the SWORDDownloader tool to download some bibles from a SWORD http repository into a new module directory.

Paratext formats (USFM/USX)

Not all verse number formats are supported by Paratext, the following conversions can occur when converting from a non Paratext format to a Paratext format (warnings will be shown when these occur):

- 11/13 becomes 11
- 4.6.9 becomes 4
- 2G becomes 2
- 10/12G becomes 10
- 1-4.7 becomes 1-4
- 1.4-7 becomes 1

E-Sword export

To export for E-Sword, first use the ESwordHTML export filter, which generates two HTML files (.bblx.html and .cmtx.html) which can then imported into ToolTipTool and converted to an E-Sword Bible. As the HTML import filter of ToolTipTool is a bit buggy and nondeterministic (it tends to insert line breaks in the middle of lines, resulting in conversion errors; sometimes it helps to just import the same file again, sometimes not) there is a special "marker" parameter that can be set to anything that does not occur in the bible text ($EOF$ works fine usually). Then import in ToolTipTool NT (dont mind if extra newlines get added), export in ToolTipTool NT as RTF, and run ESwordRTFPostprocessor over the RTF file to fix it. The fixed RTF file can then be imported in ToolTipTool without issues and converted as desired.

[In case you know an easier way to deal with this issue, please tell me :-). If you want to contribute an E-Sword exporter that directly writes the SQL Database files, it will be very much appreciated.]

Logos Bible Software export

As the dependencies are quite large and non-free, this feature is only available in the "Logos Edition" which is a separate binary download (but included in the same source repository). As this format is quite complex (compared to the others), this export is a multi-step process:

First run the LogosVersificationDetector, which will find a verse map for you that covers (hopefully) all verses of your Bible. Then run LogosHTML to produce a HTML file, which you can open in LibreOffice (HTML Writer format) and save as .docx (Office 2007 XML format). Note that HTML import in LibreOffice 7.6 is totally broken, and in LibreOffice 24.2 it changed in incompatible ways, for now please use LibreOffice 7.5 or older for conversion.

In case your bible contains cross references to books/verses that are not covered by your bible itself, don't forget to pass the -xref option to the versification detector, as Logos will not render datatype links to cross references that do not exist in the verse map (In case you do not get a match that covers both your verses and your xrefs, but there is a match that covers all verses, use that one, as it is better to lose datatype links for your cross references, than to lose some verses).

As LibreOffice has some limitations in exporting of hyperlinks, if your original bible contained Grammar information (Strongs or Morphology tags), you will have to run the resulting DOCX file through LogosNestedHyperlinkPostprocessor or the Grammar information will look broken in Logos.

[In case anybody wants to contribute a Logos exporter that directly writes .docx files, it will be very much appreciated.]

Accordance export

Accordance export also is quite complex, but this time not because of the complexity of the format, but because of some quirks in Accordance and because - due to the limited features - there are several common workarounds available (which are used by people when manually creating modules as well), but which do not apply to every module. Sometimes, it makes even sense to create multiple modules of the same bible with different options and use them at the same time.

Character formats are limited to bold, italic, underlined, small caps, subscript, superscript, and 20 named colors. While it is quite common to format divine names in small caps, and words of Jesus in red (which by the way is the only color that can be switched on and off in the settings), it is unclear how to format e.g. prologs, headlines or footnotes, or whether to include them at all. Another peculiarity: When searching in the module, you can exclude text that is written in square brackets; therefore some people like to put these kinds of content into square brackets; others (who prefer "clean" display) do not.

Therefore, it is possible to configure the appearance of each of the available Bible features individually, and whether they should be exported at all. Features used in the text that are not configured (except the aforementioned divine names and words of Jesus) cause a warning. Each feature can be configured independently how it should appear if it occurs in a chapter prolog. Available appearance options include the mentioned character formats, adding newlines or paragraphs before/after the items, and putting the item in round, square or curly brackets.

As character set, MacRoman or UTF-8 can be used; while MacRoman is supported better by older Accordance versions, UTF-8 supports more characters. Line endings can be CR or LF; again CR for better compatibility, LF for interoperability with other editors.

For all the options, see the help text of the module.

Another point to keep in mind are versification schemas.

When importing a Bible in accordance, there are basically two options for the Versification schema:

  • When choosing "Standard KJV", you are quite free what verse numbers to include. As long as they basically fall inside the bounds of the KJV (about 10 more verses are permitted per book), verse numbers can be omitted and the number of actual verses in a book does not matter (as long as there is at least one). As a disadvantage, viewing this Bible in parallel with other (official) Bibles will likely not match your expectations.

  • The other option is to choose to take the versification scheme of any other Bible you own. In that case, the verse numbers (and order and gaps) have to match the verse numbers of that Bible exactly. If verses at the beginning or in the middle are missing, wrong verse numbers are displayed next to the verses (even when the Bible is shown alone), and if verses at the end are missing or too many, only the parallel view is impacted. But, on the other hand, parallel display with other Bibles will most likely work as you would expect.

To cover these two variants, there are several options in the exporter.

  • By default, reordered verses will be sorted (and the format for the real verse number can be given by the VN= option, VN=BRACKETS+CERULEAN is a good option), but apart from that, verses will stay as they were in the import file. This option is often suitable for "Standard KJV" versification.

  • When specifying verseschema=restrictkjv, verses that lie outside the KJV versification will be joined, again using the VN= option for the real verse numbers.

  • When specifying verseschame=fillone, verses that are missing and lie before an existing verse (starting with verse 1) will be filled with -. This is the poor man's option when using an existing versification scheme, in the hope that this scheme does not have any reorderings or gaps, and will not help for parallel view.

  • When specifying verseschema=fillzero, some Psalms (in particular 3-9, 11-32, 34-42, 44-70, 72-90, 92, 98, 100-103, 108-110, 120-134, 138-145) will be filled starting with verse 0. This helps for versification schemes that follow KJV and put the psalm title into verse 0, but still only a workaround.

  • The best option when using custom versifications is to export a reference list from Accordance (or more if you are unsure which versification to use), import them into BibleMultiConverter and then specify the versification as verseschema=<name>@<dbname>. In that case, the versification schema is followed exactly, omissions are moved to the previous verse (if present) and reorderings are followed at a best effort basis. In addition, missing verses at the end of the book will also be filled with -, and extra books will be merged with the previous book.

  • In some cases, the total verses of a book would follow an existing versification exactly, except that the chapter boundaries are moved. There are two options how this can be handled: either add a # sign to the verseschema= option (like verseschema=#<name>@<dbname>), which means that the export will still follow the verse schema exactly, only that in case a book contains both gaps (empty verses) and merged verses, verse content gets shifted to keep every verse separate (adding real verse numbers to the beginning of the verse text). Another option exploits an implementation detail in Accordance 13: In some cases, it is possible to import for a versification in case the total verse number matches but not the chapter boundaries (e.g if a versification has chapters with 13 and 9 verses, and the bible has 12 and 10 verses, it imports fine). To allow that kind of verse number tweaking, you can give a verseschemashift=<nbr> option, where <nbr> is the number of verses that may be added/removed from a single chapter. In case a chapter has gaps at the end of one chapter and merged verses at the end of another chapter, the verse schema is tweaked accordingly. If you want to see when this happens, add a + to the beginning of the number.

The usual workflow when using custom versifications is as follow

  1. Identify which versification formats you may want to use (or export all if you are unsure and have the time/patience to do so).

  2. Export a versification list from Accordance. To do so, open the corresponding Bible, choose Display->Set Text Pane Display->Show As->References only as well as Display->Set Text Pane Display->Advanced->Use English Book Names. Then, select all verses (Edit->Select All) and save them using File->Save Text Selection->Plain Text....

  3. Import the versifications into BibleMultiConverter. Therefore, a database file with extension .bmcv (BibleMultiConverter Versification) is created. The command to do so is:

    java -jar BibleMultiConverter.jar Versification <file>.bmcv import AccordanceReferenceList <file>.txt <NAME>
    

    Repeat this for every versification you want to import, into the same database file, but using different names.

  4. Run VersificationDetector to decide which module to use. Use the options -title and -ignoreheadlines for best results.

  5. Do the actual conversion, using the verseschema= option as mentioned above.

biblemulticonverter's People

Contributors

bibelsammler avatar dependabot[bot] avatar rolf-smit avatar schierlm avatar seesmof 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  avatar

biblemulticonverter's Issues

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.

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.

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>

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"

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?

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!

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

[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

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?

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

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 - 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

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.

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.

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?

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

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)

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.

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.

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

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.

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?

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!

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?

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]

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.

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

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\\}

E-Sword Import

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

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.

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 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

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

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?

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!

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 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.

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

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 - 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?

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.