Difference between revisions of "Projects:Go Bible/Go Bible Creator"

From CrossWire Bible Society
Jump to: navigation, search
(Before Running Go Bible Creator: added text)
(Required parameters: added text)
Line 44: Line 44:
 
  PathToXMLfile
 
  PathToXMLfile
  
:This is a secondary alternative use of GoBibleCreator described further below.
+
:This is a alternative use of GoBibleCreator described further below. This secondary use appertains only to input files in either OSIS or ThML formats.
  
:Invoking GoBibleCreator with a ThML/OSIS XML file as the specified parameter does not generate any JAD/JAR files, only a new collections.txt file prefilled with extracted book names. To produce the JAD/JAR files you would need to run GoBibleCreator again but this time with the collections.txt file as the only parameter. However, you would normally need to manually edit the Collections.txt file before doing that.
+
:Invoking GoBibleCreator with an XML file as the specified parameter does not generate any JAD/JAR files, only a new collections.txt file prefilled with extracted book names. To produce the JAD/JAR files you would need to run GoBibleCreator again but this time with the collections.txt file as the only parameter. However, you would normally need to manually edit the Collections.txt file before doing that.
  
 
==== Optional parameters ====
 
==== Optional parameters ====

Revision as of 16:10, 14 March 2011

New page under construction.

Introduction

Go Bible Creator is a tool for converting Bible texts into Go Bible Java ME applications that can be loaded onto suitable mobile phones. Go Bible Creator is a Java application and requires Java SE (Runtime Environment).

Download Go Bible Creator

Before Running Go Bible Creator

Before Go Bible Creator can be used you will need to obtain or create suitable input text containing the Bible translation or Bible version. Go Bible Creator can now handle input text in each of the following formats:

  • OSIS – a single XML file using OSIS format
  • ThML – a single XML file using ThML format
  • USFM – multiple text files using USFM format
  • XHTML-TE – a single XHTML file using an extended HTML format for the SIL Translation Editor

All the input files must be Unicode text encoded as UTF-8 (without BOM).

For use with Go Bible Creator, an OSIS must be of the container type, not the milestone type.

A sample ThML file for the book of Hebrews is provided. Further ThML files may be downloaded from CCEL.

The developer must ensure that permission has been obtained in writing for using any copyrighted material as input text.

It is often the case that some preprocessing will be required to ensure that the input text is comaptible for use with Go Bible Creator. It should not be assumed that input text files obtained directly from third parties will meet the exacting requirements.

Running Go Bible Creator

GoBibleCreator is run with the following command line from the directory containing the GoBibleCreator.jar file:

java -Xmx128m -jar GoBibleCreator.jar [PathToCollectionsFile | PathToXMLfile]+

Required parameters

-xmx128m
Go Bible Creator loads the entire source text file[s] into memory and therefore requires the -Xmx128m parameter to increase the total memory available in Java to 128MB.
PathToCollectionsFile
Go Bible Creator can optionally process multiple files at once by specifying several PathToCollectionsFiles on the command line.
PathToXMLfile
This is a alternative use of GoBibleCreator described further below. This secondary use appertains only to input files in either OSIS or ThML formats.
Invoking GoBibleCreator with an XML file as the specified parameter does not generate any JAD/JAR files, only a new collections.txt file prefilled with extracted book names. To produce the JAD/JAR files you would need to run GoBibleCreator again but this time with the collections.txt file as the only parameter. However, you would normally need to manually edit the Collections.txt file before doing that.

Optional parameters

There are two optional parameters:

-d PathToMainSourceTextDirectory
Specifies a source text directory where all Source-Text folders will be relative to. See below for more details on the Source-Text property in the "collections text" file.
-u
Update option: Using this option Go Bible Creator will update existing JAR files if they exist rather than create new ones. The source text will not be parsed nor will new Bible data be generated however everything else will be updated including the GoBibleCore, book names, UI properties, JAD file, manifest, etc. This option is useful if the source text hasn't changed and there hasn't been any change to the Go Bible Data Format, as it will be much quicker to process each collection. This option first makes a backup copy of the original JAD and JAR files.

Collections text files

To produce the JAD and JAR files run GoBibleCreator with a suitable "collections text" file. This example uses the Hebrews collections.txt file included with GoBibleCreator:

java -Xmx128m -jar GoBibleCreator.jar Hebrews/Collections.txt

GoBibleCreator will generate JAD and JAR files and place them in the same directory as the specified collections text file.

The format and content of a "collections text" file is described further below. Typically, the developer will need to carefully construct a collections text file (using a suitable text editor) in order to obtain all the required properties and features of the created Go Bible application[s].

Notes

  1. Any suitable filename may be chosen for a "collections text" file; it does not have to be called collections.txt
  2. Collections text files may optionally contain blank lines and remark lines.
  3. Collections text files must be Unicode text files that should be encoded as UTF-8 without BOM. If the BOM is included inadvertently, the first line will not be correctly processed (unless it happens to be a blank line).
  4. Collections text files may specify more than one collection of books. This is useful when the developer wishes to provide split collections in addition to one for a complete Bible.

The Info Property

Using Non-English Book Names

Translating the User Interface

Right Aligned Text

Splitting Books

Support for MIDP 1.0

Language Codes

Creating Files for WAP Download

Help