officiumdivinum.objects package

Submodules

officiumdivinum.objects.datastructures module

class officiumdivinum.objects.datastructures.Antiphon(content: str)[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent an anitphon (for psalms).

content: str
template = 'string'
class officiumdivinum.objects.datastructures.Blessing(content: str)[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent a blessing.

content: str
template = 'blessing'
exception officiumdivinum.objects.datastructures.CalendarException[source]

Bases: Exception

class officiumdivinum.objects.datastructures.Celebration(name: str)[source]

Bases: object

A class to represent a celebration.

This might be a bit more in depth than we need to go.

name: str
class officiumdivinum.objects.datastructures.Collect(content: str, termination: str)[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent a collect.

content: str
template = 'collect'
termination: str
class officiumdivinum.objects.datastructures.Commemoration(name: str, rank: officiumdivinum.objects.datastructures.Rank)[source]

Bases: object

A class to represent a commemoration.

This might be a bit more in depth than we need to go.

name: str
rank: officiumdivinum.objects.datastructures.Rank
class officiumdivinum.objects.datastructures.Date(rules: str, date: Optional[datetime.datetime] = None)[source]

Bases: object

A class to represent a date which may or may not need resolving for a specific year.

date: datetime.datetime = None
resolve(year: int)[source]
Parameters

year (int :)

rules: str
class officiumdivinum.objects.datastructures.Feast(rank: officiumdivinum.objects.datastructures.Rank, date: Union[datetime.datetime, officiumdivinum.objects.datastructures.Date], calendar: str, Type: str, name: Optional[str] = None, celebration: Optional[officiumdivinum.objects.datastructures.Celebration] = None, commemorations: Optional[List] = None, qualifiers: Optional[List] = None)[source]

Bases: object

Object to represent a liturgical day.

These are sortable by rank, although sorting objects with distinct calendars is unsupported and will probably return nonsense.

Multiple Feast objects can meaningfully exist for a given calendar day, if they have different Type s. (I.e. tempore/sanctorum.) This might be a design decision worth re-thinking down the line.

Type: str
calendar: str
celebration: officiumdivinum.objects.datastructures.Celebration = None
commemorations: List = None
date: Union[datetime.datetime, officiumdivinum.objects.datastructures.Date]
name: str = None
qualifiers: List = None
rank: officiumdivinum.objects.datastructures.Rank
class officiumdivinum.objects.datastructures.Feria(name: str)[source]

Bases: object

Class to represent a feria, which can be quite a complicated thing.

name: str
class officiumdivinum.objects.datastructures.Gloria(content: List[str])[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent a gloria in any language.

content: List[str]
template = 'gloria'
class officiumdivinum.objects.datastructures.Hymn(name: str, content: List[List[str]])[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent a hymn.

content: List[List[str]]
name: str
template = 'hymn'
class officiumdivinum.objects.datastructures.Incipit(name: str, content: List[officiumdivinum.objects.datastructures.Responsory])[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent an incipit. Paramters ———

name: str: Name of an incipit in the right language. content: List[Versicle]: list of Responsory objects.

content: List[officiumdivinum.objects.datastructures.Responsory]
name: str
template = 'incipit'
class officiumdivinum.objects.datastructures.Martyrology(date: officiumdivinum.objects.datastructures.Date, old_date: str, content: List, ordinals: Optional[List] = None, moonstr: str = ' Luna {ordinal} Anno Domini {year}')[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent the martyrology for a given day.

content: List
date: officiumdivinum.objects.datastructures.Date
html()[source]

Render self as html.

lunar(date: datetime.datetime)[source]
Parameters

date (datetime :)

moonstr: str = ' Luna {ordinal} Anno Domini {year}'
old_date: str
ordinals: List = None
render(year: int)[source]
Parameters

year (int :)

template = 'martyrology'
class officiumdivinum.objects.datastructures.MartyrologyInfo(date: officiumdivinum.objects.datastructures.Date, content: List)[source]

Bases: object

Class to represent a martyrology entry which should be appended after the date and before the content fixed for the day.

content: List
date: officiumdivinum.objects.datastructures.Date
class officiumdivinum.objects.datastructures.Octave(name: str, privileged: Optional[bool] = None, rank: None = None)[source]

Bases: object

Class to represent an octave, which may be of various kinds rank: rank of the octave.

name: str
privileged: bool = None
rank: None = None
class officiumdivinum.objects.datastructures.Psalm(content: List[officiumdivinum.objects.datastructures.Verse], ref: str, gloria: officiumdivinum.objects.datastructures.Gloria, suppress_gloria: Optional[bool] = None)[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent a psalm.

content: List[officiumdivinum.objects.datastructures.Verse]
gloria: officiumdivinum.objects.datastructures.Gloria
ref: str
suppress_gloria: bool = None
template = 'psalm'
class officiumdivinum.objects.datastructures.Rank(name: str = 'Feria', defeatable: Optional[bool] = None, octave: Optional[officiumdivinum.objects.datastructures.Octave] = None)[source]

Bases: object

Class to represent the rank of a particular feast.

This must be able to return a machine-readable and sortable object (we use an integer from 0 with 0 = feria) and also preserve the particular name we use in any given calendar .

defeatable: bool = None
name: str = 'Feria'
octave: officiumdivinum.objects.datastructures.Octave = None
exception officiumdivinum.objects.datastructures.RankException[source]

Bases: Exception

class officiumdivinum.objects.datastructures.Reading(name: str, ref: str, content: List[Union[officiumdivinum.objects.datastructures.Verse, officiumdivinum.objects.datastructures.StrObj]], description: str = None)[source]

Bases: officiumdivinum.objects.datastructures.Renderable

content: List[Union[officiumdivinum.objects.datastructures.Verse, officiumdivinum.objects.datastructures.StrObj]]
description: str = None
name: str
ref: str
template = 'reading'
class officiumdivinum.objects.datastructures.Renderable[source]

Bases: object

Base class for renderable objects.

Derived objects should set their .template attribute. Be sure actually to create the template (in api/templates) before calling the method.

DSL()[source]

Render self as dsl.

gabc()[source]

Render self as gabc.

html()[source]

Render self as html.

latex()[source]

Render self as latex.

class officiumdivinum.objects.datastructures.Responsory(content: List[tuple])[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent a responsory.

Later we may want to make this more explicit.

Parameters

content (List[tuple]: List of lhs, rhs tuples.)

content: List[tuple]
template = 'responsory'
class officiumdivinum.objects.datastructures.Rubric(content: str)[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Class to represent a rubric displayed by itself.

content: str
template = 'string'
class officiumdivinum.objects.datastructures.Rules(source: officiumdivinum.objects.datastructures.Feast = None, nocturns: int = None, sunday_psalms: bool = None, antiphons_at_hours: bool = None, proper_hymns: List[str] = None, Te_Deum: bool = None, lessons: int = None, doxology: str = None, feria: bool = None, festum_Domini: bool = None, gloria_responsory: bool = None, vespers_antiphons: List[str] = None, second_chapter_verse: bool = None, second_chapter_verse_lauds: bool = None, commemoration_key: int = None, duplex: bool = None, hymn_terce: bool = None, crossref: officiumdivinum.objects.datastructures.Feast = None, one_antiphon: bool = None, athanasian_creed: bool = None, stjamesrule: str = None, psalm_5_vespers: int = None, psalm_5_vespers_3: int = None, initia_cum_responsory: bool = None, invit2: bool = None, laudes2: bool = None, laudes_litania: bool = None, first_lesson_saint: bool = None, limit_benedictiones_oratio: bool = None, minores_sine_antiphona: bool = None, no_commemoration: bool = None, no_suffragium: bool = None, no_commemoration_sunday: bool = None, omit: List = None, sunday_collect: bool = None, preces_feriales: bool = None, proper: bool = None, psalm_53_prime: bool = None, psalmi_minores_dominica: bool = None)[source]

Bases: object

Te_Deum: bool = None
antiphons_at_hours: bool = None
athanasian_creed: bool = None
commemoration_key: int = None
crossref: officiumdivinum.objects.datastructures.Feast = None
doxology: str = None
duplex: bool = None
feria: bool = None
festum_Domini: bool = None
first_lesson_saint: bool = None
gloria_responsory: bool = None
hymn_terce: bool = None
initia_cum_responsory: bool = None
invit2: bool = None
laudes2: bool = None
laudes_litania: bool = None
lessons: int = None
limit_benedictiones_oratio: bool = None
minores_sine_antiphona: bool = None
no_commemoration: bool = None
no_commemoration_sunday: bool = None
no_suffragium: bool = None
nocturns: int = None
omit: List = None
one_antiphon: bool = None
preces_feriales: bool = None
proper: bool = None
proper_hymns: List[str] = None
psalm_53_prime: bool = None
psalm_5_vespers: int = None
psalm_5_vespers_3: int = None
psalmi_minores_dominica: bool = None
second_chapter_verse: bool = None
second_chapter_verse_lauds: bool = None
skip_psalm_93 = None
source: officiumdivinum.objects.datastructures.Feast = None
stjamesrule: str = None
sunday_collect: bool = None
sunday_psalms: bool = None
vespers_antiphons: List[str] = None
class officiumdivinum.objects.datastructures.StrObj(content: str)[source]

Bases: officiumdivinum.objects.datastructures.Renderable

content: str
template = 'string'
class officiumdivinum.objects.datastructures.Verse(number: int, chapter: int, book: Optional[str], content: str, version: Optional[str] = None)[source]

Bases: officiumdivinum.objects.datastructures.Renderable

Parameters
  • number (int : Verse number.)

  • chapter (int : Chapter number.)

  • book (str: Book (can be None to indicate ‘don’t print’))

  • content (str : Verse content.)

  • version (str or None: Version in question (probably not worth storing here).)

book: Optional[str]
chapter: int
content: str
number: int
template = 'verse'
version: str = None
officiumdivinum.objects.datastructures.valid_calendars = ['1955', '1960']

Valid types of day.

officiumdivinum.objects.divinumofficium_structures module

Structures used by divinumofficium, since Lazslo Kiss rolled his own database and all kinds of other fun stuff in perl, and we want to be able to parse it without horrendous amounts of hard coding.

officiumdivinum.objects.html_render module

officiumdivinum.objects.html_render.render_template(template, **kwargs)[source]

Module contents

Objects used throughout the generation, server, api and backends.