schierlm / BibleMultiConverter

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

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

Open schierlm opened 2 months ago

schierlm commented 2 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 1 month ago

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

schierlm commented 1 month 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.