forked from Freely-Given-org/BibleOrgSys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BibleBooksCodes.ReadMe.txt
executable file
·89 lines (89 loc) · 7.22 KB
/
BibleBooksCodes.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
86
87
88
89
# BibleBooksCodes.ReadMe.txt
# ReadMe.txt for Bible Books Codes
# Version 0.72
# Last modified: 2013-12-26
#
#
# 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
# JSON = JavaScript Object Notation -- see http://en.wikipedia.org/wiki/JSON
#
# SBL = Society of Biblical Literature -- see http://www.sbl-site.org
# CCEL = Christian Classic Ethereal Library -- see http://www.ccel.org
# SIL = SIL International -- see http://sil.org
# OSIS = Open Scripture Information Standard -- see http://bibletechnologies.net
# OXES = "Open" XML for Editing Scripture -- curently being developed within SIL -- see http://groups.google.com/group/scriptureinterchangeformat
# UBS = United Bible Societies -- see http://paratext.ubs-translations.org
# SFM = Standard Format Markers used widely within SIL -- see http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=Glossary#sfm
# USFM = UBS Unified Standard Format Markers -- see http://paratext.ubs-translations.org/about/usfm
# USX = UBS Unified Standard XML -- see https://bitbucket.org/paratext/dblvalidation/src/tip/source/text
# UnboundBible = a download site of Biola University -- see http://unbound.biola.edu/index.cfm?method=unbound.showFAQ&faq_name=Bible_Index_Codes
# Bibledit = (GTK) Bible editor program -- see https://sites.google.com/site/bibledit/home
#
#
# Enclosed are four files:
#
# DataFiles/BibleBooksCodes.xml
# A UTF-8 XML file encoding SBL, OSIS, USFM/OXES/UBS-Paratext, CCEL, NETBible, DrupalBible, and Sword Bible books codes
# The data also includes a new 3-letter UPPER CASE referenceAbbreviation which always starts with a letter and so can be used directly as an XML ID (unlike most of the other fields).
# These referenceAbbreviation fields are often put in a variable called BBB (BiBle Book 3-character code) in program code.
# The unique 1..255 referenceNumber values are for processing and error messages -- numbers 1..66 are guaranteed to match the normal Protestant Bible.
A sequenceNumber which suggests a possible order for the books if no other order information is available.
# The English name is included as a comment only and is unimportant (although it might be used for some crude processing purposes).
# 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/BibleBooksCodes.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.
# The data comes from the SBL Manual of Style, the OSIS 2.1.1 users' manual and from the VERY HELPFUL http://lc.bfbs.org.uk/request.php?canonicalissuesinparatext.pdf.
# While it is a derived work, I don't expect anyone to object to the use of this data. I think it is fair use to offer it as a public domain compilation.
#
# DataFiles/BibleBooksCodes.rnc
# A RelaxNG Compact Syntax schema file
# On Linux, to convert to RNG, use
# trang DataFiles/BibleBooksCodes.rnc DataFiles/DerivedFiles/BibleBooksCodes.rng
# On Linux, to validate against the .rng file, use
# xmllint --noout --relaxng DataFiles/DerivedFiles/BibleBooksCodes.rng DataFiles/BibleBooksCodes.xml
# or better still, to validate against both this and the internal DTD, use
# xmllint --noout --relaxng DataFiles/DerivedFiles/BibleBooksCodes.rng --valid DataFiles/BibleBooksCodes.xml
#
# BibleBooksCodesConverter.py (for Python 3)
# This small program will load and do some very basic checking of the XML data file.
# 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 ./BibleBooksCodesConverter.py --help (once you have made the program file "executable").
# (Alternatively, try: python3 BibleBooksCodesConverter.py --help)
# To export the data in other formats, use --export (instead of --help).
# This should load and check the XML file and create BibleBooksCodes_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.
#
# BibleBooksCodes.py (for Python 3)
# This small program first calls the above Converter class to load and check the XML Bible books codes data.
# It then contains a number of helpful routines for accessing that data.
# The class is set up as a singleton, meaning that only one instance of this class is created, and then that same instance is shared by all callers.
# 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 ./BibleBooksCodes.py --help (once you have made the program file "executable").
# (Alternatively, try: python3 BibleBooksCodes.py --help)
# 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/BibleBooksCodesTests.py (for Python 3)
# Running this program from the command line will automatically run tests on the above two modules, 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/BibleBooksCodesTests.py (once you have made the program file "executable").
# (Alternatively, try: python3 Tests/BibleBooksCodesTests.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
# October 2010--December 2013.