From 45aac33f7c54a7a5590db0b606229ebd38cd9414 Mon Sep 17 00:00:00 2001 From: samerbam Date: Thu, 24 Aug 2023 21:41:24 -0400 Subject: [PATCH] 'text' -> 'task' to match Todo spec --- application/thermal_print.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/thermal_print.py b/application/thermal_print.py index 50ea604..f2b9abd 100644 --- a/application/thermal_print.py +++ b/application/thermal_print.py @@ -69,7 +69,7 @@ class ThermalPrinter(): self.p.text("\n\n") # pass #TODO: add other greetings? - def print_todos(self, todos=[{"time": "1:00pm to 2:00pm", "text": "Read a book"}, {"time": "2:00pm to 3:00pm", "text": "Go for a walk"}, {"time": "3:00pm to 4:00pm", "text": "Walk to school while jumping on one leg and scratching your head."},]): + def print_todos(self, todos=[{"time": "1:00pm to 2:00pm", "task": "Read a book"}, {"time": "2:00pm to 3:00pm", "task": "Go for a walk"}, {"time": "3:00pm to 4:00pm", "task": "Walk to school while jumping on one leg and scratching your head."},]): self.p.set(align="left") for x in self._parse_todos(todos): # print(x) @@ -225,7 +225,7 @@ class ThermalPrinter(): def _parse_todos(self, data): out = [] for x in data: - out.append(["O " + x["time"], x["text"]]) + out.append(["O " + x["time"], x["task"]]) return out #Return: ["□ 1:00pm to 2:00pm", "Read a book"]