schierlm / BibleMultiConverter

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

Update MyBibleZone verse tag parsing to conform to latest specification #89

Open schierlm opened 6 months ago

schierlm commented 6 months ago

When I implemented MyBibleZone format 8 years ago, the (English) documentation was a lot more terse than today.

For example:

Today's spec reads as follows (with more formatting as well):

Tag Description
<e>…</e> The pair of tags specifying that a text inside the tagged area shall be emphasized in the Bible reading window.
<i>…</i> The pair of tags specifying that a text inside the tagged area represents inserted word(s), i.e. not present in the Hebrew or Greek Bible manuscript and added just for a sentence coherence in the module's language.
<n>…</n> А pair of tags specifying that a text inside the tagged area represents a note (an explanation) added to the Bible text. Example: But there went up a mist from the earth, and watered the whole face of the ground. <n>there…: or, a mist which went up from, etc.</n>
<f>…</f> Surround a footnote marker, which will be represented as a hyperlink to access a footnote for the verse - a footnote having the same footnote marker as the text surrounded by these tags. Example: <pb/>Земля была пуста и пустынна, тьма была над пучиной, и дух <f>[1]</f> Божий веял над водами.

Currently the <n> tag is interpreted like the <i> tag in the new specification, i. e. like USFM's \add* tag.

Tasks:

Presumably, the outcome will be similar to the following:

While at it, maybe create another issue to promote additions (which are currently treated as italic formatting with either extra attribute or css style) to their own formatting style. This will break forward compatibility of roundtrip formats, but since the current release cycle already has two such changes (one for XY strongs, the other for WIVU), better do this change in the same cycle as well.

1p1v4 commented 5 months ago

The specification newly added <h> for titles as well.

schierlm commented 5 months ago

@1p1v4 Thank you for the feedback. Support for <h> has been implemented in c054aa4a9b1089d8b8671ad852b91fe7ff2b7622 (v0.0.7) already. But I will certainly review the spec for this tag to make sure it is implemented accurately.

paulocoutinhox commented 3 months ago

Hi,

This was solved?

Thanks.

schierlm commented 3 months ago

@paulocoutinhox The issue with the <h> tag has been solved. The big underlying issue (updating changes that were made to the spec) has not been started yet. It is nothing I can do in just a few minutes in the evening, I probably need a few hours for it. So it has to wait until I can find the time. Contributions by others are always welcome. Yet, for most use cases, these do not matter too much, so you can still use BibleMultiConverter to convert to or from MyBibleZone format.

schierlm commented 3 months ago

As tested with LTT module in #92, <n> tag is not rendered as footnote, but as gray italic text, like other programs render USFM's "\add" tag. Yet, the content in the <n> tags is what should be in footnotes (whole sentences of description in the middle of a bible verse). Looks ugly in my opinion and distracts reading. With the new noteasfootnote option one can convert those notes to footnotes and then export the bible again to get "real" footnotes.

EDIT When long-tapping on the hamburger menu, there is an option to "hide explanations" which hides these <n> contents.