from datetime import datetime

from components import Os_Label_Printer
dmtx="0AG554457062203314"
context = {
    "DATAMATRIX": dmtx,
    "DATAMATRIX_TEXT": dmtx,
    "PIECE_NUM": str(3314),
    "DATETIME": str(datetime.now().isoformat()),
    "SHIFT": "01",
    "STATION": "ST-TEN-1",
    "OPERATOR": "albano",
    "PMAX": "6,13",
    "PMIN": "6,13",
    "LEAK": "0,00",
    "TFILL": "5",
    "TSTAB": "10",
    "TTEST": "20",
    "MAXLEAK": "0,03",
    "PTESTMIN": "6,00",
    "RESULT_L1": "ESITO",
    "RESULT_L2": "CONFORME",
}

config={"test":{"platform":"windows","printer":"zd421"}}
printer=Os_Label_Printer(config=config,name="test")
printer.print_label("EtichettaR5", context=context)
