From 7a32e7a8c180cc3156261d128db57ee3dca994f7 Mon Sep 17 00:00:00 2001 From: Aaron Lichtman Date: Wed, 21 Jun 2023 07:55:30 -0700 Subject: [PATCH] Refactoring --- jrnl/plugins/calendar_heatmap_exporter.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/jrnl/plugins/calendar_heatmap_exporter.py b/jrnl/plugins/calendar_heatmap_exporter.py index 8476e662..ab7bb4c2 100644 --- a/jrnl/plugins/calendar_heatmap_exporter.py +++ b/jrnl/plugins/calendar_heatmap_exporter.py @@ -81,23 +81,16 @@ class CalendarHeatmapExporter(TextExporter): journal_frequency_for_day = ( month_journaling_freq[month][day] or 0 ) + day = str(day) # TODO: Make colors configurable? if journal_frequency_for_day == 0: - day_label = Text( - str(day or ""), style="red on black" - ) + day_label = Text(day, style="red on black") elif journal_frequency_for_day == 1: - day_label = Text( - str(day or ""), style="black on yellow" - ) + day_label = Text(day, style="black on yellow") elif journal_frequency_for_day == 2: - day_label = Text( - str(day or ""), style="black on green" - ) + day_label = Text(day, style="black on green") else: - day_label = Text( - str(day or ""), style="black on white" - ) + day_label = Text(day, style="black on white") days.append(day_label) table.add_row(*days)