New Resource or Edit Resource

Introduction

Creating a new resource can be done through menu File / Resources / New.

Editing an existing resource goes through menu File / Resources / Edit.

Creating new resources is described below. Editing them works similarly.

Creating a resource

When creating a new resource, several settings will have to be made about how this new resource operates. These are described below. Not all of the settings described below will be used at any time. The settings that are relevant depend on the type of the resource..

Type

The first thing to be done when creating a new resource template is choosing what the type of this resource will be. There are some types supported. If the type that you need is not in the list, please describe your resource to the developer, so that type can then be supported. Here follows a description of some types.

- "Data lives somewhere else, retrieve a different URL for each verse". This type of resource is typically used for displaying a web site as a resource in Bibledit. Each verse retrieves a different URL from the web site.

- "Produce a different index file on the fly for each verse with different anchors". This type of resource lets Bibledit create a new index.html file for each verse. There is a list of books for in the filenames and there is another list of books for in the anchors.

- "Based upon ...". This type, if selected, lets the new resource base itself on an existing one. This comes in useful for creating several resources that differ only slightly in details.

Title

The user can enter the title of the resource. This title is used for easy reference to the resource.

Adding files

A resource, if it does not live on the network, can have several files that belong to this resource. These files make up the body of the text of the resources, that is, these files are the actual pages to be displayed. Files can be added to this resource by pressing the button to add files.

Adding directories

In the same way as adding files, the user can add complete directories too. The whole directory will be added and everything that it contains.

Home page

There is a "Home" button visible when a resource is displayed. If this button is clicked, then the home page as given will be displayed. Sample home pages:

- "http://www.bible.org".

- "index.html. This shows the file "index.html" within the files that belong to this resource.

URL constructor

In resources types where a URL must be retrieved, this URL constructor is used to assemble the URL to be retrieved. An example of such a constructor is http://net.bible.org/verse.php?book=<book>&chapter=<chapter>&verse=<verse>. You find text like <book>, <chapter> and <verse> in this URL constructor. The text <book> will be replaced with the name of the book, and <chapter> will be replaced with the chapter number, and so on. So that, for example, if Bibledit displays Matthew 5:8, the URL of the above example would become http://net.bible.org/verse.php?book=Matthew&chapter=5&verse=8. Bibledit constructs this URL, and retrieves it, and then displays it.

Index file constructor

The index file constructor works similar to the URL constructor. Some resource types need the URL constructor, and other types need the index file constructor. Here is an example of the index file constructor:

<html><head><title>NET Bible</title></head><frameset rows="*,150"><frame src="<book><chapter>.htm#<bookanchor> <chapter>:<verse>" name="text_pane" marginwidth="10" marginheight="20" scrolling="auto" frameborder="0"><frame src="noteintr.htm" name="note_pane" marginwidth="10" marginheight="5" scrolling="auto" frameborder="0"></frameset></html>

Note that this should be a complete html page. Each verse that Bibledit goes to creates a completely new index file on the fly, and this index file will be loaded and become visible as a Resource. The text <chapter> will be replaced with the chapter number, and so also for the <book> and the <verse>.

Book names for the constructor

There is a button there. If pressed, the user can enter names for each of the books. For example if the user enters "mat" for the book of Matthew, then in the constructor the book of Matthew will be given as "Mat" for the anchor. This text substitution will only be done for "<bookanchor>", not for the ordinary "<book>".

Testing books

If this button is pressed, all of the available books will be loaded in a browser in sequence. The user can then see in a simple way if the book names for use in the constructor have been entered properly. There is a checkbutton that says "Books are okay". If the resource has been created and you are happy with it, this button should be checked so as to approve of the books entered.

Book names for the anchors

There is a button there. If pressed, the user can enter names for each of the books. For example if the user enters "Mat" for the book of Matthew, then in the constructor the book of Matthew will be given as "Mat" where used for anchors. The anchors are needed so that bibledit can find where a certain verse of a certain chapter starts.

Testing anchors

If this button is pressed, all of the available books will be loaded in a browser in sequence, and of each book the first chapter will be loaded, and it will go to verse 1, then verse 2, then verse 3. The user can then see if the book names for use in the constructor have been entered properly, as used for the anchors. There is a checkbutton that says "Anchors are okay". If the resource has been created and you are happy with it, this button should be checked so as to approve of the anchors entered.

Writing anchors

This button allows the user to go to the Resource Converter dialog where the required anchors are written to the files. This is only needed when the anchors are not yet in the file.

OK

At the end of all, when all settings are fine, press button OK to save the resource. It will now be ready for use, that is, this resource can be opened.

Examples

Some examples are given below to help you quickly on the way.

Manually preparing a resource

Manually preparing content is not difficult. At the start of each verse, just insert the appropriate anchor, for example:

<a name="mat_1_1"></a>

Then make the appropriate settings in the dialog for this resource to work. It's not difficult, only that it is a bit of work seeing there are so many verses.

Local NET Bible

To create the NET Bible as a local resource, download the HTML frames version from www.bible.org and unpack the files in some directory. Create a new resource. As the type choose "Based upon NetBible". Add all the files of the NET Bible that were unpacked above. Tick the books and the anchors as okay. Press OK to save this resource.

Cambridge Paragraph Bible from Libronix

The Cambridge Paragraph Bible, written by F.H.A. Scrivener, including all the footnotes and cross references, can be found in the Libronix Digital Library System. In this example we are going to create Genesis from that book as a resource. To do that, do the following. In the Libronix Digital Library System, open the Cambridge Paragraph Bible written by Scrivener, and copy the book of Genesis to a word processor. This may have to be done in stages because when tried the last time, Libronix did not allow the whole book to be copied at once. Save it as a .htm page, for example gen.htm. Move that file to Linux. In Bibledit create a new resourse of type "Retrieve a different URL for each verse". Call this resource "Cambridge Paragraph Bible". Add the file "gen.htm" to the resource. For the home page, enter whatever you wish that would make a nice home page. This could be, for example, a title page, or a page made by yourself that has links to all the books. Let's enter here "home.htm", provided that this file is made available. As the URL constructor enter "<book>.htm#be_anc_<chapter>_<verse>" (without the quotes). Then enter some book names for the constructor. After pressing the Books button, enter "gen" for the book of Genesis (without the quotes). In the URL constructor above, this means that "<book>" is replaced by "gen", so that file "gen.htm" is loaded when we go to Genesis. After this is done anchors for each verse need to be inserted in the file gen.htm. Press button "Write anchors" to do that. In that dialog set the type to "Chapter starts at a pattern, verse 1 starts at chapter, verse starts at a pattern". Open the file gen.htm for conversion. As chapter prefix enter ">", as the chapter number choose "I, II, III", and as the suffix enter ". <" (all without the quotes). As the verse prefix enter ">" and as the suffix enter "<" (without the quotes again). The verse number can be left at "1, 2, 3". Then press the "Write" button. After done, press OK. Back in the Resource Editor, tick "Books are okay" and "Anchors are there", and press OK. The resource is now ready for use.

Bibledit project

Projects from Bibledit can be made into a resource with little effort. Export a couple of books to OpenDocument. Then open these in OpenOffice, and save them as HTML Document. Then create a new resource, view at the anchors that Bibledit placed for you, make the appropriate settings, and ready it is.

USFM files

The USFM can be imported into a Bibledit project. From the Bibledit project resources can be made, as described above.