fix todos ?

This commit is contained in:
samerbam 2023-08-23 09:59:40 -04:00
parent 18b2a72bc2
commit a5e880dfd2

View File

@ -66,7 +66,7 @@ class ThermalPrinter():
def print_todos(self, todos=[{"time": "1:00pm to 2:00pm", "text": "Read a book"}]):
for x in self._parse_todos(todos):
# print(x)
self.p.charcode("cp437")
# self.p.charcode("cp437")
self.p.set(align="left")
self.p.text(x[0])
self.p.set(align="right")
@ -146,7 +146,7 @@ class ThermalPrinter():
def _parse_todos(self, data):
out = []
for x in data:
out.append([" " + x["time"], x["text"]])
out.append(["O " + x["time"], x["text"]])
return out
#Return: ["□ 1:00pm to 2:00pm", "Read a book"]