Difference between revisions of "DevTools:IMP Format"
(Created page with "====IMP Format==== :'''IMPORTANT''': ''Please first read http://www.crosswire.org/tracker/browse/MODTOOLS-92'' The IMP or import format is the most versa...") |
David Haslam (talk | contribs) m (David Haslam moved page DevTools:Imp Format to DevTools:IMP Format: We usually capitalise IMP.) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | '''IMPORTANT:''' CrossWire now accepts only GenBook modules and LexDict modules in IMP format. Bibles must be in either VPL or OSIS format. | |
− | |||
− | The [[File Formats | + | ==IMP Format== |
+ | The '''IMP''' or import [[File Formats|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). At the same time it is the one most likely leading to problematic modules as there is no way of checking validity of import texts. Hence its use is strongly discouraged and currently only allowed for Plain text GenBooks (marked up GenBooks should be OSIS) and Plain Text dictionaries and Devotions. The only markup accepted are scripture reference links in OSIS or ThML All other modules need to be in valid OSIS or TEI XML files before submission is accepted. | ||
+ | |||
+ | 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 8: | Line 13: | ||
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. | 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. | + | With multiline content per key<ref>Please also read http://tracker.crosswire.org/browse/MODTOOLS-92</ref>, 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 | $$$Genesis 1:2 | ||
And the earth was without form, and void; \ | And the earth was without form, and void; \ | ||
Line 15: | Line 20: | ||
$$$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 | + | <references/> |
+ | |||
+ | ===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 32: | ||
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 44: | ||
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 | ||
Line 44: | Line 57: | ||
Section 2 of Chapter 1 of Book 1 of the War of the Jews | Section 2 of Chapter 1 of Book 1 of the War of the Jews | ||
− | + | [[Category:Development tools|IMP Format]] |
Latest revision as of 16:29, 11 March 2018
IMPORTANT: CrossWire now accepts only GenBook modules and LexDict modules in IMP format. Bibles must be in either VPL or OSIS format.
Contents
IMP Format
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). At the same time it is the one most likely leading to problematic modules as there is no way of checking validity of import texts. Hence its use is strongly discouraged and currently only allowed for Plain text GenBooks (marked up GenBooks should be OSIS) and Plain Text dictionaries and Devotions. The only markup accepted are scripture reference links in OSIS or ThML All other modules need to be in valid OSIS or TEI XML files before submission is accepted.
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[1], 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
- ↑ Please also read http://tracker.crosswire.org/browse/MODTOOLS-92
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