Files
grotti/grotti/printers.py
T
Dominic Gundel 9e22cebb81 Grotti 2.10.0: Orca-Senden, Slice-Ordner, ED-Strom, Hygiene.
Slice-Watch mit Ordnern/Filtern, Orca-Nachbearbeitung, Cockpit-Verlauf
mit ED, Zeitzone im Browser. Tasten-Grenze und README-API angeglichen,
toter Code entfernt, Requirements gepinnt.
2026-10-18 00:41:15 +02:00

22 lines
522 B
Python

"""Die Drucker: Familie aus dem Namen, die Liste selbst liegt in PostgreSQL."""
FAMILY_LABELS = {"kobra_s1": "Kobra S1", "kobra_3": "Kobra 3"}
def family_from_name(name):
low = name.lower()
if "s1" in low:
return "kobra_s1"
if "kobra 3" in low or "kobra3" in low:
return "kobra_3"
return ""
def family_from_text(text):
low = (text or "").lower()
if "kobra s1" in low:
return "kobra_s1"
if "kobra 3" in low or "kobra3" in low:
return "kobra_3"
return ""