Temporarily disable brother-ql + friends, update to python 3.13
This commit is contained in:
@@ -4,7 +4,7 @@ from sqlalchemy.orm import Session
|
||||
|
||||
from dibbler.conf import config
|
||||
from dibbler.models import Product, User
|
||||
from dibbler.lib.printer_helpers import print_bar_code, print_name_label
|
||||
# from dibbler.lib.printer_helpers import print_bar_code, print_name_label
|
||||
|
||||
from .helpermenus import Menu
|
||||
|
||||
@@ -21,27 +21,31 @@ Put it up somewhere in the vicinity.
|
||||
def _execute(self):
|
||||
self.print_header()
|
||||
|
||||
thing = self.input_thing("Product/User")
|
||||
print("Printer menu is under renovation, please be patient")
|
||||
|
||||
if isinstance(thing, Product):
|
||||
if re.match(r"^[0-9]{13}$", thing.bar_code):
|
||||
bar_type = "ean13"
|
||||
elif re.match(r"^[0-9]{8}$", thing.bar_code):
|
||||
bar_type = "ean8"
|
||||
else:
|
||||
bar_type = "code39"
|
||||
print_bar_code(
|
||||
thing.bar_code,
|
||||
thing.name,
|
||||
barcode_type=bar_type,
|
||||
rotate=config["printer"]["rotate"],
|
||||
printer_type="QL-700",
|
||||
label_type=config.get("printer", "label_type"),
|
||||
)
|
||||
elif isinstance(thing, User):
|
||||
print_name_label(
|
||||
text=thing.name,
|
||||
label_type=config["printer"]["label_type"],
|
||||
rotate=config["printer"]["rotate"],
|
||||
printer_type="QL-700",
|
||||
)
|
||||
return
|
||||
|
||||
# thing = self.input_thing("Product/User")
|
||||
|
||||
# if isinstance(thing, Product):
|
||||
# if re.match(r"^[0-9]{13}$", thing.bar_code):
|
||||
# bar_type = "ean13"
|
||||
# elif re.match(r"^[0-9]{8}$", thing.bar_code):
|
||||
# bar_type = "ean8"
|
||||
# else:
|
||||
# bar_type = "code39"
|
||||
# print_bar_code(
|
||||
# thing.bar_code,
|
||||
# thing.name,
|
||||
# barcode_type=bar_type,
|
||||
# rotate=config["printer"]["rotate"],
|
||||
# printer_type="QL-700",
|
||||
# label_type=config.get("printer", "label_type"),
|
||||
# )
|
||||
# elif isinstance(thing, User):
|
||||
# print_name_label(
|
||||
# text=thing.name,
|
||||
# label_type=config["printer"]["label_type"],
|
||||
# rotate=config["printer"]["rotate"],
|
||||
# printer_type="QL-700",
|
||||
# )
|
||||
|
||||
Reference in New Issue
Block a user