Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Adding user-created CHM modules to the Verse Tab

  1. #1
    Join Date
    Mar 2004
    Posts
    206

    Default Adding user-created CHM modules to the Verse Tab

    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
    .
    .
    Last edited by MTan; 04-16-2012 at 02:39 PM.

  2. #2
    Join Date
    Apr 2004
    Posts
    2,097

    Default

    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?
    Michael Hanel
    PhD candidate Classics Univ. of Cincinnati
    MDiv Concordia Seminary
    MA Classics Washington University
    Unofficial BibleWorks Blog
    LibraryThing!

  3. #3
    Join Date
    Mar 2004
    Posts
    206

    Default

    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

  4. #4
    Join Date
    Apr 2004
    Posts
    2,097

    Default

    If you have the Keil & Delitzsch commentary (if not, it's on the unofficial BibleWorks blog, here), 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).
    Attached Files Attached Files
    Last edited by Michael Hanel; 04-11-2012 at 08:45 AM.
    Michael Hanel
    PhD candidate Classics Univ. of Cincinnati
    MDiv Concordia Seminary
    MA Classics Washington University
    Unofficial BibleWorks Blog
    LibraryThing!

  5. #5
    Join Date
    Sep 2007
    Posts
    1,206

    Default

    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

  6. #6
    Join Date
    Apr 2004
    Posts
    2,097

    Default

    Quote Originally Posted by ISalzman View Post
    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.
    Michael Hanel
    PhD candidate Classics Univ. of Cincinnati
    MDiv Concordia Seminary
    MA Classics Washington University
    Unofficial BibleWorks Blog
    LibraryThing!

  7. #7
    Join Date
    Mar 2004
    Posts
    206

    Default

    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

  8. #8
    Join Date
    Apr 2004
    Posts
    613

    Default A thing of beauty...

    Oh now this is a wonderful thing of beauty... So much can be done with this. I'll have to do some experimentation.
    Jim Darlack - Associate Director of Goddard Library /
    Reference Librarian at Gordon-Conwell Theological Seminary

    Gloucester Assembly of God | Gordon-Conwell Theological Seminary
    The 'Unofficial' BibleWorks Blog | Old in the New | Facebook | LibraryThing

  9. #9
    Join Date
    Sep 2007
    Posts
    1,206

    Default

    Quote Originally Posted by MTan View Post
    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.

  10. #10
    Join Date
    Apr 2004
    Posts
    2,097

    Default Keil and Delitzsch complete

    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.

    ---

    I have also finished the verse mapping file for Calvin's Commentaries. You can grab that here. [Updated, 4-11-12]

    Until BibleWorks provides a better edition of verse mapping for Matthew Henry's commentary, here is a rudimentary one.

    And here is the verse mapping file for Kretzmann's Popular Commentary.
    Last edited by Michael Hanel; 04-11-2012 at 09:58 AM. Reason: added links
    Michael Hanel
    PhD candidate Classics Univ. of Cincinnati
    MDiv Concordia Seminary
    MA Classics Washington University
    Unofficial BibleWorks Blog
    LibraryThing!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •