Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnLineBible export issues #51

Closed
Michahel opened this issue Apr 3, 2021 · 32 comments
Closed

OnLineBible export issues #51

Michahel opened this issue Apr 3, 2021 · 32 comments
Milestone

Comments

@Michahel
Copy link

Michahel commented Apr 3, 2021

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

@Michahel
Copy link
Author

Michahel commented Apr 3, 2021

When exporting to OnLineBible, every footnote has to be followed (optionally separated by whitespace) either by another footnote, by a letter (Unicode category L), a digit (Unicode category N) or by the end of the verse.

{See comment in 47}
We need to add the em dash () and ASCII dash (-) to this list. In this case, it is necessary that the en dash – #8211 must be mapped into the em dash — #8212 beforehand.
The Online Bible doesn't like "en dash". If this is difficult to do, then in this case it is necessary to add en dash () to this list as well.

@Michahel
Copy link
Author

Michahel commented Apr 3, 2021

When exporting to OnLineBible, every footnote has to be followed (optionally separated by whitespace) either by another footnote, by a letter (Unicode category L), a digit (Unicode category N) or by the end of the verse.

{See comment in 47}
Another problem with this rule. I requested in this comment to add a back slash (\) to this list. It turned out that it was necessary to enter not a character, but a NewLineCode \&, which consists of two characters. Thus, \! (and similar formatting codes) should move, but \& should not. The algorithm may be simplified if all \& are previously transferred to a new line, as I asked in the comment. Then you can add the character \n (end of line) to this list.

@Michahel
Copy link
Author

Michahel commented Apr 3, 2021

I am getting a flood of the following warnings:

WARNING: Cross reference references more than one book: 2Sam 11:1-12:999 - replacing by plain text; Ge 44:5
WARNING: Cross reference references more than one book: Exod 35:30-36:1 - replacing by plain text; Ex 31:1
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; De 29:23
WARNING: Cross reference references more than one book: Gen 29:31-30:24 - replacing by plain text; Ru 4:11
WARNING: Cross reference references more than one book: 1Chr 15:25-16:3 - replacing by plain text; 2Sa 6:1
WARNING: Cross reference references more than one book: 2Chr 4:11-5:1 - replacing by plain text; 1Ki 7:40
WARNING: Cross reference references more than one book: 2Chr 5:2-6:2 - replacing by plain text; 1Ki 8:1
WARNING: Cross reference references more than one book: 2Chr 13:1-14:1 - replacing by plain text; 1Ki 15:1
WARNING: Cross reference references more than one book: 2Chr 15:16-16:6 - replacing by plain text; 1Ki 15:9
WARNING: Cross reference references more than one book: 2Chr 20:31-21:1 - replacing by plain text; 1Ki 22:41
WARNING: Cross reference references more than one book: 2Chr 25:25-26:2 - replacing by plain text; 2Ki 14:17
WARNING: Cross reference references more than one book: 2Chr 35:20-36:1 - replacing by plain text; 2Ki 23:28
WARNING: Cross reference references more than one book: 2Kgs 11:21-12:3 - replacing by plain text; 2Ch 24:1
WARNING: Cross reference references more than one book: 2Kgs 23:36-24:6 - replacing by plain text; 2Ch 36:5
WARNING: Cross reference references more than one book: 2Sam 15:1-17:29 - replacing by plain text; Ps 3:1
WARNING: Cross reference references more than one book: 1Sam 21:10-22:1 - replacing by plain text; Ps 33:1
WARNING: Cross reference references more than one book: 2Sam 11:1-12:23 - replacing by plain text; Ps 50:2
WARNING: Cross reference references more than one book: 1Sam 21:1-22:999 - replacing by plain text; Ps 51:2
WARNING: Cross reference references more than one book: 1Chr 18:1-19:999 - replacing by plain text; Ps 59:2
WARNING: Cross reference references more than one book: 1Sam 23:1-24:999 - replacing by plain text; Ps 62:1
WARNING: Cross reference references more than one book: 2Sam 15:13-17:29 - replacing by plain text; Ps 62:1
WARNING: Cross reference references more than one book: Exod 7:1-12:999 - replacing by plain text; Ps 77:12
WARNING: Cross reference references more than one book: Exod 7:1-12:999 - replacing by plain text; Ps 77:52
WARNING: Cross reference references more than one book: Gen 6:1-8:999 - replacing by plain text; Ps 103:9
WARNING: Cross reference references more than one book: Gen 39:1-41:999 - replacing by plain text; Ps 104:22
WARNING: Cross reference references more than one book: Exod 7:1-12:999 - replacing by plain text; Ps 104:36
WARNING: Cross reference references more than one book: Num 13:1-14:999 - replacing by plain text; Ps 105:27
WARNING: Cross reference references more than one book: Judg 1:19-2:5 - replacing by plain text; Ps 105:39
WARNING: Cross reference references more than one book: 2Kgs 18:1-20:999 - replacing by plain text; Pr 25:1
WARNING: Cross reference references more than one book: 2Chr 29:1-32:999 - replacing by plain text; Pr 25:1
WARNING: Cross reference references more than one book: 2Kgs 15:1-16:20 - replacing by plain text; Isa 1:1
WARNING: Cross reference references more than one book: 2Kgs 18:1-20:999 - replacing by plain text; Isa 1:1
WARNING: Cross reference references more than one book: 2Chr 26:1-32:999 - replacing by plain text; Isa 1:1
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; Isa 1:9
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; Isa 13:19
WARNING: Cross reference references more than one book: Isa 36:1-37:999 - replacing by plain text; Isa 22:12
WARNING: Cross reference references more than one book: Isa 52:13-53:12 - replacing by plain text; Isa 42:1
WARNING: Cross reference references more than one book: Isa 52:13-53:12 - replacing by plain text; Isa 49:1
WARNING: Cross reference references more than one book: Isa 52:13-53:12 - replacing by plain text; Isa 50:4
WARNING: Cross reference references more than one book: 2Kgs 22:1-25:7 - replacing by plain text; Jer 1:3
WARNING: Cross reference references more than one book: 2Chr 34:1-36:14 - replacing by plain text; Jer 1:3
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; Jer 23:14
WARNING: Cross reference references more than one book: 2Kgs 18:1-20:999 - replacing by plain text; Jer 26:18
WARNING: Cross reference references more than one book: 2Chr 29:1-32:999 - replacing by plain text; Jer 26:18
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; Jer 49:18
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; Jer 50:40
WARNING: Cross reference references more than one book: 2Kgs 24:20-25:21 - replacing by plain text; Jer 52:3
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; La 4:6
WARNING: Cross reference references more than one book: 2Kgs 23:31-24:6 - replacing by plain text; Eze 19:9
WARNING: Cross reference references more than one book: 2Kgs 24:18-25:7 - replacing by plain text; Eze 19:14
WARNING: Cross reference references more than one book: 2Kgs 23:36-24:7 - replacing by plain text; Da 1:1
WARNING: Cross reference references more than one book: 2Kgs 14:23-20:21 - replacing by plain text; Ho 1:1
WARNING: Cross reference references more than one book: 2Chr 26:1-32:999 - replacing by plain text; Ho 1:1
WARNING: Cross reference references more than one book: 2Kgs 9:1-10:999 - replacing by plain text; Ho 1:4
WARNING: Cross reference references more than one book: Judg 19:1-20:999 - replacing by plain text; Ho 9:9
WARNING: Cross reference references more than one book: Judg 19:1-20:999 - replacing by plain text; Ho 10:9
WARNING: Cross reference references more than one book: Gen 27:41-28:5 - replacing by plain text; Ho 12:12
WARNING: Cross reference references more than one book: 2Kgs 14:23-15:7 - replacing by plain text; Am 1:1
WARNING: Cross reference references more than one book: Exod 7:14-12:30 - replacing by plain text; Am 4:10
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; Am 4:11
WARNING: Cross reference references more than one book: 2Kgs 15:32-20:21 - replacing by plain text; Mic 1:1
WARNING: Cross reference references more than one book: 2Chr 27:1-32:999 - replacing by plain text; Mic 1:1
WARNING: Cross reference references more than one book: Num 22:1-24:999 - replacing by plain text; Mic 6:5
WARNING: Cross reference references more than one book: Josh 3:1-4:999 - replacing by plain text; Mic 6:5
WARNING: Cross reference references more than one book: 2Kgs 22:1-23:30 - replacing by plain text; Zep 1:1
WARNING: Cross reference references more than one book: 2Chr 34:1-35:999 - replacing by plain text; Zep 1:1
WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; Zep 2:9
WARNING: Cross reference references more than one book: Matt 5:1-7:29 - replacing by plain text; Mt 5:1
WARNING: Cross reference references more than one book: Mark 8:34-9:1 - replacing by plain text; Mt 16:24
WARNING: Cross reference references more than one book: John 18:39-19:16 - replacing by plain text; Mt 27:15
WARNING: Cross reference references more than one book: John 18:39-19:16 - replacing by plain text; Mr 15:6
WARNING: Cross reference references more than one book: Mark 8:34-9:1 - replacing by plain text; Lu 9:23
WARNING: Cross reference references more than one book: John 18:39-19:16 - replacing by plain text; Lu 23:13
WARNING: Cross reference references more than one book: Ezek 20:45-21:7 - replacing by plain text; Lu 23:31
WARNING: Cross reference references more than one book: Gen 39:1-50:999 - replacing by plain text; Ac 7:16
WARNING: Cross reference references more than one book: Exod 1:1-2:10 - replacing by plain text; Ac 7:22
WARNING: Cross reference references more than one book: Acts 20:5-21:18 - replacing by plain text; Ac 16:10
WARNING: Cross reference references more than one book: Acts 27:1-28:16 - replacing by plain text; Ac 16:10
WARNING: Cross reference references more than one book: Gen 6:5-9:17 - replacing by plain text; Heb 11:7
WARNING: Cross reference references more than one book: Gen 6:5-9:17 - replacing by plain text; 2Pe 2:5
WARNING: Cross reference references more than one book: Ezek 2:8-3:3 - replacing by plain text; Re 10:10

For convenience, I have included information about the verse where this Cross Reference was found at the end of each warning. By the way, it would be more convenient if the BibleMultiConverter did it. Some cross references look like they are invalid, but many references are correct. Why they are replaced with plain text? Is it possible to make them also appear as hypertext links?

@schierlm
Copy link
Owner

schierlm commented Apr 3, 2021

The algorithm may be simplified if all \& are previously transferred to a new line, as I asked in the comment. Then you can add the character \n (end of line) to this list.

To understand this correctly, it is not required to replace newlines by \& at the first place? Regardless where they appear? Not replacing them at the first place is definitely easier than replacing them by \&, and later replacing \& back by newlines.

WARNING: Cross reference references more than one book: Gen 18:20-19:29 - replacing by plain text; De 29:23
Why they are replaced with plain text? Is it possible to make them also appear as hypertext links?

The documentation you linked (I don't find the link right now) says that cross references have to be either XXX 1:2 or XXX 1:2-3 format (so either a single verse or a range in verses in one chapter). These references have different starting and ending chapters. So is there a format for them too, or should they get expanded to multiple references (like \\# GEN 18:20-999 GEN 19:1-29\\. Which can get pretty long if it is 5 or more chapters...

@Michahel
Copy link
Author

Michahel commented Apr 3, 2021

To understand this correctly, it is not required to replace newlines by \& at the first place? Regardless where they appear? Not replacing them at the first place is definitely easier than replacing them by \&, and later replacing \& back by newlines.

I have not shown an example. This is my big oversight. I hope that after the example, everything will be clear. I'll take Ge 3:13 as an example. There are several NewLineCodes \& in one verse.

$$$ Ge 3:13 
Тогда Вечный Бог сказал женщине:\&– Что же ты сделала?\&Женщина ответила:\&– Змей обманул меня, вот я и ела.

Everything in one line. What I suggested is this:

$$$ Ge 3:13 
Тогда Вечный Бог сказал женщине:
\&– Что же ты сделала?
\&Женщина ответила:
\&– Змей обманул меня, вот я и ела.

Now a four-line verse. Each line starts with a NewLineCode \& (except for the first line).

The documentation you linked (I don't find the link right now) says that cross references have to be either XXX 1:2 or XXX 1:2-3 format (so either a single verse or a range in verses in one chapter). These references have different starting and ending chapters. So is there a format for them too, or should they get expanded to multiple references (like \\# GEN 18:20-999 GEN 19:1-29\\. Which can get pretty long if it is 5 or more chapters...

Yes you are right. The help I gave the link does not contain all the necessary examples. I will have to supplement myself. In the warning list, almost all of the verse range references look correct. Except when verse 999 is indicated. Instead of 999, find the last verse in this chapter. For example, instead of \\#2Sa 11:1-12:999\\, there should be \\#2Sa 11:1-12:31. It is also possible to specify a verses range when several books fall into the range:

\\#1Ki 17:1 - 2Ki 2:25\\ or \\#Joh 21:1 - Ac 2:11\\

This displays all the verses from 1 Kings 17:1 to 2 Kings 2:25 or from john 21:1 to Acts 2:11.

@schierlm
Copy link
Owner

schierlm commented Apr 4, 2021

Thank you, that indeed clarifies it. So put a newline before every newline marker, but leave the newline marker intact.

About finding the last verse: Do you know if the versification mapping is also applied to imported cross references? In other words, if KJV versification is ignored and the last verse of Ex 7 is verse 29, yet the KJV has only 25 verses there, should Ex 7:1-999 be converted to \\#Ex 7:1-29\\ or \\#Ex 7:1-25\\? In case the book/chapter is not included in the given Bible, I'd obviously have to use the KJV versification's verse count in any case.

@Michahel
Copy link
Author

Michahel commented Apr 4, 2021

So put a newline before every newline marker, but leave the newline marker intact.

How briefly and clearly this thought can be expressed in English. I see that you have understood me correctly now.

About finding the last verse: Do you know if the versification mapping is also applied to imported cross references?

Yes, I know that well. The program does not remap cross references in importing Verse Note. This feature could be expanded in the future. I believe that the information contained in the xxx.RMP file is sufficient for such a remapping.
The Online Bible is developed in Delphi 2009. I myself have personally refined this functionality, ensuring that not only the entire verses are remapped, but also when the verses are splited, or, on the contrary, are merged. It seems to me that you understand programming much better than me and you could solve this problem better than me. But on the other hand, since the Online Bible takes on the task of remapping verses using an xxx.RMP file, then it is the Online Bible that should solve this task for cross references. Otherwise, the user will have real confusion.

In other words, if KJV versification is ignored and the last verse of Ex 7 is verse 29, yet the KJV has only 25 verses there, should Ex 7:1-999 be converted to \\#Ex 7:1-29\\ or \\#Ex 7:1-25\\?

With that said, there is no need to perform any conversions. But my question is, how do you know that Ex 7:1-999 needs 29? I understand that you are taking a fictional example. But theoretically, it won't be difficult for you to find all the last verses that are used in this particular Bible version? If this is not difficult for you to do, then this is great. This will make my task easier when I expand on the remapping functionality that is now available in the Online Bible.

@Michahel
Copy link
Author

Michahel commented Apr 4, 2021

In verse Ge 10:2 the reference is created as follows: \\#Ge 10:3 Ge 10:4 Ge 10:6 Ge 10:7 Ge 10:20-23 Ge 10:29\\. This reference works well in the Online Bible, so this issue is not critical. But nevertheless, I would like to optimize such references to the form:

\\#Ge 10:3,4,6,7,20-23,29\\

@schierlm
Copy link
Owner

schierlm commented Apr 4, 2021

The Online Bible is developed in Delphi 2009.

A few decades ago I used to program in Delphi 5 too (and Visual Basic 6). However, with the advent of Windows XP it became obvious that Delphi 5 took some design decisions that made it hard or even impossible to write modern user interfaces. That was the point when I switched over to C# and Java.

But theoretically, it won't be difficult for you to find all the last verses that are used in this particular Bible version?

It is not. Asking a Chapter for its largest verse is not harder than asking StandardVersification.KJV for the largest verse. The only extra work is providing a switch whether you IgnoreKJV or not.

In verse Ge 10:2 the reference is created as follows: \\#Ge 10:3 Ge 10:4 Ge 10:6 Ge 10:7 Ge 10:20-23 Ge 10:29\\. This reference works well in the Online Bible, so this issue is not critical. But nevertheless, I would like to optimize such references to the form:

\\#Ge 10:3,4,6,7,20-23,29\\

I do not think I will implement this one. This is again some case where the limited support for references in USX would create a feature in OnLineBible exporter that is hard to get right for other imports and all cases.

Probably you can get something similar by postprocessing the files with some regular expressions (as you know that all the references will have this format). And as you said, the reference works fine in OnLineBible anyway.

schierlm added a commit that referenced this issue Apr 6, 2021
- Collapse consecutive whitespace (again) after moving text before footnotes
- Add newline character before every `\&` occurrence
- Do not move dashes over footnotes, replace en dash by em dash before doing so
- Allow cross references to multiple chapters; limit last verse number by versification

See #51.
@schierlm
Copy link
Owner

I believe all the issues have been fixed.

@schierlm schierlm added this to the v0.0.8 milestone Jun 2, 2021
@Michahel
Copy link
Author

Michahel commented Nov 7, 2023

In the Online Bible there are different types of hypertext linking commands. In the following table is shown the difference between two of them.

Command Action Example for OLB Example for MyBible
# reference(s) Displays the Bible text for the reference or references listed. Separate multiple references using a space, a comma, or a semi-colon. \\# joh 1:1\\

\\# joh 1:3 heb 1:2\\
<a href='B:500 1:1'>joh 1:1</a>

<a href='B:500 1:3'>joh 1:3</a>; <a href='B:650 1:2'>heb 1:2</a>
==> note..."Lk 1:4" Displays the user note for the specified verse. You must enclose the note reference in quotations and use the proper Bible book abbreviation. \\==> Lk 1:4 "Lk 1:4"\\

\\==> 1:4 "Lk 1:4"\\
<a href='C:@490 1:4'>Lk 1:4</a>

<a href='C:@490 1:4'>1:4</a>

In the last column I show how this type of link looks in MyBible. When converting from MyBible to Online Bible the first type of link converts well and the second not. I hope that the table itself in its comprehensive way shows in which way it should be converted. In case clarification is required then I will demonstrate by way of discussion.

@schierlm
Copy link
Owner

schierlm commented Nov 7, 2023

Михаил,

my converter does not try to implement every feature that two or more Bible formats are supporting, it rather focuses on the common ones (Scripture, Strongs, headlines, footnotes, emphasis, simple cross references). In MyBible, C:@ links are links that point to (unspecified) commentary modules, and since converting commentary modules is not supported, I do not plan to implement conversion of this feature into any other Bible format, either.

@Michahel
Copy link
Author

Michahel commented Nov 8, 2023

Михаил,

my converter does not try to implement every feature that two or more Bible formats are supporting, it rather focuses on the common ones (Scripture, Strongs, headlines, footnotes, emphasis, simple cross references). In MyBible, C:@ links are links that point to (unspecified) commentary modules, and since converting commentary modules is not supported, I do not plan to implement conversion of this feature into any other Bible format, either.

Why do you write that the module does not support converting commentary modules? I created two modules: МакАрт-к.SQLite3 and МакАрт-к.commentaries.SQLite3. I launched a utility:

java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone МакАрт-к.SQLite3 OnLineBible R:\_МакАрт-к.Exp IgnoreKJV

As a result I get the result I need. All the footnotes which are in the МакАрт-к.commentaries.SQLite3 module are successfully converted. The C:@ link is converted like a simple text and not a hypertext linking command. If supporting a special kind of link (==> note...”Lk 1:4”) is such a difficult task then maybe it could be changed into a simple text (”Lk 1:4”), but a little differently.

For example: Now C:@ link is transformed in the following way:

MyBible Online Bible
<a class='B' href='C:@470 21:9'>Mt 21:9</a> Mt 21:9
<a class='B' href='C:@470 21:9'>21:9</a> 21:9
<a href='C:@470 21:9'>Mt 5:46</a> Mt 5:46
<a href='C:@470 21:9'>5:46</a> 5:46

Instead, it is necessary that in both cases the transformation took place like this:

MyBible Online Bible
<a class='B' href='C:@470 21:9'>Mt 21:9</a> "Mt 21:9"
<a class='B' href='C:@470 21:9'>21:9</a> "Mt 21:9"
<a href='C:@470 21:9'>Mt 5:46</a> "Mt 5:46"
<a href='C:@470 21:9'>5:46</a> "Mt 5:46"

You must agree that in this case there is also definitely not the support of a special kind of link but, at the same time the quality of conversion is noticeably better.

@schierlm
Copy link
Owner

schierlm commented Nov 8, 2023

Why do you write that the module does not support converting commentary modules? I created two modules: МакАрт-к.SQLite3 and МакАрт-к.commentaries.SQLite3. I launched a utility:

java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone МакАрт-к.SQLite3 OnLineBible R:\_МакАрт-к.Exp IgnoreKJV

As a result I get the result I need. All the footnotes which are in the МакАрт-к.commentaries.SQLite3 module are successfully converted.

I should have written that the conversion of standalone commnetaries is not supported. Your commentaries.SQLite3 file which has "is_footnotes", "true" in its info table will not show up as a commentary in MyBible (i.e. you cannot open it in a separate "window" and scroll it along to the Bible text), but it will only provide the contents of "bubbles" that are shown when you click a footnote marker. These files, which are technically modules, but do not show up as modules, are supported. But only alongside with its bible modules, and if it contains anything that is not a footnote, it will be silently discarded. These footnote modules can also contain more than one footnote per verse, and as far as I am seen are not link targets for C:@ links (which will instead open the commentary module alongside with the Bible).

Commentary modules, which contain (at most) one entry for a verse, and are separate from Bible modules (can be scrolled alongside any bible) are supported by many Bible programes, but not by BibleMultiConverter.

This is a hobby project I do in my spare time. Therefore, nobody has a (human) right to decide on what I have to spend it on. And I'd rather spend the time in improving conversion of the existing features to more Bible formats (like this whole issue started) than adding even more features which I would then have to add not only for MyBibleZone and OnLineBible, but for all formats that support it (or users of e.g. Logos will rightfully complain that they also want commentary links converted to their format).

The C:@ link is converted like a simple text and not a hypertext linking command.

Like every other "unsupported" link type, e.g. hyperlink to website or to MyBible's feature pages. When you convert to a roundtrip format (e.g. Diffable or RountripTaggedText or RoundtripXML), the hyperlink information is preserved, so that you can use your favourite tools to change these links (or their text representation) before converting to OnLineBible format. Converting from X to any roundtrip format and then to Y will not lose any information compared to converting directly from X to Y.

If supporting a special kind of link (==> note...”Lk 1:4”) is such a difficult task

This is the wrong attitude. As I wrote, there is no (human) right to create any issues here and GitHub has the tools to block people from commenting on my projects if required.

And since the project is open source, you can always give it a try and implement it yourself or pay someone to do so. Pull Requests for new features are welcome, but when you add a new feature, please try to implement it equally well for all Bible formats that support it, if you want me to include it. In your private fork, you can of course implement it as you like (e.g. only for MyBible to OnLineBible, or only when the character set is cyrillic, etc).

then maybe it could be changed into a simple text (”Lk 1:4”), but a little differently.

For example: Now C:@ link is transformed in the following way:

MyBible Online Bible
Mt 21:9 Mt 21:9
21:9 21:9
Mt 5:46 Mt 5:46
5:46 5:46
Instead, it is necessary that in both cases the transformation took place like this:

MyBible Online Bible
Mt 21:9 "Mt 21:9"
21:9 "Mt 21:9"
Mt 5:46 "Mt 5:46"
5:46 "Mt 5:46"

This probably depends on the module. What if the text looks like?

See also commentaries about <a href="C:@470 21:1">the next chapter</a>.

Will you then want to replace "the next chapter" by "Mt 21:1"?

You must agree that in this case there is also definitely not the support of a special kind of link but, at the same time the quality of conversion is noticeably better.

Debatable. The original module author chose a text for his link, so replacing that text with a canonical verse reference must not necessarily be better.

Repository owner locked and limited conversation to collaborators Nov 8, 2023
Repository owner unlocked this conversation Nov 8, 2023
@Michahel
Copy link
Author

Michahel commented Nov 9, 2023

The bold is saved when converted but the italic isn’t. In the next table is shown in which way the italic should transform in the inner format using the Online Bible.

MyBible Online Bible
<i>italics</i> \@italics\@

@schierlm
Copy link
Owner

schierlm commented Nov 9, 2023

As per #47 (comment) and 4f1613a, this is already implemented, except for when the italics appears inside a headline or footnote.

If it does not work, please share an example where italics outside of a headline and footnote are not converted.

Should the exceptions be removed again?

@schierlm schierlm reopened this Nov 9, 2023
@Michahel
Copy link
Author

As per #47 (comment) and 4f1613a, this is already implemented, except for when the italics appears inside a headline or footnote.

The problem just applies namely to the footnote. It has to do with the fact that I didn’t consider one feature of the behavior of Online Bible. Online Bible in the footnotes uses italic only till the code appears \& (newline). Therefore, when converted <i>...</i> must be suppressed until \& is encountered.

@schierlm schierlm modified the milestones: v0.0.8, v0.0.9 Nov 11, 2023
@Michahel
Copy link
Author

Michahel commented Apr 4, 2024

There is the option IncludeStrongs, which allows the Strong's numbers to be placed but there is no option which allows morphology codes to be placed. At present, the morphology codes are accessible in many Greek texts, for example: TR 1550 - Textus Receptus Text and 1881 Westcott Hort Greek Text. Morphology codes in these modules fit in the footnotes "{..........}".

@schierlm
Copy link
Owner

schierlm commented Apr 6, 2024

This is not different to other grammar information, like for example Louw-Nida or Lemma, which may be present in the module but have no special syntax in OnLineBible. The StrippedDiffable module provides an option to move such information into footnotes. When you export the result to OnLineBible (or, in fact any format that supports footnotes) they appear as footnotes like you want them.

In 87b9a6d I greatly increased the options to decide which kind of information you want to copy to footnotes. So you can just copy Morphology tags to footnotes, but keep Strongs and everything else where it was. Or you can copy both Morphology and Louw-Nida to footnotes, but format Morphology in bold and Louw-Nida in underlined. Or add prefix "Louw-Nida:" to every Louw-Nida footnote.

@Michahel
Copy link
Author

This is not different to other grammar information, like for example Louw-Nida or Lemma, which may be present in the module but have no special syntax in OnLineBible
In 87b9a6d I greatly increased the options to decide which kind of information you want to copy to footnotes. So you can just copy Morphology tags to footnotes, but keep Strongs and everything else where it was. Or you can copy both Morphology and Louw-Nida to footnotes, but format Morphology in bold and Louw-Nida in underlined. Or add prefix "Louw-Nida:" to every Louw-Nida footnote.

If such a option can be done for the StrippedDiffable format then that means that such a option can be done for the OnLineBible format as well. I don’t understand how I can use the result I received in the StrippedDiffable format? if my goal is to convert it to OnLineBible.

@schierlm
Copy link
Owner

If such a option can be done for the StrippedDiffable format then that means that such a option can be done for the OnLineBible format as well.

I just don't have the time and resources to add every obscure option that is useful for 1% or less of bibles to all the more than 50 export formats supported by this converter. If anybody supplies patches, I'm glad to review and merge, but as long as nobody has that unlimited time, you have to use the options that are already available.

I don’t understand how I can use the result I received in the StrippedDiffable format? if my goal is to convert it to OnLineBible.

The Diffable format and its variants have the property that converting from X to Diffable and then Diffable to Y loses no information, when compared with direct conversion. So, for example you can do

java -jar BibleMultiConverter-AllInOneEdition.jar MySword X:\AFV+.bbl.mybible StrippedDiffable X:\afv.bmc CopyToFootnote Morph
java -jar BibleMultiConverter-AllInOneEdition.jar Diffable X:\afv.bmc OnLineBible X:\AFV.Exp IncludeStrongs

To convert AFV from MySword to OnLineBible while having all morphology tags in footnotes and Strongs numbers in OnLineBible's native format.

@Michahel
Copy link
Author

#51 (comment)
Thank you. That is a very good idea. A good example which can quickly help to understand how to put it into practice.

I made two commands:


java -Dmybiblezone.morphology.raw=true -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone N:\Bibles\VIN-el+.SQLite3 StrippedDiffable R:\_VIN_el_1.bmc CopyToFootnote Strongs

java -Dmybiblezone.morphology.raw=true -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone N:\Bibles\VIN-el+.SQLite3 StrippedDiffable R:\_VIN_el_2.bmc CopyToFootnote Strongs Morph

As a result I received two identical files. I need to copy it in the footnotes and at the same time the Strongs number and Morphological code. May I do that?

@schierlm
Copy link
Owner

I assume you need the morphology.rawtag attribute as the morphology does not follow RMAC or WIVU? This results in morphology not being stored in morphology tags but in extra attributes of type mybiblezone:rawtag:m. (Even if I had added support for exporting morphology to OnLineBible, it would not have been worked, as there are no morphology tags in the converted bible anyway).

But I got you covered there, too. In that case, you can use CopyToFootnote ExtraAttribute:mybiblezone:rawtag:m to get the morphology tags copied. Footnotes will still be there, as well as Strongs (which you can either copy to footnotes or use IncludeStrongs in OnLineBible export).

Hope this helps.

@Michahel
Copy link
Author

#51 (comment)
Thank you very much. We’ve already reached a wonderful result. Her is what we have already:


$$$ Ge 1:1

Ἐν \@В\@ {H1722} {PREP} ἀρχῇ \@начале\@ {H746} {N-DSF} ἐποίησεν \@сотворил\@ {H4160} {V-AAI-3S} ὁ {H3588} {T-NSM} θεὸς \@Бог\@ {H2316} {N-NSM} τὸν {H3588} {T-ASM} οὐρανὸν \@небо\@ {H3772} {N-ASM} καὶ \@и\@ {H2532} {CONJ} τὴν {H3588} {T-ASF} γῆν. \@землю.\@ {H1093} {N-ASF}

It creates an impression that I don’t know all the possibilities which are in the tool. I want to learn to use the following option:


[@[<prefixFormat>:]<format>][+<prefix>]

For example: I want the Strongs number to look like this:


... {<1722> PREP} ...

Can I do something similar to this?

@schierlm
Copy link
Owner

For example: Morph@b:i+RMAC will convert a Morphology of CONJ to a footnote that contains

RMAC CONJ

assuming the destination format supports bold and italic in footnotes.

Fo get something like you desire, I would use custom prefixes like

Strongs+Strong: Morph+Morph:

and then use regular expressions or similar to replace { Strongs: H[0-9]+ } { Morph: [A-Z0-9-]+ } by the format you like.

@Michahel
Copy link
Author

Very good explanation. Now everything is understandable. Here is one more problem which, in my opinion, needs a solution.

Element “<css style="font-style: italic; myBibleType=note">” contains within itself two modifiers:

  1. font-style: italic;

  2. myBibleType=note

Modifier 1 is taken into account and modifier 2 is not. For example:


<css style="font-style: italic; myBibleType=note">Книга</>

This word after the conversion in the OnLineBible format turns into the following:


\@Книга\@

but should be like this:


{\@Книга\@}

and with the report the change b7644bf is like this:


{Книга}

because here the newline is absent.

@schierlm
Copy link
Owner

myBibleType=note is the conversion of MyBibleZone's <n> tag, which usually (as far as I have seen) is used around words that are not part of the Original Language text but are needed to be added to make the grammar right (like adding an and in the English translation). I do not think you want to put those into footnotes, which would effectively hide them from normal reading flow in most formats. Some formats have a special tag for that (e.g. \add* in USFM), but most don't, so the only thing that remains is italic text.

When there are some bibles who use <n> where actually <f> should have been used (i.e. a footnote), you could use OptimizeFormatting SplitCSS option to StrippedDiffable to split the css tag into two, then replace the <css style="font-style: italic; myBibleType=note"> by <fn>. Or replace the whole css tag by as you won't see the Italics in the footnote anyway. When you say that most bibles in some language I don't speak use <n> for <f>, maybe I will add an option to treat <n> as <f> when importing from MyBibleZone.

@Michahel
Copy link
Author

myBibleType=note is the conversion of MyBibleZone's <n> tag, which usually (as far as I have seen) is used around words that are not part of the Original Language text but are needed to be added to make the grammar right (like adding an and in the English translation). I do not think you want to put those into footnotes, which would effectively hide them from normal reading flow in most formats. Some formats have a special tag for that (e.g. \add* in USFM), but most don't, so the only thing that remains is italic text.

That which you are talking about in MyBible corresponds with tag <i>, and not tag <n>. For more detailed information look at the section: Supported embedded tags for the verses.text field. That which is in Online Bible is considered footnotes in the terminology of MyBible — it is the explanation which can be displayed on the screen or be hidden with the help of a special option. In MyBible the explanations are concluded in the <n> tag.

And so we can boldly talk about the mistake in conversion which is conditioned with the incorrect perception of the <n> tag.

@schierlm
Copy link
Owner

It is indeed a good idea to sometimes look at the latest version of the specification :-)
Created issue #89 for it.

@Michahel
Copy link
Author

For example: Morph@b:i+RMAC will convert a Morphology of CONJ to a footnote that contains

RMAC CONJ

assuming the destination format supports bold and italic in footnotes.

Fo get something like you desire, I would use custom prefixes like

Strongs+Strong: Morph+Morph:

and then use regular expressions or similar to replace { Strongs: H[0-9]+ } { Morph: [A-Z0-9-]+ } by the format you like.

When copying Strong's numbers into the footnotes for the New Testament the numbers in the footnotes begin with G. This is not always correct. In the module "BHS-DHNT+ - ...Delitzsch's Hebrew New Testament with vowels and strong's number" the Strong's numbers in the New Testament are not Greek but Hebrew. That is, it should not be the prefix G but H. Is it not better to allow the user himself to determine what prefix he needs? In other words, I suggest that the option Strongs+H gave the expected result: H5616, and not H G5612, as that is how it is working now.

@schierlm
Copy link
Owner

schierlm commented May 20, 2024

@Michahel, thanks for the report.

In fact, the issue is not as simple as you thought. When opening the module in MyBible.Zone, the numbers correctly link to the Hebrew Dictionary. In fact, Strong's numbers in MyBibleZone format can contain prefix letters (and some even use X and Y to denote numbers for words that did not exist in the original KJV and therefore have no Strong numbers). But, when numbers have no prefix, a bible can declare in its INFO table what prefix to use:

image

Only if this is unspecified and the numbers do not have prefixes themselves, it should fall back to use H in OT and G in NT.

This logic was broken, I will push a fix later today to correct this import mistake. If you convert again, you will see H as the prefix and export to OnLineBible should work as you expect it.

@schierlm
Copy link
Owner

Pushed in 3bbdf13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants