Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
New minor release 4.5.15
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkroorda committed Feb 29, 2016
1 parent df9d65e commit f8d7e7d
Show file tree
Hide file tree
Showing 11 changed files with 326 additions and 65 deletions.
Binary file removed dist/laf-fabric-4.5.14.tar.gz
Binary file not shown.
Binary file added dist/laf-fabric-4.5.15.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
project = u'LAF Fabric'
copyright = u'2013, Dirk Roorda'
version = '4.5'
release = '4.5.14'
release = '4.5.15'
exclude_patterns = ['_build']
add_function_parentheses = True
add_module_names = False
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py.bck
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ master_doc = 'index'
project = u'LAF Fabric'
copyright = u'2013, Dirk Roorda'
version = '4.5'
release = '4.5.13'
release = '4.5.14'
exclude_patterns = ['_build']
add_function_parentheses = True
add_module_names = False
Expand Down
37 changes: 31 additions & 6 deletions docs/texts/ETCBC-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ Then you can use the following functions
Yields the verse node of the passage specified by `book`, `chapter` and `verse`.
Yields `None` if there is no such verse.

Book must be given as a *node*, the book name for the verse_label will be in language `lang`.
See the methods `book_name()` and `book_node()` below to map a book name to a book node and vice versa.

.. code-block:: python
T.formats()
Expand All @@ -128,19 +131,24 @@ They do not have to correspond to consecutive words in the bible.

.. code-block:: python
T.verse(book, chapter, verse, fmt='ha', html=True, verse_label=True, format_label=True)
T.verse(book, chapter, verse, fmt='ha', html=True, verse_label=True, format_label=True, lang='en')
Give the plain text of the indicated verse in format ``fmt``.
You can choose wether to include a verse label (like ``Genesis 3:7``) and a format label
(like ``hebrew accent``).

If ``html`` is ``True`` then the result is formatted as a html table, with the right style characteristics.
You can still tweak the styles a bit, see the function ``T.style()`` later on.

Like in `node_of()`, `book` must be given as a node.
See the methods `book_name()` and `book_node()` below to map a book name to a book node and vice versa.

.. code-block:: python
T.whole(fmt='ha', verse_labels=False)
T.whole(fmt='ha', verse_labels=False, lang='en')
Give the plain text of the whole Bible in format ``fmt``.
The language for the book names in the verse labels is given by `lang`.

.. code-block:: python
Expand All @@ -158,15 +166,32 @@ You only have to pass the parameters that you want to give a non-default value.

.. code-block:: python
T.books(lang='la')
T.book_name(book_node, lang='en')
Returns the book name of the book corresponding to `book_node` in language `lang`.

.. code-block:: python
T.book_node(book_name, lang='en')
Returns the book node of the book with name `book_name` in language `lang`.

Lists the books in the ETCBC order but with names according to `lang`.
If `lang` is `la` (latin), the book names are exactly as used in the ETCBC database.

Supported languages:

* en = English
* la = Latin (default).
* en = English (default)
* nl = Dutch
* de = German
* fr = French
* el = Greek
* la = Latin (used in the ETCBC database).

.. code-block:: python
T.book_nodes
For convenience, the tuple of nodes corresponding to the books in the ETCBC order.

.. _node_order:

Expand Down
2 changes: 1 addition & 1 deletion emdros2laf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import argparse

NAME = 'LAF-Fabric'
VERSION = '4.5.14'
VERSION = '4.5.15'
APIREF = 'http://laf-fabric.readthedocs.org/en/latest/texts/API-reference.html'
DEFAULT_DATA_DIR = 'laf-fabric-data'
MAIN_CFG = 'laf-fabric.cfg'
Expand Down
11 changes: 10 additions & 1 deletion etcbc/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,21 @@ def verses(API):
msg('Making verse index', verbose='NORMAL')
for vn in F.otype.s('verse'):
n += 1
bk = F.book.v(vn)
bk = Lu['book'][vn]
ch = int(F.chapter.v(vn))
vs = int(F.verse.v(vn))
verses.setdefault(bk, {}).setdefault(ch, {})[vs] = vn
msg('Done. {} verses'.format(n), verbose='NORMAL')
return verses

def books_la(API):
msg = API['msg']
F = API['F']
msg('Listing books', verbose='NORMAL')
books = tuple((b, F.book.v(b)) for b in F.otype.s('book'))
msg('Done. {} books'.format(len(books), verbose='NORMAL'))
return books

def prep_post(lafapi):
lafapi.stamp.Nmsg('ETCBC reference: {}'.format(ETCBCREF))
lafapi.api['L'] = Layer(lafapi)
Expand All @@ -149,5 +157,6 @@ def prep_post(lafapi):
('zL00(node_up)', (node_up, __file__, False, 'etcbc')),
('zL00(node_down)', (node_down, __file__, False, 'etcbc')),
('zV00(verses)', (verses, __file__, False, 'etcbc')),
('zV00(books_la)', (books_la, __file__, False, 'etcbc')),
))
prepare = (prepare_dict, prep_post)

0 comments on commit f8d7e7d

Please sign in to comment.