potential fix, reorder items
This commit is contained in:
parent
3f09ba09b1
commit
18b2a72bc2
@ -58,16 +58,15 @@ class ThermalPrinter():
|
||||
|
||||
def print_greeting(self):
|
||||
self.p.set(align="center")
|
||||
self.p.set(invert=True)
|
||||
self.p.text(datetime.today().strftime('%Y-%m-%d'))
|
||||
self.p.set(align="left")
|
||||
self.p.set(invert=False)
|
||||
self.p.text("\n")
|
||||
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"}]):
|
||||
for x in self._parse_todos(todos):
|
||||
# print(x)
|
||||
self.p.charcode("cp437")
|
||||
self.p.set(align="left")
|
||||
self.p.text(x[0])
|
||||
self.p.set(align="right")
|
||||
@ -88,6 +87,7 @@ class ThermalPrinter():
|
||||
|
||||
def print_random_quote(self):
|
||||
q = self.database.get_random_quote()
|
||||
self.p.text("\n\n")
|
||||
self.p.set(align="left")
|
||||
self.p.text(q[0])
|
||||
self.p.text("\n")
|
||||
@ -107,7 +107,7 @@ class ThermalPrinter():
|
||||
w = WordSearch(','.join(words), 32, 16)
|
||||
|
||||
self.p.set(align="left")
|
||||
self.p.text("Word Search:" + "\n")
|
||||
self.p.text("Word Search:")
|
||||
self.p.text("\n\n")
|
||||
self.p.set(align="center")
|
||||
|
||||
@ -138,9 +138,9 @@ class ThermalPrinter():
|
||||
def print_default(self):
|
||||
self.print_greeting()
|
||||
self.print_todos()
|
||||
self.print_random_quote()
|
||||
self.print_sudoku()
|
||||
self.print_wordsearch()
|
||||
self.print_random_quote()
|
||||
self.finished_printing()
|
||||
|
||||
def _parse_todos(self, data):
|
||||
|
Loading…
Reference in New Issue
Block a user