Skip to content

Commit

Permalink
Adding celebration's class in CLI output
Browse files Browse the repository at this point in the history
  • Loading branch information
mmolenda committed Aug 22, 2024
1 parent 5a0a06e commit 827ad4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion missalemeum/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _print_all(missal):
collect.append(repr_)
te, ce, co = collect
datestr = date_.strftime('%A %Y-%m-%d') if row_number == 0 else ""
click.echo(f"{datestr.ljust(padding)} "
click.echo(f"{datestr.ljust(22)} class:{str(day.get_celebration_rank()).ljust(6)}"
f"{te.ljust(padding)} {ce.ljust(padding)} {co.ljust(padding)}")

missal: Calendar = controller.get_calendar(year, language)
Expand All @@ -79,6 +79,9 @@ def _print_all(missal):
def proper(proper_id: str, language: str):
try:
proper_vernacular, proper_latin = controller.get_proper_by_id(proper_id, language)
click.echo('# title Latin: {}'.format(proper_latin.title))
click.echo('# title vernacular: {}'.format(proper_vernacular.title))
click.echo('class: {}'.format(proper_latin.rank))
_print_proper(language, proper_vernacular)
_print_proper('Latin', proper_latin)
except (InvalidInput, ProperNotFound) as e:
Expand All @@ -97,6 +100,7 @@ def date(date: str, language: str):
click.echo(f'# {date}')
click.echo('- tempora: {}'.format(day.get_tempora_name()))
click.echo('- celebration: {}'.format(day.get_celebration_name()))
click.echo('- class: {}'.format(day.get_celebration_rank()))
for itr, (proper_vernacular, proper_latin) in enumerate(propers, 1):
if len(propers) > 1:
click.echo(f'\n--- Missa {itr} ---')
Expand Down

0 comments on commit 827ad4a

Please sign in to comment.