Perl scripts to convert e-Sword 9 bblx and cmtx modules to mysword
#41
Posted 18 November 2012 - 11:46 AM
Thanks for this wonderflul tool. I tried converting a localized bible version created by our local community. I get RTF parsing errors. If you could look at this .bblx file http://www.mediafire...bau5xmckjv0c4b8
Here is the error:
#42
Posted 18 November 2012 - 02:02 PM
I know what the error is but given the way that my script does the parsing, this is extremely hard to solve. Here is an example of what goes wrong:
sqlite> select * from Bible where Book=3 and Chapter=1 and Verse=1; 3|1|1| \i Kautusan Tungkol sa Paghahandog at Hain \i0 \par Tinawag ni Yahweh si Moises at mula sa Toldang Tipanan ay sinabi sa kanya,
There's two ways to indicate the start and end of RTF tags, the first is by using a tag inside braces like:
{\tag this text is influenced by the tag.} This is more text.The second is by using a start and end tag like this:
\tag this text is influenced by the tag.\tag0 This is more text.
Your module uses the second mode, in this case to make part of the text italic (I assume the italic text is a title since there is a paragraph break follwing it). Since your local community created this module, ask them if it is possible to re-create the e-Sword module using braces instead of start/stop tags. You could also try to convert it via the TheWord tools (see Peter Pellerin's howto).
Regards,
Rob
#43
Posted 22 November 2012 - 04:14 AM
Thanks for getting back to me. I am not a Perl guy but I do understand what you are trying to do here. I am a programmer myself, probably I could think of a workaround to clean this stuff. Thanks for the heads up.
Thanks,
Aivan
#44
Posted 06 December 2012 - 03:03 PM
I was really grateful a while back when you converted e-sword's HSB4 to MySword. I'm just no good with computer stuff - I can't get the Perl thing to work for me...
Would you be able to do a little more converting? HSB4 has been updated with corrections, and it would be great to have HSB3, as well - the Hebrew OT with Strong's.
The e-sword site for the update is: http://www.biblesupp...ransliteration/
I'm sure you're busy with important stuff of your own; if you could find time to do this, it would be totally amazing!
Thanks,
Arnie
begraced@gmail.com
#45
Posted 09 December 2012 - 12:15 PM
#46
Posted 09 March 2013 - 08:50 PM
Thanks for your work Rob!
I ran into a problem that I fixed... well, the best way I knew how. I've never touched Perl, but I know SQL... anyway, I have some e-Sword bibles that had more than one record for a verse, so I modified the following section and added/modified the noted lines:
# [JHS] BEGIN: added another prepared statement for updating a verse when multiple verses exist (don't know why) my $sthw2=$dbhw->prepare(' UPDATE Bible SET Scripture = Scripture || "<br>" || ? WHERE Book=? AND Chapter=? AND Verse=?; '); # [JHS] END. foreach my $ref2 (@$rowref) { if ($bk != $ref2->[0]) { $bk=$ref2->[0]; my $nm=exists($bibnum{$bk})?$bibnum{$bk}:"UNK"; print STDERR "\n$nm"; $cp=0; } if ($cp != $ref2->[1]) { $cp=$ref2->[1]; print STDERR " $cp"; } $sthw->execute($ref2->[0],$ref2->[1],$ref2->[2],&unrtf($bk,$cp,$ref2->[2],$ref2->[3])); # [JHS] BEGIN: added this if statement to catch bad inserts, hope the error is because of dupe verses if ($sthw->err){ $sthw2->execute(&unrtf($bk,$cp,$ref2->[2],$ref2->[3]),$ref2->[0],$ref2->[1],$ref2->[2]); } die "Error inserting $ref2->[0]/$ref2->[1]/$ref2->[2]/$ref2->[3]\n" if ($sthw2->err); # [JHS] END. }
Maybe you can make it more standardized, I assume that an error is because of the dupe verse deal, and it still displays the error on the initial insert, but it seems to be working.
~~ John
Edited by John H Standlee, 09 March 2013 - 08:52 PM.
#47
Posted 16 March 2013 - 06:44 AM
I am very interested in two of your posts, this one, and the ESV bible for Mysword. After a long battle, I managed to download Strawberry Perl Portable executable. I created a folder in the root directory c:\strawberry, copied the zip folder there and unpacked it. When I run portableshell.bat, the computer opens the dos box at c:\strawberry>. When I enter the command "c:\Strawberry> perl escmtx2mys.pl DailyStudyBible.cmtx" the response is "Can't open perl script "escmtx2mys.pl": No such file or directory
I am obviously doing something wrong. Can you help.
Regards, Forbes
#48
Posted 16 March 2013 - 07:56 AM
John, thanks for this. I'll include it in the script and re-upload the modified version.
Forbes, copy the escmtx2mys.pl script as well as the DailyStudyBible.cmtx file to the c:\strawberry directory. Same goes for the esvorg2mysword.pl script. If you have the scipt and comment file in another directory, you should change to that directory first. E.g., if they are in the c:\Temp directory, do a "cd c:\Temp" from within the portableshell dos box.
Hope that helps!
Regards,
Rob
#49
Posted 17 March 2013 - 12:09 AM
Hi Rob
Thanks for the reply. I copied the esvbblx2mys.pl file into the directory and ran the command. It started downloading the bible, and got as far as Exodus 5, and bombed out with the message "Exodus 1 2 3 4 5 Did not receive correct text for http://www.esvbible.org/Exodus+5/. Quitting"
Regards,
Forbes
Edited by ForbesWilson, 17 March 2013 - 12:29 AM.
#50
Posted 17 March 2013 - 02:28 AM
Just to be on the safe side, I tried the script myself and it created a good ESV module. The only thing I can think of is that you had a hickup in your Internet connection. This error is triggered if the script cannot find any verses in the downloaded chapter. Please try again.
Regards,
Rob
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users
Similar Topics
Proverbs 19:19 Strong's error in KJV and Hebrew OT modulesStarted by Guest_Ne0_* , 21 Mar 2024 |
Creating Bible Modules with Strong's NumbersStarted by Guest_Tj Higgins_* , 24 Jan 2024 |
What Modules do you want for e-SwordStarted by Guest_patchworkid_* , 16 Jun 2011 |
bblx filesStarted by Guest_sparkydan1941_* , 03 Apr 2018 |
Where to put modules on a Family ComputerStarted by Guest_SpiritualMadMan_* , 05 Oct 2023 |
Frequently Asked Questions
Latest Blogs
- 10 justifications for Bible reading
by SarahSherrill, Jun 27 2022 02:53 AM
According to the experts from Astros DigitalHere are ten reaso... - How can I fix the Cash App if it isn't Working?
by cashcardhelps, Jun 07 2022 01:12 AM
First, you must keep the app up to date with the most recent v... - How can an app benefit your pharmacy in growing business earnings
by Alteza, Jun 06 2022 03:14 AM
Apps comprise a large portion of the tech-driven society that... - What Is a Satire Essay Anyway?
by Caleb9, Jun 04 2022 08:22 AM
What Is a Satire Essay Anyway?A large number of professional w... - 25% OFF on Mauli Thread Rakhi Online for Brother
by giftsvalla, Jun 03 2022 02:02 AM
Mauli Rakhi are generally red. The red colour symbolizes stren...