Difference between revisions of "DevTools:IMP Format"

From CrossWire Bible Society
Jump to: navigation, search
m (level)
(IMP Format: split into sections)
Line 2: Line 2:
 
:'''IMPORTANT''': ''Please first read http://www.crosswire.org/tracker/browse/MODTOOLS-92''
 
:'''IMPORTANT''': ''Please first read http://www.crosswire.org/tracker/browse/MODTOOLS-92''
  
The [[File Formats#IMP|IMP]] or import format is the most versatile of the import formats and may be used in creating all types of modules (Bibles, commentaries, dictionaries, daily devotionals, glossaries, general books, etc.) in any supported markup (GBF, ThML, OSIS or TEI). Each entry in an imp file may take as many lines as are needed. The first line of the entry will have a format such as "$$$<key>" and will be followed by all lines of text that should be included with that entry. So our above example in imp format would be written as:
+
The [[File Formats#IMP|IMP]] or import format is the most versatile of the import formats and may be used in creating all types of modules (Bibles, commentaries, dictionaries, daily devotionals, glossaries, general books, etc.) in any supported markup (GBF, ThML, OSIS or TEI). Each entry in an imp file may take as many lines as are needed. The first line of the entry will have a format such as "$$$<key>" and will be followed by all lines of text that should be included with that entry.
 +
 
 +
===Bibles===
 +
A Biblical text in IMP format would be written as:
 
  $$$Genesis 1:1
 
  $$$Genesis 1:1
 
  In the beginning God created the heaven and the earth.
 
  In the beginning God created the heaven and the earth.
Line 15: Line 18:
 
  $$$Genesis 1:3
 
  $$$Genesis 1:3
  
Commentaries would follow the same format, but would probably include a greater number of lines of text. If your Bible or commentary uses a single entry to handle multiple verses, simply give a list or range of verses as the key (e.g. "$$$Genesis 1:1-5", "$$$Exodus 1", "$$$Leviticus 1:1,5"). Lexicons, dictionaries, glossaries and daily devotionals would take a form such as:
+
===Commentaries===
 +
Commentaries would follow the same format, but would probably include a greater number of lines of text. If your Bible or commentary uses a single entry to handle multiple verses, simply give a list or range of verses as the key (e.g. "$$$Genesis 1:1-5", "$$$Exodus 1", "$$$Leviticus 1:1,5").  
 +
 
 +
===Dictionaries, etc===
 +
Lexicons, dictionaries, glossaries would take a form such as:
 
  $$$Adam
 
  $$$Adam
 
  Adam was the first man created by God.
 
  Adam was the first man created by God.
Line 21: Line 28:
 
  Eve was the first woman created by God.
 
  Eve was the first woman created by God.
  
 +
===Daily devotionals===
 
For daily devotionals, you must encode the key as "$$$mm.dd", such as "$$$01.01" for January 1st and "$$$12.31" for December 31st.
 
For daily devotionals, you must encode the key as "$$$mm.dd", such as "$$$01.01" for January 1st and "$$$12.31" for December 31st.
 
<br>Example from M'Cheyne's Bible Reading Calendar for January 1st:
 
<br>Example from M'Cheyne's Bible Reading Calendar for January 1st:
Line 32: Line 40:
 
Here the '''scripRef''' element is from '''ThML'''.
 
Here the '''scripRef''' element is from '''ThML'''.
  
 +
===General books===
 
General books are encoded with each book division as a separate entry. The entries are then listed as a tree hierarchy with keys similar to a file system directory structure. For example, if you were encoding the Josephus' Works, you might have a structure like this:
 
General books are encoded with each book division as a separate entry. The entries are then listed as a tree hierarchy with keys similar to a file system directory structure. For example, if you were encoding the Josephus' Works, you might have a structure like this:
 
  $$$/War
 
  $$$/War

Revision as of 17:05, 8 January 2018

IMP Format

IMPORTANT: Please first read http://www.crosswire.org/tracker/browse/MODTOOLS-92

The IMP or import format is the most versatile of the import formats and may be used in creating all types of modules (Bibles, commentaries, dictionaries, daily devotionals, glossaries, general books, etc.) in any supported markup (GBF, ThML, OSIS or TEI). Each entry in an imp file may take as many lines as are needed. The first line of the entry will have a format such as "$$$<key>" and will be followed by all lines of text that should be included with that entry.

Bibles

A Biblical text in IMP format would be written as:

$$$Genesis 1:1
In the beginning God created the heaven and the earth.
$$$Genesis 1:2
And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.

With multiline content per key, any content line (except the last for each key) that would otherwise end with a space should be terminated by the continuation code \ (reverse solidus) to prevent joining words. e.g.

$$$Genesis 1:2
And the earth was without form, and void; \
and darkness was upon the face of the deep. \
And the Spirit of God moved upon the face of the waters.
$$$Genesis 1:3

Commentaries

Commentaries would follow the same format, but would probably include a greater number of lines of text. If your Bible or commentary uses a single entry to handle multiple verses, simply give a list or range of verses as the key (e.g. "$$$Genesis 1:1-5", "$$$Exodus 1", "$$$Leviticus 1:1,5").

Dictionaries, etc

Lexicons, dictionaries, glossaries would take a form such as:

$$$Adam
Adam was the first man created by God.
$$$Eve
Eve was the first woman created by God.

Daily devotionals

For daily devotionals, you must encode the key as "$$$mm.dd", such as "$$$01.01" for January 1st and "$$$12.31" for December 31st.
Example from M'Cheyne's Bible Reading Calendar for January 1st:

$$$01.01
<br />Family Reading: <scripRef>Genesis 1</scripRef>
<br />Family Reading: <scripRef>Matthew 1</scripRef>
<br />Secret Reading: <scripRef>Ezra 1</scripRef>
<br />Secret Reading: <scripRef>Acts 1</scripRef>

Here the scripRef element is from ThML.

General books

General books are encoded with each book division as a separate entry. The entries are then listed as a tree hierarchy with keys similar to a file system directory structure. For example, if you were encoding the Josephus' Works, you might have a structure like this:

$$$/War
The War of the Jews
$$$/War/Book 1
Book 1 of the War of the Jews
$$$/War/Book 1/Chapter 1
Chapter 1 of Book 1 of the War of the Jews
$$$/War/Book 1/Chapter 1/Section 1
Section 1 of Chapter 1 of Book 1 of the War of the Jews
$$$/War/Book 1/Chapter 1/Section 2
Section 2 of Chapter 1 of Book 1 of the War of the Jews

For CrossWire purposes we now accept only GenBook modules and LexDict modules in IMP format. Bibles must be in VPL or OSIS