forked from Freely-Given-org/BibleOrgSys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BibleBooksNames.ReadMe.txt
85 lines (85 loc) · 6.27 KB
/
BibleBooksNames.ReadMe.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# BibleBooksNames.ReadMe.txt
# ReadMe.txt for Bible Books Names
# Version 0.30
# Last modified: 2011-02-22
#
# Abbreviations:
# XML = eXtensible Markup Language -- see http://en.wikipedia.org/wiki/XML
# DTD = Document Type Definition -- see http://en.wikipedia.org/wiki/Document_Type_Definition
# RNG = Relax NG schema (REgular LAnguage for XML Next Generation) -- see http://en.wikipedia.org/wiki/RELAX_NG
# RNC = RNG compact syntax -- see http://en.wikipedia.org/wiki/RELAX_NG#Compact_syntax
#
#
# Enclosed are four sets of files:
#
# DataFiles/BookNames/BibleBooksNames_lll_xxx.xml
where lll is the ISO 639-3 language code and xxx is the name of the book name system.
# A UTF-8 XML file which specifies three sets of data about the book names:
# 1/ Divisions
# Default Name, e.g., Old Testament
# Default Abbreviation, e.g., OT
# Input Abbreviations, e.g., Old Tstament
# The software automatically handles unambiguous shortening of any of these, plus removal of the space
# so "OldTest", "Old Tes", and "OldT", etc. would automatically be accepted with the above settings.
# A list of included Book Codes, e.g., GEN, EXO, ...
# Books can be included in more than one division, e.g., GEN might be in OT plus also in Pentateuch
# 2/ Book Leaders
# Standard leader, normally 1, 2, 3, etc.
# Alternates, e.g., I, II, III, One, Two Three, First, Second, Third, etc.
# The software then automatically handles things like 2 Samuel, IISam, etc.
# 3/ Book Names (the main part of the data file)
# Default Name, e.g., 2 Corinthians or James
# DON'T use the extended names here like "The Second Epistle of the Apostle Paul to the Church in Corinth"
# as they are expressed in the Bible files themselves
# Default Abbreviation, e.g., 2 Cor or Jam
# Suitable for use in a display which is limited to around three characters or so.
# Input Abbreviations, e.g., Jms
# The software automatically handles unambiguous shortening of any of these,
# plus substitution of the 2 (see leaders above), plus removal of the space.
# Thus there is no need to list Jame, Jam, or Ja explicitly.
# However, you may like to include common mispellings, e.g., Philipians.
# Note that it's possible to include information for all possible Bible books in this file -- even ones not used in a particular publication
# as the Book Order files are the ones which tell the system which particular books actually appear in a particular Bible publication.
# See the comments at the beginning of the file itself for the most up-to-date information on the file contents.
# The file also includes an internal DTD. To validate the XML on Linux systems, use
# xmllint --noout --valid DataFiles/BookNames/BibleBooksNames_lll_xxx.xml
# (If it gives no output or error messages, then it has validated.)
# The file includes an OSIS style header record. (See PDF file at http://bibletechnologies.net)
# Note though, that we use the xsd:date style with hyphens not with periods as per OSIS.
# Note also that you might have to expand the internal DTD and the Relax NG schema if you add additional fields to the header.
#
# DataFiles/BookNames/BibleBooksNames.rnc
# A RelaxNG Compact Syntax schema file
# On Linux, to convert to RNG, use
# trang DataFiles/BookNames/BibleBooksNames.rnc DerivedFiles/BibleBooksNames.rng
# On Linux, to validate against the .rng file, use
# xmllint --noout --relaxng DerivedFiles/BibleBooksNames.rng DataFiles/BookNames/BibleBooksNames_lll_xxx.xml
(where lll is the ISO 639-3 language code and xxx is the name of the book name system)
# or better still, to validate against both this and the internal DTD, use
# xmllint --noout --relaxng DerivedFiles/BibleBooksNames.rng --valid DataFiles/BookNames/BibleBooksNames_lll_xxx.xml
#
# BibleBooksNames.py (for Python 3)
# This small program will load and do some very basic checking of the XML data file.
# It contains three classes -- the Converter class is not intended to be used by most end-user programs.
# It can be used in a larger Python program to load the XML data into a number of Python dictionaries (with different fields as the key).
# It can also be used to convert and export the XML data directly to Python or C code which can be included in another program as well as JSON format
# (if you don't want to have to supply or validate the master XML file).
# It is expected that the user might want to modify the Python code in order to customize it to your particular needs for either of the above strategies.
# The program is open source with a GPL-3.0 licence.
# If you have Python3 installed on Linux, run the program with ./BibleBooksNames.py --help (once you have made the program file "executable").
# (Alternatively, try: python3 BibleBooksNames.py --help)
# To export the data in other formats, use --export (instead of --help).
# This should load and check the XML file and create BibleBooksNames_Tables.* files in the DerivedFiles folder, suitable for including in other programs.
# If the program is run without any additional parameters, it runs in a demo mode which should show the use of some of the available routines.
#
# Tests/BibleBooksNamesTests.py (for Python 3)
# Running this program from the command line will automatically run tests on the above module, listing tests which fail.
# A result of OK indicates that the tests have all passed.
# If you have Python3 installed on Linux, run the program with Tests/BibleBooksNamesTests.py (once you have made the program file "executable").
# (Alternatively, try: python3 Tests/BibleBooksNamesTests.py)
# Note that although the --help switch works, most of the other displayed options are included for compatibility reasons only, and do not function correctly.
#
#
# Robert Hunt
# Hunt.RobertJ@gmail.com
# February 2011.