Jump to content

Alawishis

Member Since 26 Jul 2014
Offline Last Active Aug 13 2014 09:13 PM
-----

Posts I've Made

In Topic: Perl scripts to convert e-Sword 9 bblx and cmtx modules to mysword

07 August 2014 - 11:18 PM

If a christian tells me `that's might "christian" of you`, I can only consider that a compliment. Thank you very much!

I think I fixed it. When there was a nested part (like in this case), I would split it in a head, the nested part and a tail and parse these three parts separately. I changed that to first parse the nested part (recursively) and replace the text with the output of the parse function before parsing the whole text. That means that the nested part gets parsed (at least) twice but during the last run it should not contain any backslashes or braces so it shouldn't matter. Jn 3:13 seems to be handled correctly now.

 

Could you please try the modified script? If it works correctly I will replace the zip file in the original post.

 

To all the non-IT readers of this thread, sorry for the jargon. I found a colleague :D

 

Tested today.  Your fix seems to have nailed it.  Not only does it deal with the nested tags properly it now runs much faster.  In fact it runs so fast now I thought it was broken.  When I used to old program it took about 10 minutes to parse a bible file this latest version takes maybe 10 seconds. 

 

John 3:13 looks good along with other texts with nested tags like John 4:24 , John 4:35 John 2:8 etc.  So far I have found no issues.  I'll update you if I do.

 

Thanks again.  You've changed a pretty good bible app into a fantastic one for me.

 

 

I appreciate the update and the explanation of your fix. 


In Topic: Perl scripts to convert e-Sword 9 bblx and cmtx modules to mysword

05 August 2014 - 11:53 PM

You're welcome. Is the red-letter NKJV available somewhere or is it possible that you use a SQLite database browser and tell me how exactly John 3:13 is encoded in the e-Sword version? I hope this is easily fixable.

Regarding ESV, I have a script that will parse the ESV website and generate a MySword module out of that, including red letters and cross references. Check it out here: http://www.biblesupp...esv-on-mysword/

 

Regards,

Rob

Yeah it's very nice of you to make this available to us.  I was going to say that's mighty "christian" of you.  ;)  :D

 

Query the database? You asked just the right guy seeing as I'm a DBA by trade.  

 

SELECT Scripture FROM bible WHERE book = 43 AND chapter=3 AND verse = 13

 

 {\cf6 "No one has ascended to heaven but He who came down from heaven, {\cf15\I that is,} the Son of Man who is in heaven.}
 

I could write the query for you if if I understood the tags that MySword is using. Hopefully you can just use the replace function if close tags are always the same.  It could be however that your logic layer is in the perl script and not the query. I'm not going to try and guess how your program is set up to do it's conversion processing. I'm sure it's an easy fix it's just a matter of making sure it doesn't bog down the program too much.  If you need me to test again let me know.

 

I'll check out your link but the ESV file I had converted fine as it had no nested tags.


In Topic: Perl scripts to convert e-Sword 9 bblx and cmtx modules to mysword

03 August 2014 - 01:21 PM

Thanks Rob for doing this conversion program.  I did a conversion of my red-letter NKJV to mysword and it worked only I noticed it had trouble recognizing nested tags properly.  It's most noticeable with red-letter text as it typically spans many verses.  If a verse is tagged with red letters it is fine as long as there are no other format tags nested in the red-letter tags if so only the words before the nested tag are formatted after the nested tag reverts to default. 

 

For example :

  

John 3

13 "No one has ascended to heaven but He who came down from heaven, that is, the Son of Man who is in heaven.

 
it should be:
 
13 "No one has ascended to heaven but He who came down from heaven, that is, the Son of Man who is in heaven. 
 
NOTE - I've bolded the text to make the colour formatting easier to see.  I appears to do this consistently from all text that I have checked. I will try and convert my red-letter ESV and see if it fares any better.