schierlm / BibleMultiConverter

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

[question] How to read MyBible .sqlite3 file and export it clean? #92

Closed paulocoutinhox closed 1 month ago

paulocoutinhox commented 1 month ago

Hi,

How to read MyBible .sqlite3 file and export it clean?

I want the portuguese versions of Bible without the tags, only the text.

Thanks.

schierlm commented 1 month ago

So you only want verse texts, no prologs, introductions, line breaks, headlines, footnotes or other formatting? Then StrippedDiffable is the format you are looking for.

Do you want the result as MyBible again? In that case you need to convert it twice:

java -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone A21.SQLite3 StrippedDiffable temp.txt StripPrologs StripFootnotes StripHeadlines StripFormatting StripRawHTML StripIntroductionBooks StripLineBreaks

java -jar BibleMultiConverter-AllInOneEdition.jar Diffable temp.txt MyBibleZone A21New.SQLite3

Hope this helps.

paulocoutinhox commented 1 month ago

Hi,

Do you have a recent "BibleMultiConverter-AllInOneEdition.jar"? Because the release version is too old.

Thanks.

paulocoutinhox commented 1 month ago

I download and generate the .jar.

When i execute, it generate a new database with the same extra texts from original sqlite3 bible, but without the tags <n> etc.

image

I want a way to keep only the bible text, clean, without nothing extra.

Example: https://www.ph4.org/_dl.php?back=bbl&a=LTT&b=mybible&c

schierlm commented 1 month ago

Ah, I see your issue now. That LTT uses <n> for footnotes, but the converter treats them as added/italic text. Strip Formatting would remove text in footnotes, but formatted text is replaced by unformatted text. Let me quickly provide a fix for you.

schierlm commented 1 month ago

New nightly build should be available in a few minutes at

https://nightly.link/schierlm/BibleMultiConverter/workflows/main.yaml/master/BibleMultiConverter-AllInOneEdition-Release.zip

Then try this:

java -Dmybiblezone.note.asfootnote=true -jar BibleMultiConverter-AllInOneEdition.jar MyBibleZone LTT.SQLite3 StrippedDiffable temp.txt StripPrologs StripFootnotes StripFormatting StripLineBreaks

Note that the bible text contains a few tags that are double escaped like <<>i> or that are not properly nested (which my converter warns aboute). You will probably want to search for < in the StrippedDiffable file and fix those manually if you care enough, before doing the back conversion to MyBibleZone format.