Bible Converter Manual

Note: This is from BibleConverter.txt included in the BibleConverter package. The content is from http://palmbible.sourceforge.net/convert.htm (as at 4th September 2002) Slightly edited by Yih-Chun Hu, April 14th, 2003.

Slightly edited by Yohanes Nugroho in December 2010.

This document has four parts:

  1. Using BibleConverter
  2. Format of Bible Tag File
  3. Book Number Table
  4. Special Bible+ Codes

USING BibleConverter

Usage:

 java BibleConverter <options> <input>

where <input> is the name of an input bible tag file (with file extention .txt) e.g. if the name of the input bible tag file is KJV.txt, <input> is KJV.

where <options> can be the following:

  • -pbd Create a PDB file for PalmBible+ (default)
  • -plain Create a plain text file
  • -thml Create ThML file
  • -html Create HTML files into the <input>/html/ directory
  • -rtf Create RTF file into the <input>/rtf/ directory
  • -monoon Create MoNoon reader format into <input>/monoon/ directory
  • -sword Create Sword Module into <input>/sword>/ directory
  • -q Convert in quiet mode (without prior verse checking)
  • -kp Keeps numbers and punctuations [email protected]#$%^*_+/ with adjoining chars
  • -encode <encoding>. To overide the output encoding
  • -decode <encoding>. To overide the input encoding

where <encoding> should any Java recognized encoding of text. e.g. "iso-8859-1".

Remark: The bible tag file (<input>.txt) must be located in the same directory as BibleConverter. BibleConverter will check the integrity of the source Bible Tag file and give warning messages. The messages are for reference only and may be ignored if the version is assumed to be correct.

Example:

java BibleConverter -q -pdb -html web_eng

This will convert web_eng.txt into PalmBible+ PDB and HTML format.

FORMAT OF BIBLE TAG FILE

The Bible Tag file is a plain text file. Refer to any downloadable bible source in the download area of PalmBible+ for example.

Like HTML, the Bible Tags are enclosed by '<' and '>' (e.g. <CHAPTER>) and appeared in pairs. (e.g. <BOOK> ... </BOOK>) Contents are inserted in between an open tag (e.g. <BIBLE>) and the close tag (e.g. </BIBLE>).

Tags

<PARSERINFO>

Example: <PARSERINFO ENCODE="iso-8859-1" WORDTYPE="SPCSEP">

Description: This is a tag appears in the most front of a BibleTag file, and it does not need a close tag.

ENCODE -- output encoding for Palm PDB. This should be a Java recognized encoding. e.g. English is "iso-8850-1", Traditional Chinese is "Big5" or "Big5_HKSCS", Simpified Chinese is "GBK" and so on. Refer to the following link for details:

http://download.oracle.com/javase/1.3/docs/guide/intl/encoding.doc.html

DECODE -- (Optional) Encoding of the Bible Tag File itself. If omitted, it will equal to ENCODE. Refer to ENCODE for details of the encodings.

WORDTYPE -- can only be "CONT" or "SPCSEP". "CONT" is used for language does not have word break, e.g. Chinese, Korean or Japanese. "SPCSEP" is used for languages useing space as word separator.

<BIBLE>

Example: <BIBLE NAME="KJV" INFO="King James Version 1611 \nPublic Domain">

Description: It denoted the start of a bible version. Each bible tag file can only have one bible version. i.e. One pair of <BIBLE>...</BIBLE> tags.

NAME -- Version and name appeared when choose a Bible in PalmBible+.

INFO -- Display copyright information at the version information page of the PalmBible+. If empty, no version information will be at the reader program. \n could be used for new line, see the example.

ALIGN -- (Optional) Can only be "LEFT" or "RIGHT". If omitted, default is "LEFT". "RIGHT" is designed for language like Hebrew that reads from right to left.

<BOOK>

Example: <BOOK NAME="Matthew" NUMBER="470" SHORTCUT="MAT">

Description: At the start of a book use format of the example above, while at the end of a book use </BOOK>. Each book should be associated with a name, shortcut and number.

NAME -- It seems not been used to display in PDB format. Yet, in the HTML and other output format may be useful. Although NUMBER is already a good key, but it is a must to include in the tag. To display the name of a book in the content, refer to the "Text Format Tags" section at the remark of <VERSE>.

NUMBER -- It is the Book Number. It is important as it is used for sorting and cross-reference between different versions. See the "List of Book Number" section of this document for details.

SHORTCUT -- The short form of the book name. It is used in the "Goto dialogue box" to locate a book in PalmBible+. It is also the short form displayed on top right hand corner when reading.

<CHAPTER>

Example: <CHAPTER>

Description: At the beginning of a chapter use <CHAPTER>, while at the end of a chapter use </CHAPTER>. No attribute is required.

<VERSE>

Example: <VERSE>

Description: At the beginning of a verse mark with <VERSE>, while at the end of a verse mark </VERSE>. No attribute is required. The < and '>' character inside the verse needs to be prefixed with \. For example: <VERSE> A < V</VERSE> should be changed to <VERSE> A \< V</VERSE>

Remark:

Combined Verse

If there is combined verse, put an empty tag pairs after the verse, e.g.:

1-2 This is the combined verse ...
3 This is the following verse ...

in the Bible Tag file should look like :

<VERSE>This is the combined verse ...</VERSE>
<VERSE></VERSE>
<VERSE>This is the following verse ...</VERSE>

in PalmBible+ or other reader programs will have :

1 This is the combined verse ...
3 This is the following verse ...

Text Format Tags

All the format tags should be placed inside <VERSE> and </VERSE> tags and they are optional. All the format tags do not have a close tag. If any format tag is used, must be used to indicate the starting of normal verse text and only at this point the PalmBible+ will get a verse number for the verse.

Example: A verse in the beginning of a book looks like the following:

<VERSE><BOOKTEXT>The First Book of Moses, called
Genesis<CHAPTEXT>Chapter 1<DESCTEXT>The First
Day of God's Creation<VERSTEXT>In the beginning
God created the heaven and the earth.</VERSE>

The PalmBible+ or other reader programs will have:

The First Book of Moses, called Genesis

Chapter 1
The First Day of God's Creation
1 In the beginning God created the
  heaven and the earth.

Description: Usually shows the name of the book. Usually shows 'Chapter XX' This appears usually before some verses. Start of the verse. This tag appears only if there is any format tag applied before the verse.

Typical Layout

A typical layout of the Bible Tag source file for BibleConverter is shown below. For easier reading, the text format tags are shown

  <PARSERINFO ENCODE="iso-8859-1" WORDTYPE="SPCSEP">
  <BIBLE NAME='KJV' INFO="King James Version, 1611\nPublic Domain">
  <BOOK NAME="Genesis" NUMBER="10" SHORTCUT="Gen">
  <CHAPTER>
  <VERSE><BOOKTEXT>The First Book of Moses, called Genesis
  <CHAPTEXT>Chapter 1<DESCTEXT>The First Day of God's Creation
  <VERSTEXT>In the beginning God created the heaven and the earth.
  </VERSE>
  <VERSE>And the earth was without form, and void....</VERSE>
  <VERSE>And God said, Let there be light: .....</VERSE>
  ... some more verses ...
  <VERSE> ... </VERSE>
  </CHAPTER>

  <CHAPTER>
  <VERSE><CHAPTEXT>Chapter 2<VERSTEXT>Thus the heavens...</VERSE>
  <VERSE>And on the seventh day God ended his work...</VERSE>
  <VERSE> ... </VERSE>
  ... some more verses ...
  <VERSE> ... </VERSE>
  <VERSE><DESCTEXT>Adam and Eve<VERSTEXT>And the LORD God formed
  man of the dust of the ground ,</VERSE>
  <VERSE> ... </VERSE>
  ... some more verses ...
  <VERSE> ... </VERSE>
  </CHAPTER>

  <CHAPTER>
  <VERSE><CHAPTEXT>Chapter 3<DESCTEXT>The Fall of Man<VERSTEXT>
  Now the serpent was more subtil than any beast...</VERSE>
  <VERSE> ... </VERSE>
  ... some more verses ...
  <VERSE> ... </VERSE>
  </CHAPTER>
  <CHAPTER>
  ... some more verses ...
  </CHAPTER>
  :
  ... some more chapters ...
  :
  <CHAPTER>
  ... some more verses ...
  </CHAPTER>
  </BOOK>

  <BOOK NAME="Exodus" NUMBER="20" SHORTCUT="EXO">
  <CHAPTER>
  <VERSE><BOOKTEXT>...<CHAPTEXT>...<DESCTEXT>...
  <VERSTEXT> ... </VERSE>
  <VERSE> ... </VERSE>
  ... some more verses ...
  <VERSE> ... </VERSE>
  </CHAPTER>
  :
  ... some more chapters ...
  :
  <CHAPTER>
  ... some more verses ...
  </CHAPTER>
  </BOOK>
  :
  ... some more books ...
  :
  </BIBLE>

BOOK NUMBER TABLE

Book Number is used at <BOOK> tag. The number are important for sorting and cross reference among books. The PalmBible+ uses it internally for handling Dual Version Display.

There are two schemes: the new one is at

http://prdownloads.sourceforge.net/palmbibleplus/BibleConverterBookNumbers.html?download

The old deprecated one is at

http://prdownloads.sourceforge.net/palmbibleplus/BibleConverterOldBookNumbers.txt?download

SPECIAL BIBLE+ CODES

Bible+ handles the following special codes within verse text:

\Cr\C change text color to red (end red text with same code) \Cg\C change text color to green (end green text with same code) \Cb\C change text color to blue (end blue text with same code) \Ci\C change to italic text (end with same code) (ignored as of v3.1.10) \Cn\C line break

REFERENCE

http://palmbible.sourceforge.net/convert.htm (as at 4th September 2002) Slightly edited by Yih-Chun Hu, April 14th, 2003

Copyright © 2009-2018 Yohanes Nugroho