initial prototype for autokanban

This commit is contained in:
Aron Petau 2025-10-20 22:41:13 +02:00
commit e03b3014fe
5647 changed files with 345269 additions and 0 deletions

16
app/printer.py Normal file
View file

@ -0,0 +1,16 @@
import escpos.printer
# Update this to match your printer's device path
PRINTER_DEVICE = "/dev/ttyUSB0"
class KanbanPrinter:
def __init__(self, device=PRINTER_DEVICE):
self.device = device
def print_task(self, content: str):
try:
printer = escpos.printer.Serial(devfile=self.device, baudrate=19200, timeout=1)
printer.text(f"Task: {content}\n")
printer.cut()
except Exception as e:
print(f"Printer error: {e}")