PDA

View Full Version : Adding user-created CHM modules to the Verse Tab



MTan
04-09-2012, 06:17 PM
Hello Friends!

You can now add your own CHM files to the Verse Tab. Using the current EXE update, follow the steps below to integrate your CHM with the Verse Tab:

Adding the Module to the Verse Tab

If your module has verse-based content, you can display your module in the Verse Tab. The Verse Tab takes the current search result or current Browse Window verse and loads the matching module content in the Verse Tab. If you want your module to appear in the Verse Tab, please follow the following steps:

1. Create the CHD file for your module.

2. Create a verse mapping file for your module. The verse mapping file is a text file that specifies an HTML file and anchor in the module for every Bible verse reference. You should create this file with a .vrt extension. For example, if your module is mymodule.chm, you would need to create a text file named mymodule.vrt. The format of the file should look like this:


INDEXVERSION 8.0.0001
VERSION NAS
@USER_NUMBER_OF_CHMS 1
LBRT1 | mymodule.chm | One-line description of my module
END HEADER
Gen 1:1-11:26 | LBRT1/file1.htm#anchor-id1
Gen 12:1 | LBRT1/file1.htm#anchor-id2
Gen 13:1 | LBRT1/file2.htm
Gen 13:2 | LBRT1/file3.htm#anchor-id3
Gen 13:3 | LBRT1/file3.htm#anchor-id4


In your .vrt file, you should copy the INDEXVERSION line exactly as it appears above.


The line starting with VERSION designates the Bible version to be used for the verse mapping. If your .vrt file is using verse references based on the ESV versification scheme, you would put VERSION ESV on this line. If your .vrt file is using verse references based on the WTT versification scheme, you would put VERSION WTT on this line.


In the line starting with LBRT1 , enter the filename of your chm file after the first vertical bar (e.g. "mymodule.chm"). After the second vertical bar, enter a brief (~32 characters max) description of your module.


After the END HEADER line, the following lines specify the HTML files and anchors to load for each Bible verse reference. The Bible reference and the HTML link are seperated by a vertical bar ( | ). In the above example any verse in the range Genesis 1:1 through 11:26 maps to file1.htm#anchorid-1 in the CHM file (Gen 1:1-11:26 | LBRT1/file1.htm#anchor-id1). Note that you can enter a range of verses or a single verse reference in the .vrt file. For Genesis 13:1 this sample file maps to file2.htm in the CHM file (Gen 13:1 | LBRT1/file2.htm). The LBRT1/ string maps the entry to the CHM file in the header and must be prepended to your HTML link.


3. Create a .VRG file from your verse mapping file. After creating the .vrt file, you will need to compile it to create the .vrg file. To compile your .vrt file, copy it to the Databases folder. Then, in the main window Command Line, type the following command and press Enter:

compilechmvrt modulename


If your .vrt file is named mymodule.vrt, you would enter compilechmvrt mymodule on the Command Line and press Enter. BibleWorks will then compile your .vrt file and create a .vrg file.

Note: You should include a toc.htm file in your CHM file. This is the file that the Verse Tab will load if there is no mapping entry for a given verse reference.

Copying Files to the BibleWorks Directory

Once you have created your files, you need to copy the files to the proper BibleWorks folder. By having the files in the proper folder, BibleWorks will integrate your custom module into the program so that it will display in the Resource Summary Window. The files you need to copy are the CHM, CHD, VRG (if you created one), and SDX files you created earlier. In our examples above, these are mymodule.chm, mymodule.chd, mymodule.vrg, and mymodule.sdx. Use the Windows Explorer to copy these files to the database folder under the main BibleWorks folder. Usually this folder is C:\Program Files\BibleWorks 9\databases.

Once you have copied these files to the database folder, close BibleWorks if it is open, and restart the program. Your custom module should appear on the designated Resources menu folder, and should appear on the list of files in the proper Resource Summary Window. Your custom module will appear in the Resource Summary Window whenever a verse appears in the Browse Window that also appears in your custom module.

Mutiple-CHM Modules

If your module is composed of multiple CHM files (for example, a commentary set with one CHM file for each Biblical book), you only need one .vrt file for all of the CHM files. To make a .vrt file that indexes multiple CHM files, enter the number of CHM files in the @USER_NUMBER_OF_CHMS line (e.g. for a module with 4 CHM files, the line should read @USER_NUMBER_OF_CHMS 4). Then, create a line for each CHM file like this:

LBRT1 | mymodule.chm | One-line description of my module
LBRT2 | mymodule02.chm | One-line description of my module
LBRT3 | mymodule03.chm | One-line description of my module
LBRT4 | mymodule04.chm | One-line description of my module

The LBRT1, LBRT2, LBRT3, etc. strings are used to designate the CHM file containing a Bible reference entry. So if in our multi-CHM module Psalm 90:1 was in mymodule02.chm, file79.html and Romans 1:1 was in mymodule04.chm, file143.html, we would have these entries in the mapping section:


Psa 90:1 | LBRT2/file79.htm
Rom 1:1 | LBRT4/file143.htm


The .vrt file for this multi-CHM module might look like this:

INDEXVERSION 8.0.0001
VERSION NAS
@USER_NUMBER_OF_CHMS 4
LBRT1 | mymodule.chm | One-line description of my module
LBRT2 | mymodule02.chm | One-line description of my module
LBRT3 | mymodule03.chm | One-line description of my module
LBRT4 | mymodule04.chm | One-line description of my module
END HEADER
Gen 1:1 | LBRT/file01.htm#gn_1_1
Gen 1:2 | LBRT/file01.htm#gn_1_2
Gen 1:3 | LBRT/file01.htm#gn_1_3
.
.
.
Psa 90:1 | LBRT2/file79.htm
.
.
.
Rom 1:1 | LBRT4/file143.htm
.
.

Michael Hanel
04-09-2012, 07:04 PM
Thanks! I probably won't completely understand this until I see a finished example of what one looks like. But one question. So all of this assumes that you have created an HTML module that *already* has verse anchor tags built in, right? There is no quick way around that, or is there?

MTan
04-10-2012, 10:54 AM
Though you don't have to have anchors, you do need some way to identify the verse location in your chm. This can be through file name (e.g. gen1_1.html, gen2_2.html), anchors (e.g. file001.html#ref1, file001.html#ref523), or some combination of both.

Hope that helps!
Michael

Michael Hanel
04-10-2012, 11:30 AM
If you have the Keil & Delitzsch commentary (if not, it's on the unofficial BibleWorks blog, here (http://bibleworks.oldinthenew.org/module/kd.zip)), I did a quick experiment to see how it would work for the book of Genesis only. I've attached the vrt and vrg files. Unzip them to the \databases\ folder. It should work once you re-start BibleWorks (assuming you have the latest EXE).

ISalzman
04-10-2012, 11:33 AM
Hey Michael (Tan), thanks for all your hard work and diligence which now makes it possible for users to have their own user-created modules display on the Verse Tab. This will be a great benefit for users. Like Michael (Hanel) - actually, probably more so! - the level of difficulty seems a little beyond my expertise right now. But my question would more involve some of the add-on modules that Wordsearch has created for BW. For example, I would love to get the HCSB Study Bible and be able to have it display on the Verse Tab. Would I need to follow all the steps that you've outlined in your post above? Or, hopefully, is there an easier way?

Thank you.

Irving

Michael Hanel
04-10-2012, 11:42 AM
Hey Michael (Tan), thanks for all your hard work and diligence which now makes it possible for users to have their own user-created modules display on the Verse Tab. This will be a great benefit for users. Like Michael (Hanel) - actually, probably more so! - the level of difficulty seems a little beyond my expertise right now. But my question would more involve some of the add-on modules that Wordsearch has created for BW. For example, I would love to get the HCSB Study Bible and be able to have it display on the Verse Tab. Would I need to follow all the steps that you've outlined in your post above? Or, hopefully, is there an easier way?

Thank you.

Irving

I don't have the HCSB so I can't look at the files to see how easy or difficult this would be, but I think LaRosa has enough tech savvy that it would not be that difficult if the files are in an easy order, like having one htm file per chapter. Otherwise it would be a much more difficult project.

MTan
04-10-2012, 11:42 AM
Hi Irving! For the HCSB some one would have to create the mapping file. The original developer of a CHM is usually in the best position to do that, as it would take a program or script to pull together the .vrt file (unless the file name/anchor tagging follows some format that can be automatically generated without inspecting the files).

Michael

jdarlack
04-10-2012, 03:13 PM
Oh now this is a wonderful thing of beauty... So much can be done with this. I'll have to do some experimentation. :)

ISalzman
04-10-2012, 03:25 PM
Hi Irving! For the HCSB some one would have to create the mapping file. The original developer of a CHM is usually in the best position to do that, as it would take a program or script to pull together the .vrt file (unless the file name/anchor tagging follows some format that can be automatically generated without inspecting the files).

Michael

Thank you to both Michaels for your responses. I will have to contact LaRosa one of these days.

Michael Hanel
04-10-2012, 08:43 PM
Ok, I now have the VRT file for the whole Keil and Delitzsch commentary. Keep in mind, this is quite rudimentary. It will show the correct chapter in the Verse Tab, but it will not automatically go to the correct verse, you'll still have to do some scrolling for that.

Download Keil-Delitzsch verse mapping for the module (http://bibleworks.oldinthenew.org/module/keil.vrt-vrg-upd.zip).

---

I have also finished the verse mapping file for Calvin's Commentaries. You can grab that here (http://bibleworks.oldinthenew.org/module/calvin.vrt-vrg.zip). [Updated, 4-11-12]

Until BibleWorks provides a better edition of verse mapping for Matthew Henry's commentary, here (http://bibleworks.oldinthenew.org/module/mhenry.vrt-vrg.zip) is a rudimentary one.

And here (http://bibleworks.oldinthenew.org/module/popcomm.vrt-vrg.zip)is the verse mapping file for Kretzmann's Popular Commentary.

Attie Bogaards
04-11-2012, 02:38 AM
Ok, I now have the VRT file for the whole Keil and Delitzsch commentary. Keep in mind, this is quite rudimentary. It will show the correct chapter in the Verse Tab, but it will not automatically go to the correct verse, you'll still have to do some scrolling for that.

Download Keil-Delitzsch verse mapping for the module (http://bibleworks.oldinthenew.org/module/keil.vrt-vrg-upd.zip).

---

I have also finished the verse mapping file for Calvin's Commentaries. You can grab that here (http://bibleworks.oldinthenew.org/module/calvin.vrt-vrg.zip).

Wonderfull work! Thank you very much, Michael. One problem on Calvin's Commentaries: The commentary on Psalms 1 to 99 do not show.

Regards,
Attie

bobvenem
04-11-2012, 07:40 AM
Added both K&D and Calvin. They both appear in the drop-down menu in the Verse Tab, but nothing appears in the window below (CNTTS or whatever is still there). I did notice that, following the name of the commentary, "<i>" appears on each of them (which, of course, doesn't appear on any of the other items in the drop-down).

Michael Hanel
04-11-2012, 09:31 AM
Added both K&D and Calvin. They both appear in the drop-down menu in the Verse Tab, but nothing appears in the window below (CNTTS or whatever is still there). I did notice that, following the name of the commentary, "<i>" appears on each of them (which, of course, doesn't appear on any of the other items in the drop-down).

Bob, make sure you have the latest EXE. That problem should have been fixed.

Michael Hanel
04-11-2012, 09:36 AM
Wonderfull work! Thank you very much, Michael. One problem on Calvin's Commentaries: The commentary on Psalms 1 to 99 do not show.

Regards,
Attie

Thanks for spotting that, Attie. Re-download it from the same link, overwrite the files in your \databases\ folder and it should be fixed. Let me know if you find any other problems like this.

Michael Hanel
04-11-2012, 10:26 AM
Until BibleWorks provides a better edition of verse mapping for Matthew Henry's commentary, here (http://bibleworks.oldinthenew.org/module/mhenry.vrt-vrg.zip) is a rudimentary one.

Ken Neighoff
04-11-2012, 10:37 AM
Michael,

Thanks for your work on these modules.

The Calvin one gives me an error. The program cannot display the web pages correctly. The K&D and M. Henry work great.

Michael Hanel
04-11-2012, 10:42 AM
Michael,

Thanks for your work on these modules.

The Calvin one gives me an error. The program cannot display the web pages correctly. The K&D and M. Henry work great.

Can you give me more info on the Calvin one? Are you at a particular place in the Bible? Do *any* pages work? Try Gen 1:1. My guess, is that you activated Calvin's Commentary when the Browse Window was at a page that Calvin's doesn't contain (it's not a comprehensive commentary of the WHOLE Bible).

Ken Neighoff
04-11-2012, 10:54 AM
Can you give me more info on the Calvin one? Are you at a particular place in the Bible? Do *any* pages work? Try Gen 1:1. My guess, is that you activated Calvin's Commentary when the Browse Window was at a page that Calvin's doesn't contain (it's not a comprehensive commentary of the WHOLE Bible).

Michael,

Thanks for your help.

I was in 1 Samuel 17 when I received the message. It works at Genesis 1:1.

Michael Hanel
04-11-2012, 11:03 AM
Michael,

Thanks for your help.

I was in 1 Samuel 17 when I received the message. It works at Genesis 1:1.

Well then everything works fine. The error message you saw was because Calvin's Commentary doesn't contain a comment on 1 Sam 17. I emailed the programmers and asked if there was a way for it to display a kinder error message (for example, a blank screen) for places like this. If you are at Gen 1:1 in the browse window and open Tischendorf, for example, it doesn't give you this same kind of error. But for right now this is what the Verse Tab does. I think it's pretty good progress for only two days :cool:

MTan
04-11-2012, 12:20 PM
Note: You should include a toc.htm file in your CHM file. This is the file that the Verse Tab will load if there is no mapping entry for a given verse reference.

Attie Bogaards
04-11-2012, 03:44 PM
Thanks for spotting that, Attie. Re-download it from the same link, overwrite the files in your \databases\ folder and it should be fixed. Let me know if you find any other problems like this.

Thank you!

bobvenem
04-11-2012, 06:58 PM
Bob, make sure you have the latest EXE. That problem should have been fixed.

That indeed was the ticket. Thank you, sir.