From ab8c87928b39e7874c09a75b2f9badd3a46719b2 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Fri, 24 Jun 2022 17:11:52 +0200 Subject: Update pyembroidery (#1683) Embroidery formats (read) .hus: Husqvarna Embroidery Format .zhs: Zeng Hsing Embroidery Format Color formats (read & write) .col : Color format. .edr : Color format. .inf : Color format. Stitch formats (read & write) .pmv : Brother Stitch Format. Image (write) .png : Portable Network Graphic (line art) G-Code The export file format is not .txt anymore but .gcode Bug fixes --- lib/inx/extensions.py | 2 +- lib/inx/inputs.py | 2 +- lib/inx/outputs.py | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/inx') diff --git a/lib/inx/extensions.py b/lib/inx/extensions.py index 9a197c5d..0ff3e889 100755 --- a/lib/inx/extensions.py +++ b/lib/inx/extensions.py @@ -30,7 +30,7 @@ def object_commands(): def pyembroidery_debug_formats(): for format in pyembroidery.supported_formats(): - if 'writer' in format and format['category'] != 'embroidery': + if 'writer' in format and format['category'] not in ['embroidery', 'image', 'color', 'stitch']: yield format['extension'], format['description'] diff --git a/lib/inx/inputs.py b/lib/inx/inputs.py index 2cf84df9..716e1708 100755 --- a/lib/inx/inputs.py +++ b/lib/inx/inputs.py @@ -10,7 +10,7 @@ from .utils import build_environment, write_inx_file def pyembroidery_input_formats(): for format in pyembroidery.supported_formats(): - if 'reader' in format and format['category'] == 'embroidery': + if 'reader' in format and format['category'] in ['embroidery', 'color', 'stitch']: yield format['extension'], format['description'] diff --git a/lib/inx/outputs.py b/lib/inx/outputs.py index 1ac1daf8..3a4ac9d0 100644 --- a/lib/inx/outputs.py +++ b/lib/inx/outputs.py @@ -12,7 +12,13 @@ def pyembroidery_output_formats(): for format in pyembroidery.supported_formats(): if 'writer' in format: description = format['description'] - if format['category'] != "embroidery": + if format['category'] == "color": + description = "%s [COLOR]" % description + elif format['category'] == "image": + description = "%s [IMAGE]" % description + elif format['category'] == "stitch": + description = "%s [STITCH]" % description + elif format['category'] != "embroidery": description = "%s [DEBUG]" % description yield format['extension'], description, format['mimetype'], format['category'] -- cgit v1.2.3