Skip to content

Commit

Permalink
Beginnings of Lauds support
Browse files Browse the repository at this point in the history
  • Loading branch information
gregordick committed Sep 22, 2024
1 parent 7d83430 commit 41d6553
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/officium/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,7 @@ def offices(self, date):

return OrderedDict([
('lauds', [cls(date, self._data_map, self._index, self, season,
season_keys, doxology, lauds_office, today,
today[1:])
season_keys, doxology, lauds_office, today[1:])
for (cls, lauds_office) in zip(lauds_classes,
lauds_offices)]),
('vespers', [cls(date, self._data_map, self._index, self, season,
Expand Down
24 changes: 18 additions & 6 deletions src/officium/lauds.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
from . import psalmish

# XXX! Most of vespers.py should become a common module.
from .vespers import Vespers
class Lauds(Vespers):
def __init__(self, *args):
args = list(args)
super().__init__(*args[:-1], concurring=[], commemorations=args[-1])
from .vespers import LaudsAndVespers


class Lauds(LaudsAndVespers):
def lookup(self, office, *items, **kwargs):
bases = [
['ad-laudes'],
]
return super().lookup(office, bases, *items, **kwargs)

@property
def gospel_canticle_path(self):
# XXX: Slashes.
return 'ad-laudes/benedictus'

def have_ferial_preces(self):
return self._calendar_resolver.has_ferial_preces(self._office,
self._date)


class EasterOctaveLauds(Lauds):
Expand Down
3 changes: 3 additions & 0 deletions src/officium/vespers.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ def lookup(self, office, bases, *items, **kwargs):
)
)

def lookup_main(self, *items, **kwargs):
return self.lookup(self._office, *items, **kwargs)

def psalmody(self, antiphon_class=parts.Antiphon):
use_commons = self._calendar_resolver.uses_common_for_psalmody(self._office)
antiphons = self.lookup_main('antiphonae', use_commons=use_commons)
Expand Down

0 comments on commit 41d6553

Please sign in to comment.