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

USX to OnLineBible - Invalid conversion #42

Closed
Michahel opened this issue Mar 26, 2021 · 1 comment
Closed

USX to OnLineBible - Invalid conversion #42

Michahel opened this issue Mar 26, 2021 · 1 comment
Milestone

Comments

@Michahel
Copy link

Michahel commented Mar 26, 2021

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

schierlm added a commit that referenced this issue Mar 26, 2021
- Use UTF-8 charset
- Do not force a verse split if a verse contains a headline in the
  middle

Fixes #44.
See #42.
@schierlm
Copy link
Owner

I did not believe how hard it is to debug errors in handling text that contains characters where you do not even know how to pronounce them. I had to replace the words by random English/Latin ones just to be able to quickly grasp what was going on.

When importing Paratext formats (USFM/USX) and there is a headline directly before a paragraph starting a verse, the headline should become part of that next verse and not the previous one (at least most Non-paratext formats like to treat it like that).

So, in (USFM)

\p \v 1 FirstVerse
\s1 Headline
\p \v 2 SecondVerse

the Headline should belong to verse 2 and should look like this in OnLineBible:

$$$ Ge 1:1
FirstVerse
$$$ Ge 1:2
 {\$Headline\$} SecondVerse

However, this logic went wrong in case the second paragraph contains parts of the previous verse and at least one new verse:

\p \v 1 FirstVerse
\s1 Headline
\p DidNotEndYet \v 2 SecondVerse

Was converted as if it was

\p \v 1 FirstVerse
\s1 Headline DidNotEndYet
\p \v 2 SecondVerse

Also, when exporting to OnLineBible, a flag in BibleMultiConvertor's verse mapping logic (required to join verses if they fall outside of KJV versification) accidentally split up verses if they had a headline in the middle. This logic was removed since I don't believe it is needed for OnLineBible.
Should be fixed now.

Michahel referenced this issue Mar 31, 2021
- Add UTF-8 BOM to file
- Export cross references in structured form instead of plain text
- When using the `IgnoreKJV` option, do not split/reorder/merge verses

Fixes #45.
Fixes #46.
@schierlm schierlm added this to the v0.0.8 milestone Jun 2, 2021
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