From c36686d3a8f8b8e20f7f143d4e701fafbb50ae17 Mon Sep 17 00:00:00 2001 From: devdesk Date: Sun, 11 Jun 2023 13:41:02 +0300 Subject: [PATCH] err --- inkscape/thermo.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inkscape/thermo.py b/inkscape/thermo.py index eb29b72..ccf8d57 100644 --- a/inkscape/thermo.py +++ b/inkscape/thermo.py @@ -8,14 +8,16 @@ class ExportAndRunScript(inkex.EffectExtension): def effect(self): # Define the export file path - png_file_path = "~/yair/exported.png" + png_file_path = "/home/devdesk/yair/thermatext/labels/exported.png" # Get the current selection selection = self.svg.selected + inkex.errormsg(selection) # If there's no selection, show an error and exit if not selection: - inkex.dialogs.errormsg("No selection to export.") + # inkex.dialogs.errormsg("No selection to export.") + inkex.errormsg("No selection to export.") return # Export the selection to PNG @@ -40,7 +42,7 @@ class ExportAndRunScript(inkex.EffectExtension): bash_script_path = "print.sh" # Create a command that calls the bash script with the PNG as an argument - command = ["bash", bash_script_path, png_file_path] + command = ["sudo", "brother_ql", "-b", "pyusb", "--model", "QL-570", "-p", "usb://0x04f9:0x2028/000M6Z401370", "print", "-l", "62", png_file_path] # Run the command subprocess.check_call(command)