DevTools:conf Files
Creating a .conf File
.conf File Layout
The conf file tells the Sword engine how to treat installed module files, etc. which kind of markup they contain, and so forth.
Below is a listing of the possible directives in that file. Each of these directives of the form key=value. Some keys can be repeated. Some can have values that span more than 1 line with '\' at the end of a line indicating that the text on the next line continues the value. Some values allow RTF and some allow HTML <a href="xxx">label</a>hypertext links. HTML is not allowed otherwise.
Note on RTF, only the following are allowed:
- \qc - for centering
- \par - for paragraph breaks
- \pard - for resetting paragraph attributes, i.e. turning off centering.
- \u{num}? - for unicode characters, where {num} is a signed, 16-bit representation of the code point and where ? is the ASCII character used in case unicode is not supported. If the {num} is less than 0 then add 65536 to it. This should only be used in modules that have an Encoding=UTF-8, but using the actual UTF-8 character is preferred.
Enumerated values are shown in bold. These should be used exactly as given and no other values should be used.
Element | Values (type or enumerated) | Default Value | Allows |
---|---|---|---|
Required Elements | |||
[name] | Each conf file begins with [name], replacing "name" with be a short well known abbreviation. This must be on the first line, and start the first line. It can only contain A-Z, a-z, 0-9 and _. The name of the file should be the lowercase of this name followed by .conf. For example, [MyModule] would be mymodule.conf. |
||
DataPath | <relative system path>
DataPath is the path to the module relative to the SWORD module root directory. This path should start with "./modules". If the DataPath indicates a directory it should end with a '/'. Otherwise the module name is both the directory and the prefix for each file in that directory. Typical paths are for a module named [mymodule] are: ./modules/texts/rawtext/mymodule/ ./modules/texts/ztext/mymodule/ ./modules/comments/zcom/mymodule/ ./modules/comments/hrefcom/mymodule/ ./modules/comments/rawcom/mymodule/ ./modules/comments/rawcom4/mymodule/ ./modules/comments/rawfiles/mymodule/ ./modules/lexdict/zld/mymodule/mymodule ./modules/lexdict/rawld/mymodule/mymodule ./modules/lexdict/rawld/devotionals/mymodule/mymodule ./modules/lexdict/rawld/glossaries/mymodule/mymodule ./modules/lexdict/rawld4/mymodule/mymodule ./modules/genbook/rawgenbook/mymodule/mymodule But when it really comes down to it, a valid path could be: |
||
Description | <string> This is a short (1 line) title of the module. |
||
ModDrv |
RawText (for uncompressed Bibles) |
||
Elements required for proper module access | |||
CompressType | ZIP LZSS Used to indicate how a compressed modules (zText, zCom, & zLD) is compressed. ZIP is the preferred format. And as of today, no compressed modules use LZSS. |
LZSS | |
BlockType |
BOOK Used for zText and zCom to indicate how much of the work is compressed into a block. The trade off is size for speed, with BOOK taking the least overall space and the longest time and VERSE taking the greatest overall space and the least time. While BlockType has a default, it is a best practice to specify it. Most Bibles use BOOK and larger Commentaries use CHAPTER. To date, no module uses VERSE. |
CHAPTER | |
BlockCount | <integer> Used for zLD to indicate the number of entries in a compressed block. Higher values will make the module slower, but smaller. |
200 | |
KeyType | TreeKey VerseKey |
TreeKey | |
CipherKey | <string> Contains the unlock key for enciphered modules. A good key is something that is hard to guess. Typically in a format matching the pattern: /[0-9]{4}[A-Za-z]{4}[0-9]{4}[A-Za-z]{4}/. Internally the key can be any byte sequence from 1 to 255 bytes in length. But this file needs it to be readable, plain text, without leading or trailing spaces. Leave a blank line ("CipherKey=") to indicate that the module is enciphered but has no unlock key. (Omit for unlocked modules.) |
||
Elements required for proper rendering | |||
GlobalOptionFilter |
GBFStrongs (For GBF texts having Strong's Numbers) Each of these filters removes/hides the text's feature, when activated by the application. These filters are applied in the order that they are listed in the conf. |
Repeats | |
Direction |
LtoR (Left to Right) Indicate whether the language's script is a left to right script or a right to left script. Languages such as Hebrew, Arabic, Urdu, and Farsi have a right to left script (technically bi-directional). If the RtoL script is transliterated into a LtoR script, set the value to LtoR. |
LtoR | |
SourceType |
Plaintext These are various ways that the text can be encoded. The preferred encoding is OSIS. TEI is preferred for dictionaries until OSIS supports dictionaries. In SWORD, for modules encoded with ThML, OSIS or TEI, each verse, dictionary entry, and book division needs to be well-formed XML or it will result in display problems in some frontends. |
Plaintext | |
Encoding |
UTF-8 The preferred encoding of texts is UTF-8. UTF-8 modules must be encoded with Normalization Form C (NFC). Latin-1 is defined by Windows Codepage 1252 (cp1252) which is a superset of ISO 8859-1. This encoding indicates how the conf and the module are encoded. Warning: "Latin-1" is an ambiguously used term. See ISO 8859-1 at Wikipedia for technical details; in reality Latin-1 is regularly used as a synonym for ISO-8859-1. Frontend implementors should use "cp1252" or "windows1252" explicitly, not "Latin-1" provided by some programming language libraries. |
Latin-1 | |
DisplayLevel | <integer> | 1 | |
Font | <string> Specify the font to be used for display of the module if it is available. Omit this line to use the default font. Do not make use of font-specific encodings in your documents, but use Unicode instead and the Private Use Area if necessary for codepoints that are not handled by Unicode. |
||
OSISqToTick | true/false When set to false indicates that OSIS quote elements without a marker attribute are not to produce a quotation mark. This is useful for languages (e.g. Thai) and texts (e.g. KJV) that do not have quotation marks. It is also useful for modules that mark the "Words of Christ" on a verse by verse basis, when the quote spans more than one verse. |
true | |
Elements to indicate features | |||
Feature |
StrongsNumbers (for modules that include Strong's numbers) |
Repeats | |
GlossaryFrom | <xml:lang identifier> Glossaries map one language to another. This value indicates the language being translated from. See Lang below for a discussion of valid values. |
||
GlossaryTo | <xml:lang identifier> Glossaries map one language to another. This value indicates the language being translated to. See Lang below for a discussion of valid values. |
||
General informatic and installer elements | |||
About | <string> A lengthier description and may include copyright, source, etc. information, possibly duplicating information in other elements. |
Continuation RTF |
|
Version | <version string> Gives the module's revision number. Incrementing it when changes are made alerts users of the SWORD Installers to the presence of updated modules. Please start with version 1.0 and increment by 0.1 for minor updates and by larger values for more major updates such as a new text source. Changes to this conf file should also increment the version number. Do not use non-numbers, such as 1.4a or 1.1.3. |
1.0 | |
History_x.x | <string> Used to alert users to what has changed between different versions. Each time a version is incremented a history line with that version number should explain the change. |
Repeats | |
MinimumVersion | <version string> Identifies the minimum version of the Sword library required for this module. |
1.5.1a | |
Category |
Daily Devotional (for modules with Feature=DailyDevotion) |
Biblical Texts (for /(Raw|z)Text4?/) Commentaries (for /(Raw|z|HREF)Com4?/) |
|
LCSH | <tree/string> Library of Congress Subject Heading. You may search the Library of Congress catalog or use it as a guide for determining an appropriate LCSH for books that are not in the Library of Congress. |
||
Lang | <xml:lang identifier> This is the primary language code of the module and should include a value according to RFC 4646 using ISO639 codes when possible. ISO 639-1 codes are the preferred code (e.g. en for English). If there is none for the given language, use an ISO 639-2/T code (e.g. ceb for Cebuano). Failing that, use ISO 639-3, which covers over 7000 languages. See: http://www.sil.org/iso639-3/codes.asp for ISO 639-1, 639-2/T and 639-3 codes. |
en | |
InstallSize | <integer (indicating bytes)> | ||
SwordVersionDate | <ISO date string (yyyy-mm-dd)> Indicates the date that the module was changed. | ||
Obsoletes | <name of module> Each instance of this element names a module that is made obsolete by this module, usually indicated by the former name of the module. |
Repeats | |
Copyright & Licensing related elements | |||
Copyright | <string> Contains the copyright notice for the work, including the year of copyright and the owner of the copyright. |
Continuation | |
CopyrightHolder | <string> Contains the name of the copyright holder. |
||
CopyrightDate | <integer (indicating year)> | ||
CopyrightNotes | <string> | Continuation | |
CopyrightContactName | <string> Contains the name of the copyright holder. |
Continuation | |
CopyrightContactNotes | <string> | Continuation | |
CopyrightContactAddress | <string> Contains the mailing address of the copyright holder. |
Continuation | |
CopyrightContactEmail | <string> Contains the email address of the copyright holder, preferably in the form: name at xyz dot com. |
||
ShortPromo | <string> A link to the home page for the module, perhaps with an encouragement to visit the site. |
HTML Link | |
ShortCopyright | <string> | ||
DistributionLicense |
Public Domain |
||
DistributionNotes | <string> Indicates any additional notes about distribution of the module. |
Continuation | |
TextSource | <string, probably a URL> Indicates, either in prose (such as "CCEL") or as a URL of the source of the text |
Continuation |