mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Refactoring
This commit is contained in:
parent
babc6f2517
commit
7a32e7a8c1
1 changed files with 5 additions and 12 deletions
|
@ -81,23 +81,16 @@ class CalendarHeatmapExporter(TextExporter):
|
||||||
journal_frequency_for_day = (
|
journal_frequency_for_day = (
|
||||||
month_journaling_freq[month][day] or 0
|
month_journaling_freq[month][day] or 0
|
||||||
)
|
)
|
||||||
|
day = str(day)
|
||||||
# TODO: Make colors configurable?
|
# TODO: Make colors configurable?
|
||||||
if journal_frequency_for_day == 0:
|
if journal_frequency_for_day == 0:
|
||||||
day_label = Text(
|
day_label = Text(day, style="red on black")
|
||||||
str(day or ""), style="red on black"
|
|
||||||
)
|
|
||||||
elif journal_frequency_for_day == 1:
|
elif journal_frequency_for_day == 1:
|
||||||
day_label = Text(
|
day_label = Text(day, style="black on yellow")
|
||||||
str(day or ""), style="black on yellow"
|
|
||||||
)
|
|
||||||
elif journal_frequency_for_day == 2:
|
elif journal_frequency_for_day == 2:
|
||||||
day_label = Text(
|
day_label = Text(day, style="black on green")
|
||||||
str(day or ""), style="black on green"
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
day_label = Text(
|
day_label = Text(day, style="black on white")
|
||||||
str(day or ""), style="black on white"
|
|
||||||
)
|
|
||||||
|
|
||||||
days.append(day_label)
|
days.append(day_label)
|
||||||
table.add_row(*days)
|
table.add_row(*days)
|
||||||
|
|
Loading…
Add table
Reference in a new issue