This commit is contained in:
samerbam 2023-08-23 12:31:51 -04:00
parent 4e2ce9cbda
commit dc5f7033ce

View File

@ -64,6 +64,7 @@ class ThermalPrinter():
# pass #TODO: add other greetings? # pass #TODO: add other greetings?
def print_todos(self, todos=[{"time": "1:00pm to 2:00pm", "text": "Read a book"}]): def print_todos(self, todos=[{"time": "1:00pm to 2:00pm", "text": "Read a book"}]):
self.p.set(align="left")
for x in self._parse_todos(todos): for x in self._parse_todos(todos):
# print(x) # print(x)
this_line_width = len(x[0])+len(x[1]) this_line_width = len(x[0])+len(x[1])
@ -100,6 +101,7 @@ class ThermalPrinter():
for l in output: for l in output:
print(l) print(l)
self.p.text(l) self.p.text(l)
self.p.set(align="left")
# self.p.set(align="right") # self.p.set(align="right")
# self.p.textln(x[1]) # self.p.textln(x[1])
@ -173,7 +175,7 @@ class ThermalPrinter():
print('end 1') print('end 1')
print('start 2') print('start 2')
# self.print_todos() self.print_todos()
print('end 2') print('end 2')
print('start 3') print('start 3')