From 40a343128043b7d2ebe3a770dfae887e969fc5e0 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 12 Jun 2018 20:54:51 -0400 Subject: add output INX generator --- bin/gen-input-inx | 4 ++-- bin/gen-output-inx | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100755 bin/gen-output-inx (limited to 'bin') diff --git a/bin/gen-input-inx b/bin/gen-input-inx index 5f21ce84..6351d062 100755 --- a/bin/gen-input-inx +++ b/bin/gen-input-inx @@ -21,9 +21,9 @@ def libembroidery_input_formats(): while(curFormat): extension = embFormat_extension(curFormat) description = embFormat_description(curFormat) - writerState = embFormat_readerState(curFormat) + reader_state = embFormat_readerState(curFormat) - if writerState.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY: + if reader_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY: # extension includes the dot, so we'll remove it yield extension[1:], description diff --git a/bin/gen-output-inx b/bin/gen-output-inx new file mode 100755 index 00000000..f167dbee --- /dev/null +++ b/bin/gen-output-inx @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +import sys, os +from os.path import dirname +from libembroidery import * +from jinja2 import Environment, FileSystemLoader, select_autoescape + + +def build_environment(): + template_dir = os.path.join(dirname(dirname(os.path.realpath(__file__))), "templates") + + return Environment( + loader = FileSystemLoader(template_dir), + autoescape = True + ) + + +def libembroidery_output_formats(): + formatList = embFormatList_create() + curFormat = formatList + while(curFormat): + extension = embFormat_extension(curFormat) + description = embFormat_description(curFormat) + writer_state = embFormat_writerState(curFormat) + + if writer_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY: + # extension includes the dot, so we'll remove it + yield extension[1:], description + + curFormat = curFormat.next + + +def main(): + env = build_environment() + template = env.get_template('embroider_output.inx') + + for format, description in libembroidery_output_formats(): + inx = template.render(format=format, description=description) + + with open("inx/inkstitch_output_%s.inx" % format.upper(), 'w') as inx_file: + inx_file.write(inx) + + +if __name__ == "__main__": + sys.exit(main()) -- cgit v1.3.1 From b4dd5a1e8fac21b4d40e3a839715834ea243e49a Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 12 Jun 2018 21:48:38 -0400 Subject: add zip INX generator and INX --- bin/gen-zip-inx | 44 +++++++++++++++++++++++++++ inx/inkstitch_output_ZIP.inx | 61 ++++++++++++++++++++++++++++++++++++++ messages.po | 2 +- templates/embroider_zip_output.inx | 21 +++++++++++++ 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100755 bin/gen-zip-inx create mode 100644 inx/inkstitch_output_ZIP.inx create mode 100644 templates/embroider_zip_output.inx (limited to 'bin') diff --git a/bin/gen-zip-inx b/bin/gen-zip-inx new file mode 100755 index 00000000..5fbc8f1e --- /dev/null +++ b/bin/gen-zip-inx @@ -0,0 +1,44 @@ +#!/usr/bin/env python + +import sys, os +from os.path import dirname +from libembroidery import * +from jinja2 import Environment, FileSystemLoader, select_autoescape + + +def build_environment(): + template_dir = os.path.join(dirname(dirname(os.path.realpath(__file__))), "templates") + + return Environment( + loader = FileSystemLoader(template_dir), + autoescape = True + ) + + +def libembroidery_output_formats(): + formatList = embFormatList_create() + curFormat = formatList + while(curFormat): + extension = embFormat_extension(curFormat) + description = embFormat_description(curFormat) + writer_state = embFormat_writerState(curFormat) + + if writer_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY: + # extension includes the dot, so we'll remove it + yield extension[1:], description + + curFormat = curFormat.next + + +def main(): + env = build_environment() + template = env.get_template('embroider_zip_output.inx') + + inx = template.render(formats=libembroidery_output_formats()) + + with open("inx/inkstitch_output_ZIP.inx", 'w') as inx_file: + inx_file.write(inx) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/inx/inkstitch_output_ZIP.inx b/inx/inkstitch_output_ZIP.inx new file mode 100644 index 00000000..b5b2cf1c --- /dev/null +++ b/inx/inkstitch_output_ZIP.inx @@ -0,0 +1,61 @@ + + + <_name>embroidery ZIP file output + org.inkstitch.output.zip + inkstitch.py + inkex.py + + .zip + application/zip + <_filetypename>Ink/Stitch: ZIP export multiple formats (.zip) + <_filetypetooltip>Create a ZIP with multiple embroidery file formats using Ink/Stitch + true + + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + false + + zip + + diff --git a/messages.po b/messages.po index b872f864..36af2e50 100644 --- a/messages.po +++ b/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2018-06-12 20:18-0400\n" +"POT-Creation-Date: 2018-06-15 21:44-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/templates/embroider_zip_output.inx b/templates/embroider_zip_output.inx new file mode 100644 index 00000000..5d162357 --- /dev/null +++ b/templates/embroider_zip_output.inx @@ -0,0 +1,21 @@ + + + <_name>embroidery ZIP file output + org.inkstitch.output.zip + inkstitch.py + inkex.py + + .zip + application/zip + <_filetypename>Ink/Stitch: ZIP export multiple formats (.zip) + <_filetypetooltip>Create a ZIP with multiple embroidery file formats using Ink/Stitch + true + +{% for format, description in formats %} + false +{% endfor %} + zip + + -- cgit v1.3.1 From 1bf3689762cbe16952c3a2342dc3e2271458c64b Mon Sep 17 00:00:00 2001 From: AkiraNorthstar Date: Mon, 9 Jul 2018 11:36:43 +0200 Subject: Update build-dist fix build-dist in this branch to make it easier to merge. --- bin/build-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/build-dist b/bin/build-dist index 4d73313a..78e42430 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -29,7 +29,7 @@ else fi # This lets pyinstaller see inkex.py, etc. -pyinstaller_args+="-p inkscape-0.92.2/share/extensions " +pyinstaller_args+="-p inkscape-0.92.3/share/extensions " # output useful debugging info that helps us trace library dependency issues pyinstaller_args+="--log-level DEBUG " -- cgit v1.3.1 From a93e774cd98e9a8ae44e55f09282d0fdc3b77420 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 13 Jul 2018 20:03:26 -0400 Subject: remove libembroidery from build --- .travis.yml | 18 +++--------------- bin/build-dist | 10 ++-------- 2 files changed, 5 insertions(+), 23 deletions(-) (limited to 'bin') diff --git a/.travis.yml b/.travis.yml index 0bc49e06..4bc0355f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,23 +48,20 @@ install: # for wxPython sudo apt-get install glib-networking - # for embroidermodder/libembroidery - sudo apt-get install swig python-dev - # This is the same as the pypi module PyGObject. We can't just do # "pip install PyGObject" because it depends on a version of # libgirepository1.0-dev that doesn't exist in Trusty. sudo apt-get install python-gi python-gi-cairo libgirepository1.0-dev - + # wxPython doen't publish linux wheels in pypi wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04/wxPython-4.0.3-cp27-cp27mu-linux_x86_64.whl pip install wxPython-4.0.3-cp27-cp27mu-linux_x86_64.whl - + # We can't use the shapely wheel because it includes the geos # library but with a weird file name. Details: # https://github.com/pyinstaller/pyinstaller/blob/61b1c75c2b0469b32d114298a63bf60b8d597e37/PyInstaller/hooks/hook-shapely.py#L34 pip install --no-binary shapely -r requirements.txt - + pip install pyinstaller elif [ "$BUILD" = "windows" ]; then set -x @@ -78,10 +75,6 @@ install: export WINEDEBUG=-all - wget -q https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.1.0/windows-libembroidery.tar.gz - tar zxf windows-libembroidery.tar.gz - rm windows-libembroidery.tar.gz - wget -q http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe wine vcredist_x86.exe /q @@ -109,11 +102,6 @@ script: flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude=embroidermodder flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=embroidermodder elif [ "$BUILD" = "linux" ]; then - ( - cd embroidermodder/experimental - qmake swigpython.pro - make - ) make dist elif [ "$BUILD" = "windows" ]; then # work around some bug... pyinstaller? shapely? not sure. diff --git a/bin/build-dist b/bin/build-dist index 78e42430..0d435580 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -19,14 +19,8 @@ fi # above! pyinstaller_args+="--hidden-import gi.repository.Gtk " -# mac and windows build seem to miss wx and libembroidery import -pyinstaller_args+="--hidden-import wx --hidden-import libembroidery " - -if [ -d windows-libembroidery ]; then - pyinstaller_args+="-p windows-libembroidery " -else - pyinstaller_args+="-p embroidermodder/experimental/python/binding " -fi +# mac and windows build seem to miss wx import +pyinstaller_args+="--hidden-import wx" # This lets pyinstaller see inkex.py, etc. pyinstaller_args+="-p inkscape-0.92.3/share/extensions " -- cgit v1.3.1 From f85ee33af6fdb11bdd85af4e0832b9f2ef40b315 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 16 Jul 2018 19:49:32 -0400 Subject: update Embroider extension for pyembroidery --- bin/gen-output-format-option-list | 21 ++++++++------------- inx/inkstitch_embroider.inx | 31 ++++++++----------------------- 2 files changed, 16 insertions(+), 36 deletions(-) (limited to 'bin') diff --git a/bin/gen-output-format-option-list b/bin/gen-output-format-option-list index 674813bb..28a83976 100755 --- a/bin/gen-output-format-option-list +++ b/bin/gen-output-format-option-list @@ -1,19 +1,14 @@ #!/usr/bin/env python import sys +import pyembroidery -sys.path.append('embroidermodder/experimental/python/binding') -from libembroidery import * +formats = [format for format in pyembroidery.supported_formats() if 'writer' in format] +formats.sort(key=lambda format: (format['category'] != 'embroidery', format['extension'])) -formatList = embFormatList_create() -curFormat = formatList -while(curFormat): - extension = embFormat_extension(curFormat) - description = embFormat_description(curFormat) - writerState = embFormat_writerState(curFormat) - - if writerState.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY: - print '<_option value="%s">%s(%s)' % (extension[1:], description, extension.upper()) - - curFormat = curFormat.next +for format in formats: + tag = "" + if format['category'] != 'embroidery': + tag = " [DEBUG]" + print '<_option value="%s">%s(%s)%s' % (format['extension'], format['description'], format['extension'].upper(), tag) diff --git a/inx/inkstitch_embroider.inx b/inx/inkstitch_embroider.inx index 1f5619a3..2c988a51 100644 --- a/inx/inkstitch_embroider.inx +++ b/inx/inkstitch_embroider.inx @@ -7,29 +7,14 @@ _gui-description="Jump stitches smaller than this will be treated as normal stitches.">3.0 true - <_option value="csv">Comma Separated Values Format(.CSV) - <_option value="col">Embroidery Thread Color Format(.COL) - <_option value="dst">Tajima Embroidery Format(.DST) - <_option value="edr">Embird Embroidery Format(.EDR) - <_option value="exp">Melco Embroidery Format(.EXP) - <_option value="hus">Husqvarna Viking Embroidery Format(.HUS) - <_option value="inf">Embroidery Color Format(.INF) - <_option value="jef">Janome Embroidery Format(.JEF) - <_option value="ksm">Pfaff Embroidery Format(.KSM) - <_option value="max">Pfaff Embroidery Format(.MAX) - <_option value="pcd">Pfaff Embroidery Format(.PCD) - <_option value="pcq">Pfaff Embroidery Format(.PCQ) - <_option value="pcs">Pfaff Embroidery Format(.PCS) - <_option value="pec">Brother Embroidery Format(.PEC) - <_option value="pes">Brother Embroidery Format(.PES) - <_option value="plt">AutoCAD Plot Drawing Format(.PLT) - <_option value="rgb">RGB Embroidery Format(.RGB) - <_option value="sew">Janome Embroidery Format(.SEW) - <_option value="tap">Happy Embroidery Format(.TAP) - <_option value="thr">ThredWorks Embroidery Format(.THR) - <_option value="txt">Text File(.TXT) - <_option value="vp3">Pfaff Embroidery Format(.VP3) - <_option value="xxx">Singer Embroidery Format(.XXX) + <_option value="dst">Tajima Embroidery Format(DST) + <_option value="exp">Melco Embroidery Format(EXP) + <_option value="jef">Janome Embroidery Format(JEF) + <_option value="pec">Brother Embroidery Format(PEC) + <_option value="pes">Brother Embroidery Format(PES) + <_option value="vp3">Pfaff Embroidery Format(VP3) + <_option value="csv">Comma-separated values(CSV) [DEBUG] + <_option value="svg">Scalable Vector Graphics(SVG) [DEBUG] embroider -- cgit v1.3.1 From 17a9f23bfb8b3a150092bc499cdaf533e3390719 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 17 Jul 2018 20:14:23 -0400 Subject: update input extension generator and INXes --- bin/gen-input-inx | 23 +++++++---------------- inx/inkstitch_input_COL.inx | 17 ----------------- inx/inkstitch_input_CSD.inx | 17 ----------------- inx/inkstitch_input_CSV.inx | 17 ----------------- inx/inkstitch_input_DAT.inx | 17 ----------------- inx/inkstitch_input_DSB.inx | 2 +- inx/inkstitch_input_EDR.inx | 17 ----------------- inx/inkstitch_input_EXY.inx | 17 ----------------- inx/inkstitch_input_FXY.inx | 17 ----------------- inx/inkstitch_input_GT.inx | 17 ----------------- inx/inkstitch_input_HUS.inx | 17 ----------------- inx/inkstitch_input_INF.inx | 17 ----------------- inx/inkstitch_input_MAX.inx | 17 ----------------- inx/inkstitch_input_MIT.inx | 17 ----------------- inx/inkstitch_input_NEW.inx | 17 ----------------- inx/inkstitch_input_OFM.inx | 17 ----------------- inx/inkstitch_input_PCD.inx | 17 ----------------- inx/inkstitch_input_PCM.inx | 17 ----------------- inx/inkstitch_input_PCQ.inx | 17 ----------------- inx/inkstitch_input_PCS.inx | 17 ----------------- inx/inkstitch_input_PHB.inx | 17 ----------------- inx/inkstitch_input_PHC.inx | 17 ----------------- inx/inkstitch_input_PLT.inx | 17 ----------------- inx/inkstitch_input_RGB.inx | 17 ----------------- inx/inkstitch_input_SST.inx | 17 ----------------- inx/inkstitch_input_T09.inx | 17 ----------------- inx/inkstitch_input_TBF.inx | 17 +++++++++++++++++ inx/inkstitch_input_THR.inx | 17 ----------------- inx/inkstitch_input_U00.inx | 17 ----------------- inx/inkstitch_input_U01.inx | 17 +++++++++++++++++ inx/inkstitch_input_VIP.inx | 17 ----------------- inx/inkstitch_input_ZSK.inx | 17 ----------------- 32 files changed, 42 insertions(+), 493 deletions(-) delete mode 100644 inx/inkstitch_input_COL.inx delete mode 100644 inx/inkstitch_input_CSD.inx delete mode 100644 inx/inkstitch_input_CSV.inx delete mode 100644 inx/inkstitch_input_DAT.inx delete mode 100644 inx/inkstitch_input_EDR.inx delete mode 100644 inx/inkstitch_input_EXY.inx delete mode 100644 inx/inkstitch_input_FXY.inx delete mode 100644 inx/inkstitch_input_GT.inx delete mode 100644 inx/inkstitch_input_HUS.inx delete mode 100644 inx/inkstitch_input_INF.inx delete mode 100644 inx/inkstitch_input_MAX.inx delete mode 100644 inx/inkstitch_input_MIT.inx delete mode 100644 inx/inkstitch_input_NEW.inx delete mode 100644 inx/inkstitch_input_OFM.inx delete mode 100644 inx/inkstitch_input_PCD.inx delete mode 100644 inx/inkstitch_input_PCM.inx delete mode 100644 inx/inkstitch_input_PCQ.inx delete mode 100644 inx/inkstitch_input_PCS.inx delete mode 100644 inx/inkstitch_input_PHB.inx delete mode 100644 inx/inkstitch_input_PHC.inx delete mode 100644 inx/inkstitch_input_PLT.inx delete mode 100644 inx/inkstitch_input_RGB.inx delete mode 100644 inx/inkstitch_input_SST.inx delete mode 100644 inx/inkstitch_input_T09.inx create mode 100644 inx/inkstitch_input_TBF.inx delete mode 100644 inx/inkstitch_input_THR.inx delete mode 100644 inx/inkstitch_input_U00.inx create mode 100644 inx/inkstitch_input_U01.inx delete mode 100644 inx/inkstitch_input_VIP.inx delete mode 100644 inx/inkstitch_input_ZSK.inx (limited to 'bin') diff --git a/bin/gen-input-inx b/bin/gen-input-inx index 6351d062..ae32b43f 100755 --- a/bin/gen-input-inx +++ b/bin/gen-input-inx @@ -2,7 +2,7 @@ import sys, os from os.path import dirname -from libembroidery import * +import pyembroidery from jinja2 import Environment, FileSystemLoader, select_autoescape @@ -15,30 +15,21 @@ def build_environment(): ) -def libembroidery_input_formats(): - formatList = embFormatList_create() - curFormat = formatList - while(curFormat): - extension = embFormat_extension(curFormat) - description = embFormat_description(curFormat) - reader_state = embFormat_readerState(curFormat) - - if reader_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY: - # extension includes the dot, so we'll remove it - yield extension[1:], description - - curFormat = curFormat.next +def pyembroidery_input_formats(): + for format in pyembroidery.supported_formats(): + if 'reader' in format and format['category'] == 'embroidery': + yield format['extension'], format['description'] def main(): env = build_environment() template = env.get_template('embroider_input.inx') - for format, description in libembroidery_input_formats(): + for format, description in pyembroidery_input_formats(): inx = template.render(format=format, description=description) with open("inx/inkstitch_input_%s.inx" % format.upper(), 'w') as inx_file: - inx_file.write(inx) + print >> inx_file, inx if __name__ == "__main__": diff --git a/inx/inkstitch_input_COL.inx b/inx/inkstitch_input_COL.inx deleted file mode 100644 index 38ebe7bd..00000000 --- a/inx/inkstitch_input_COL.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>COL file input - org.inkstitch.input.col - inkstitch.py - inkex.py - - .col - application/x-embroidery-col - <_filetypename>Ink/Stitch: Embroidery Thread Color Format (.col) - <_filetypetooltip>convert COL file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_CSD.inx b/inx/inkstitch_input_CSD.inx deleted file mode 100644 index 444270f0..00000000 --- a/inx/inkstitch_input_CSD.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>CSD file input - org.inkstitch.input.csd - inkstitch.py - inkex.py - - .csd - application/x-embroidery-csd - <_filetypename>Ink/Stitch: Singer Embroidery Format (.csd) - <_filetypetooltip>convert CSD file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_CSV.inx b/inx/inkstitch_input_CSV.inx deleted file mode 100644 index 0c3e2096..00000000 --- a/inx/inkstitch_input_CSV.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>CSV file input - org.inkstitch.input.csv - inkstitch.py - inkex.py - - .csv - application/x-embroidery-csv - <_filetypename>Ink/Stitch: Comma Separated Values Format (.csv) - <_filetypetooltip>convert CSV file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_DAT.inx b/inx/inkstitch_input_DAT.inx deleted file mode 100644 index e82694b8..00000000 --- a/inx/inkstitch_input_DAT.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>DAT file input - org.inkstitch.input.dat - inkstitch.py - inkex.py - - .dat - application/x-embroidery-dat - <_filetypename>Ink/Stitch: Barudan Embroidery Format (.dat) - <_filetypetooltip>convert DAT file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_DSB.inx b/inx/inkstitch_input_DSB.inx index 8b7c6b02..c78e1c2d 100644 --- a/inx/inkstitch_input_DSB.inx +++ b/inx/inkstitch_input_DSB.inx @@ -7,7 +7,7 @@ .dsb application/x-embroidery-dsb - <_filetypename>Ink/Stitch: Barudan Embroidery Format (.dsb) + <_filetypename>Ink/Stitch: Tajima(Barudan) Embroidery Format (.dsb) <_filetypetooltip>convert DSB file to Ink/Stitch manual-stitch paths input diff --git a/inx/inkstitch_input_EDR.inx b/inx/inkstitch_input_EDR.inx deleted file mode 100644 index 92cf7d14..00000000 --- a/inx/inkstitch_input_EDR.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>EDR file input - org.inkstitch.input.edr - inkstitch.py - inkex.py - - .edr - application/x-embroidery-edr - <_filetypename>Ink/Stitch: Embird Embroidery Format (.edr) - <_filetypetooltip>convert EDR file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_EXY.inx b/inx/inkstitch_input_EXY.inx deleted file mode 100644 index 78de68d8..00000000 --- a/inx/inkstitch_input_EXY.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>EXY file input - org.inkstitch.input.exy - inkstitch.py - inkex.py - - .exy - application/x-embroidery-exy - <_filetypename>Ink/Stitch: Eltac Embroidery Format (.exy) - <_filetypetooltip>convert EXY file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_FXY.inx b/inx/inkstitch_input_FXY.inx deleted file mode 100644 index c2be8c60..00000000 --- a/inx/inkstitch_input_FXY.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>FXY file input - org.inkstitch.input.fxy - inkstitch.py - inkex.py - - .fxy - application/x-embroidery-fxy - <_filetypename>Ink/Stitch: Fortron Embroidery Format (.fxy) - <_filetypetooltip>convert FXY file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_GT.inx b/inx/inkstitch_input_GT.inx deleted file mode 100644 index 20a9fda0..00000000 --- a/inx/inkstitch_input_GT.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>GT file input - org.inkstitch.input.gt - inkstitch.py - inkex.py - - .gt - application/x-embroidery-gt - <_filetypename>Ink/Stitch: Gold Thread Embroidery Format (.gt) - <_filetypetooltip>convert GT file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_HUS.inx b/inx/inkstitch_input_HUS.inx deleted file mode 100644 index bbac96a2..00000000 --- a/inx/inkstitch_input_HUS.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>HUS file input - org.inkstitch.input.hus - inkstitch.py - inkex.py - - .hus - application/x-embroidery-hus - <_filetypename>Ink/Stitch: Husqvarna Viking Embroidery Format (.hus) - <_filetypetooltip>convert HUS file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_INF.inx b/inx/inkstitch_input_INF.inx deleted file mode 100644 index 9c07ed7f..00000000 --- a/inx/inkstitch_input_INF.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>INF file input - org.inkstitch.input.inf - inkstitch.py - inkex.py - - .inf - application/x-embroidery-inf - <_filetypename>Ink/Stitch: Embroidery Color Format (.inf) - <_filetypetooltip>convert INF file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_MAX.inx b/inx/inkstitch_input_MAX.inx deleted file mode 100644 index 0f5ed952..00000000 --- a/inx/inkstitch_input_MAX.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>MAX file input - org.inkstitch.input.max - inkstitch.py - inkex.py - - .max - application/x-embroidery-max - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.max) - <_filetypetooltip>convert MAX file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_MIT.inx b/inx/inkstitch_input_MIT.inx deleted file mode 100644 index a0181182..00000000 --- a/inx/inkstitch_input_MIT.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>MIT file input - org.inkstitch.input.mit - inkstitch.py - inkex.py - - .mit - application/x-embroidery-mit - <_filetypename>Ink/Stitch: Mitsubishi Embroidery Format (.mit) - <_filetypetooltip>convert MIT file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_NEW.inx b/inx/inkstitch_input_NEW.inx deleted file mode 100644 index 15d877d8..00000000 --- a/inx/inkstitch_input_NEW.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>NEW file input - org.inkstitch.input.new - inkstitch.py - inkex.py - - .new - application/x-embroidery-new - <_filetypename>Ink/Stitch: Ameco Embroidery Format (.new) - <_filetypetooltip>convert NEW file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_OFM.inx b/inx/inkstitch_input_OFM.inx deleted file mode 100644 index 3e162355..00000000 --- a/inx/inkstitch_input_OFM.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>OFM file input - org.inkstitch.input.ofm - inkstitch.py - inkex.py - - .ofm - application/x-embroidery-ofm - <_filetypename>Ink/Stitch: Melco Embroidery Format (.ofm) - <_filetypetooltip>convert OFM file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_PCD.inx b/inx/inkstitch_input_PCD.inx deleted file mode 100644 index eff3c2f7..00000000 --- a/inx/inkstitch_input_PCD.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>PCD file input - org.inkstitch.input.pcd - inkstitch.py - inkex.py - - .pcd - application/x-embroidery-pcd - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcd) - <_filetypetooltip>convert PCD file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_PCM.inx b/inx/inkstitch_input_PCM.inx deleted file mode 100644 index 684b7e20..00000000 --- a/inx/inkstitch_input_PCM.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>PCM file input - org.inkstitch.input.pcm - inkstitch.py - inkex.py - - .pcm - application/x-embroidery-pcm - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcm) - <_filetypetooltip>convert PCM file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_PCQ.inx b/inx/inkstitch_input_PCQ.inx deleted file mode 100644 index 44d2d6df..00000000 --- a/inx/inkstitch_input_PCQ.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>PCQ file input - org.inkstitch.input.pcq - inkstitch.py - inkex.py - - .pcq - application/x-embroidery-pcq - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcq) - <_filetypetooltip>convert PCQ file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_PCS.inx b/inx/inkstitch_input_PCS.inx deleted file mode 100644 index 1a030e53..00000000 --- a/inx/inkstitch_input_PCS.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>PCS file input - org.inkstitch.input.pcs - inkstitch.py - inkex.py - - .pcs - application/x-embroidery-pcs - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcs) - <_filetypetooltip>convert PCS file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_PHB.inx b/inx/inkstitch_input_PHB.inx deleted file mode 100644 index 0e14f097..00000000 --- a/inx/inkstitch_input_PHB.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>PHB file input - org.inkstitch.input.phb - inkstitch.py - inkex.py - - .phb - application/x-embroidery-phb - <_filetypename>Ink/Stitch: Brother Embroidery Format (.phb) - <_filetypetooltip>convert PHB file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_PHC.inx b/inx/inkstitch_input_PHC.inx deleted file mode 100644 index 3c2d10f5..00000000 --- a/inx/inkstitch_input_PHC.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>PHC file input - org.inkstitch.input.phc - inkstitch.py - inkex.py - - .phc - application/x-embroidery-phc - <_filetypename>Ink/Stitch: Brother Embroidery Format (.phc) - <_filetypetooltip>convert PHC file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_PLT.inx b/inx/inkstitch_input_PLT.inx deleted file mode 100644 index d811ff02..00000000 --- a/inx/inkstitch_input_PLT.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>PLT file input - org.inkstitch.input.plt - inkstitch.py - inkex.py - - .plt - application/x-embroidery-plt - <_filetypename>Ink/Stitch: AutoCAD Plot Drawing Format (.plt) - <_filetypetooltip>convert PLT file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_RGB.inx b/inx/inkstitch_input_RGB.inx deleted file mode 100644 index b64e285b..00000000 --- a/inx/inkstitch_input_RGB.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>RGB file input - org.inkstitch.input.rgb - inkstitch.py - inkex.py - - .rgb - application/x-embroidery-rgb - <_filetypename>Ink/Stitch: RGB Embroidery Format (.rgb) - <_filetypetooltip>convert RGB file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_SST.inx b/inx/inkstitch_input_SST.inx deleted file mode 100644 index 85533659..00000000 --- a/inx/inkstitch_input_SST.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>SST file input - org.inkstitch.input.sst - inkstitch.py - inkex.py - - .sst - application/x-embroidery-sst - <_filetypename>Ink/Stitch: Sunstar Embroidery Format (.sst) - <_filetypetooltip>convert SST file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_T09.inx b/inx/inkstitch_input_T09.inx deleted file mode 100644 index eb6ab6d9..00000000 --- a/inx/inkstitch_input_T09.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>T09 file input - org.inkstitch.input.t09 - inkstitch.py - inkex.py - - .t09 - application/x-embroidery-t09 - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.t09) - <_filetypetooltip>convert T09 file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_TBF.inx b/inx/inkstitch_input_TBF.inx new file mode 100644 index 00000000..e2b72ec9 --- /dev/null +++ b/inx/inkstitch_input_TBF.inx @@ -0,0 +1,17 @@ + + + <_name>TBF file input + org.inkstitch.input.tbf + inkstitch.py + inkex.py + + .tbf + application/x-embroidery-tbf + <_filetypename>Ink/Stitch: Tajima Embroidery Format (.tbf) + <_filetypetooltip>convert TBF file to Ink/Stitch manual-stitch paths + + input + + diff --git a/inx/inkstitch_input_THR.inx b/inx/inkstitch_input_THR.inx deleted file mode 100644 index e6a6e09e..00000000 --- a/inx/inkstitch_input_THR.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>THR file input - org.inkstitch.input.thr - inkstitch.py - inkex.py - - .thr - application/x-embroidery-thr - <_filetypename>Ink/Stitch: ThredWorks Embroidery Format (.thr) - <_filetypetooltip>convert THR file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_U00.inx b/inx/inkstitch_input_U00.inx deleted file mode 100644 index b28da66d..00000000 --- a/inx/inkstitch_input_U00.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>U00 file input - org.inkstitch.input.u00 - inkstitch.py - inkex.py - - .u00 - application/x-embroidery-u00 - <_filetypename>Ink/Stitch: Barudan Embroidery Format (.u00) - <_filetypetooltip>convert U00 file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_U01.inx b/inx/inkstitch_input_U01.inx new file mode 100644 index 00000000..befadd5b --- /dev/null +++ b/inx/inkstitch_input_U01.inx @@ -0,0 +1,17 @@ + + + <_name>U01 file input + org.inkstitch.input.u01 + inkstitch.py + inkex.py + + .u01 + application/x-embroidery-u01 + <_filetypename>Ink/Stitch: Barudan Embroidery Format (.u01) + <_filetypetooltip>convert U01 file to Ink/Stitch manual-stitch paths + + input + + diff --git a/inx/inkstitch_input_VIP.inx b/inx/inkstitch_input_VIP.inx deleted file mode 100644 index 3723285c..00000000 --- a/inx/inkstitch_input_VIP.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>VIP file input - org.inkstitch.input.vip - inkstitch.py - inkex.py - - .vip - application/x-embroidery-vip - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.vip) - <_filetypetooltip>convert VIP file to Ink/Stitch manual-stitch paths - - input - - diff --git a/inx/inkstitch_input_ZSK.inx b/inx/inkstitch_input_ZSK.inx deleted file mode 100644 index 4178126f..00000000 --- a/inx/inkstitch_input_ZSK.inx +++ /dev/null @@ -1,17 +0,0 @@ - - - <_name>ZSK file input - org.inkstitch.input.zsk - inkstitch.py - inkex.py - - .zsk - application/x-embroidery-zsk - <_filetypename>Ink/Stitch: ZSK USA Embroidery Format (.zsk) - <_filetypetooltip>convert ZSK file to Ink/Stitch manual-stitch paths - - input - - -- cgit v1.3.1 From c061b3a66aaf1f404440e3aa511b8655dd5b1592 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 17 Jul 2018 20:17:48 -0400 Subject: update output extension generator and INXes --- bin/gen-output-inx | 23 +++++++---------------- inx/inkstitch_output_COL.inx | 19 ------------------- inx/inkstitch_output_CSV.inx | 19 ------------------- inx/inkstitch_output_DST.inx | 2 +- inx/inkstitch_output_EDR.inx | 19 ------------------- inx/inkstitch_output_EXP.inx | 2 +- inx/inkstitch_output_HUS.inx | 19 ------------------- inx/inkstitch_output_INF.inx | 19 ------------------- inx/inkstitch_output_JEF.inx | 2 +- inx/inkstitch_output_KSM.inx | 19 ------------------- inx/inkstitch_output_MAX.inx | 19 ------------------- inx/inkstitch_output_PCD.inx | 19 ------------------- inx/inkstitch_output_PCQ.inx | 19 ------------------- inx/inkstitch_output_PCS.inx | 19 ------------------- inx/inkstitch_output_PEC.inx | 2 +- inx/inkstitch_output_PES.inx | 2 +- inx/inkstitch_output_PLT.inx | 19 ------------------- inx/inkstitch_output_RGB.inx | 19 ------------------- inx/inkstitch_output_THR.inx | 19 ------------------- inx/inkstitch_output_TXT.inx | 19 ------------------- inx/inkstitch_output_VP3.inx | 2 +- inx/inkstitch_output_XXX.inx | 19 ------------------- 22 files changed, 13 insertions(+), 307 deletions(-) delete mode 100644 inx/inkstitch_output_COL.inx delete mode 100644 inx/inkstitch_output_CSV.inx delete mode 100644 inx/inkstitch_output_EDR.inx delete mode 100644 inx/inkstitch_output_HUS.inx delete mode 100644 inx/inkstitch_output_INF.inx delete mode 100644 inx/inkstitch_output_KSM.inx delete mode 100644 inx/inkstitch_output_MAX.inx delete mode 100644 inx/inkstitch_output_PCD.inx delete mode 100644 inx/inkstitch_output_PCQ.inx delete mode 100644 inx/inkstitch_output_PCS.inx delete mode 100644 inx/inkstitch_output_PLT.inx delete mode 100644 inx/inkstitch_output_RGB.inx delete mode 100644 inx/inkstitch_output_THR.inx delete mode 100644 inx/inkstitch_output_TXT.inx delete mode 100644 inx/inkstitch_output_XXX.inx (limited to 'bin') diff --git a/bin/gen-output-inx b/bin/gen-output-inx index f167dbee..fbe2ad55 100755 --- a/bin/gen-output-inx +++ b/bin/gen-output-inx @@ -2,7 +2,7 @@ import sys, os from os.path import dirname -from libembroidery import * +import pyembroidery from jinja2 import Environment, FileSystemLoader, select_autoescape @@ -15,30 +15,21 @@ def build_environment(): ) -def libembroidery_output_formats(): - formatList = embFormatList_create() - curFormat = formatList - while(curFormat): - extension = embFormat_extension(curFormat) - description = embFormat_description(curFormat) - writer_state = embFormat_writerState(curFormat) - - if writer_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY: - # extension includes the dot, so we'll remove it - yield extension[1:], description - - curFormat = curFormat.next +def pyembroidery_output_formats(): + for format in pyembroidery.supported_formats(): + if 'writer' in format and format['category'] == 'embroidery': + yield format['extension'], format['description'] def main(): env = build_environment() template = env.get_template('embroider_output.inx') - for format, description in libembroidery_output_formats(): + for format, description in pyembroidery_output_formats(): inx = template.render(format=format, description=description) with open("inx/inkstitch_output_%s.inx" % format.upper(), 'w') as inx_file: - inx_file.write(inx) + print >> inx_file, inx if __name__ == "__main__": diff --git a/inx/inkstitch_output_COL.inx b/inx/inkstitch_output_COL.inx deleted file mode 100644 index 8a240a38..00000000 --- a/inx/inkstitch_output_COL.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>COL file output - org.inkstitch.output.col - inkstitch.py - inkex.py - - .col - application/x-embroidery-col - <_filetypename>Ink/Stitch: Embroidery Thread Color Format (.col) - <_filetypetooltip>Save design in COL format using Ink/Stitch - true - - output - col - - \ No newline at end of file diff --git a/inx/inkstitch_output_CSV.inx b/inx/inkstitch_output_CSV.inx deleted file mode 100644 index d2f340cd..00000000 --- a/inx/inkstitch_output_CSV.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>CSV file output - org.inkstitch.output.csv - inkstitch.py - inkex.py - - .csv - application/x-embroidery-csv - <_filetypename>Ink/Stitch: Comma Separated Values Format (.csv) - <_filetypetooltip>Save design in CSV format using Ink/Stitch - true - - output - csv - - \ No newline at end of file diff --git a/inx/inkstitch_output_DST.inx b/inx/inkstitch_output_DST.inx index 2230600a..fa034f40 100644 --- a/inx/inkstitch_output_DST.inx +++ b/inx/inkstitch_output_DST.inx @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/inx/inkstitch_output_EDR.inx b/inx/inkstitch_output_EDR.inx deleted file mode 100644 index 0756b37a..00000000 --- a/inx/inkstitch_output_EDR.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>EDR file output - org.inkstitch.output.edr - inkstitch.py - inkex.py - - .edr - application/x-embroidery-edr - <_filetypename>Ink/Stitch: Embird Embroidery Format (.edr) - <_filetypetooltip>Save design in EDR format using Ink/Stitch - true - - output - edr - - \ No newline at end of file diff --git a/inx/inkstitch_output_EXP.inx b/inx/inkstitch_output_EXP.inx index ce98dbc0..853bab9f 100644 --- a/inx/inkstitch_output_EXP.inx +++ b/inx/inkstitch_output_EXP.inx @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/inx/inkstitch_output_HUS.inx b/inx/inkstitch_output_HUS.inx deleted file mode 100644 index 44536f2a..00000000 --- a/inx/inkstitch_output_HUS.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>HUS file output - org.inkstitch.output.hus - inkstitch.py - inkex.py - - .hus - application/x-embroidery-hus - <_filetypename>Ink/Stitch: Husqvarna Viking Embroidery Format (.hus) - <_filetypetooltip>Save design in HUS format using Ink/Stitch - true - - output - hus - - \ No newline at end of file diff --git a/inx/inkstitch_output_INF.inx b/inx/inkstitch_output_INF.inx deleted file mode 100644 index 47c2b63e..00000000 --- a/inx/inkstitch_output_INF.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>INF file output - org.inkstitch.output.inf - inkstitch.py - inkex.py - - .inf - application/x-embroidery-inf - <_filetypename>Ink/Stitch: Embroidery Color Format (.inf) - <_filetypetooltip>Save design in INF format using Ink/Stitch - true - - output - inf - - \ No newline at end of file diff --git a/inx/inkstitch_output_JEF.inx b/inx/inkstitch_output_JEF.inx index af92a836..74b752fc 100644 --- a/inx/inkstitch_output_JEF.inx +++ b/inx/inkstitch_output_JEF.inx @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/inx/inkstitch_output_KSM.inx b/inx/inkstitch_output_KSM.inx deleted file mode 100644 index ad5ae4dd..00000000 --- a/inx/inkstitch_output_KSM.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>KSM file output - org.inkstitch.output.ksm - inkstitch.py - inkex.py - - .ksm - application/x-embroidery-ksm - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.ksm) - <_filetypetooltip>Save design in KSM format using Ink/Stitch - true - - output - ksm - - \ No newline at end of file diff --git a/inx/inkstitch_output_MAX.inx b/inx/inkstitch_output_MAX.inx deleted file mode 100644 index 45a5ba01..00000000 --- a/inx/inkstitch_output_MAX.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>MAX file output - org.inkstitch.output.max - inkstitch.py - inkex.py - - .max - application/x-embroidery-max - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.max) - <_filetypetooltip>Save design in MAX format using Ink/Stitch - true - - output - max - - \ No newline at end of file diff --git a/inx/inkstitch_output_PCD.inx b/inx/inkstitch_output_PCD.inx deleted file mode 100644 index b42f79de..00000000 --- a/inx/inkstitch_output_PCD.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>PCD file output - org.inkstitch.output.pcd - inkstitch.py - inkex.py - - .pcd - application/x-embroidery-pcd - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcd) - <_filetypetooltip>Save design in PCD format using Ink/Stitch - true - - output - pcd - - \ No newline at end of file diff --git a/inx/inkstitch_output_PCQ.inx b/inx/inkstitch_output_PCQ.inx deleted file mode 100644 index 1764f670..00000000 --- a/inx/inkstitch_output_PCQ.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>PCQ file output - org.inkstitch.output.pcq - inkstitch.py - inkex.py - - .pcq - application/x-embroidery-pcq - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcq) - <_filetypetooltip>Save design in PCQ format using Ink/Stitch - true - - output - pcq - - \ No newline at end of file diff --git a/inx/inkstitch_output_PCS.inx b/inx/inkstitch_output_PCS.inx deleted file mode 100644 index ef07c4bd..00000000 --- a/inx/inkstitch_output_PCS.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>PCS file output - org.inkstitch.output.pcs - inkstitch.py - inkex.py - - .pcs - application/x-embroidery-pcs - <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcs) - <_filetypetooltip>Save design in PCS format using Ink/Stitch - true - - output - pcs - - \ No newline at end of file diff --git a/inx/inkstitch_output_PEC.inx b/inx/inkstitch_output_PEC.inx index 15880ce6..6d76b165 100644 --- a/inx/inkstitch_output_PEC.inx +++ b/inx/inkstitch_output_PEC.inx @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/inx/inkstitch_output_PES.inx b/inx/inkstitch_output_PES.inx index cd7e7369..b821225a 100644 --- a/inx/inkstitch_output_PES.inx +++ b/inx/inkstitch_output_PES.inx @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/inx/inkstitch_output_PLT.inx b/inx/inkstitch_output_PLT.inx deleted file mode 100644 index 649ef76b..00000000 --- a/inx/inkstitch_output_PLT.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>PLT file output - org.inkstitch.output.plt - inkstitch.py - inkex.py - - .plt - application/x-embroidery-plt - <_filetypename>Ink/Stitch: AutoCAD Plot Drawing Format (.plt) - <_filetypetooltip>Save design in PLT format using Ink/Stitch - true - - output - plt - - \ No newline at end of file diff --git a/inx/inkstitch_output_RGB.inx b/inx/inkstitch_output_RGB.inx deleted file mode 100644 index e60d729e..00000000 --- a/inx/inkstitch_output_RGB.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>RGB file output - org.inkstitch.output.rgb - inkstitch.py - inkex.py - - .rgb - application/x-embroidery-rgb - <_filetypename>Ink/Stitch: RGB Embroidery Format (.rgb) - <_filetypetooltip>Save design in RGB format using Ink/Stitch - true - - output - rgb - - \ No newline at end of file diff --git a/inx/inkstitch_output_THR.inx b/inx/inkstitch_output_THR.inx deleted file mode 100644 index c460bdfc..00000000 --- a/inx/inkstitch_output_THR.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>THR file output - org.inkstitch.output.thr - inkstitch.py - inkex.py - - .thr - application/x-embroidery-thr - <_filetypename>Ink/Stitch: ThredWorks Embroidery Format (.thr) - <_filetypetooltip>Save design in THR format using Ink/Stitch - true - - output - thr - - \ No newline at end of file diff --git a/inx/inkstitch_output_TXT.inx b/inx/inkstitch_output_TXT.inx deleted file mode 100644 index 805deffe..00000000 --- a/inx/inkstitch_output_TXT.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>TXT file output - org.inkstitch.output.txt - inkstitch.py - inkex.py - - .txt - application/x-embroidery-txt - <_filetypename>Ink/Stitch: Text File (.txt) - <_filetypetooltip>Save design in TXT format using Ink/Stitch - true - - output - txt - - \ No newline at end of file diff --git a/inx/inkstitch_output_VP3.inx b/inx/inkstitch_output_VP3.inx index dff29de4..11843420 100644 --- a/inx/inkstitch_output_VP3.inx +++ b/inx/inkstitch_output_VP3.inx @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/inx/inkstitch_output_XXX.inx b/inx/inkstitch_output_XXX.inx deleted file mode 100644 index ad4135b0..00000000 --- a/inx/inkstitch_output_XXX.inx +++ /dev/null @@ -1,19 +0,0 @@ - - - <_name>XXX file output - org.inkstitch.output.xxx - inkstitch.py - inkex.py - - .xxx - application/x-embroidery-xxx - <_filetypename>Ink/Stitch: Singer Embroidery Format (.xxx) - <_filetypetooltip>Save design in XXX format using Ink/Stitch - true - - output - xxx - - \ No newline at end of file -- cgit v1.3.1 From d189f88050df2db19226f50c80b0304c7bd1bd28 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 17 Jul 2018 20:19:17 -0400 Subject: update zip output generator and INX --- bin/gen-zip-inx | 21 ++++++--------------- inx/inkstitch_output_ZIP.inx | 38 ++++---------------------------------- 2 files changed, 10 insertions(+), 49 deletions(-) (limited to 'bin') diff --git a/bin/gen-zip-inx b/bin/gen-zip-inx index 5fbc8f1e..40948786 100755 --- a/bin/gen-zip-inx +++ b/bin/gen-zip-inx @@ -2,7 +2,7 @@ import sys, os from os.path import dirname -from libembroidery import * +import pyembroidery from jinja2 import Environment, FileSystemLoader, select_autoescape @@ -15,26 +15,17 @@ def build_environment(): ) -def libembroidery_output_formats(): - formatList = embFormatList_create() - curFormat = formatList - while(curFormat): - extension = embFormat_extension(curFormat) - description = embFormat_description(curFormat) - writer_state = embFormat_writerState(curFormat) - - if writer_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY: - # extension includes the dot, so we'll remove it - yield extension[1:], description - - curFormat = curFormat.next +def pyembroidery_output_formats(): + for format in pyembroidery.supported_formats(): + if 'writer' in format and format['category'] == 'embroidery': + yield format['extension'], format['description'] def main(): env = build_environment() template = env.get_template('embroider_zip_output.inx') - inx = template.render(formats=libembroidery_output_formats()) + inx = template.render(formats=pyembroidery_output_formats()) with open("inx/inkstitch_output_ZIP.inx", 'w') as inx_file: inx_file.write(inx) diff --git a/inx/inkstitch_output_ZIP.inx b/inx/inkstitch_output_ZIP.inx index b5b2cf1c..81f17b23 100644 --- a/inx/inkstitch_output_ZIP.inx +++ b/inx/inkstitch_output_ZIP.inx @@ -12,50 +12,20 @@ true - false - - false - - false - - false - - false - - false - - false - - false - - false - - false - - false - - false - - false - false false - false - - false + false - false + false - false + false false - false - zip - + \ No newline at end of file -- cgit v1.3.1 From 4dc228e15e56d5a692b2901e08d9c9c6de1e6824 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 17 Jul 2018 21:46:14 -0400 Subject: add pyembroidery-convert --- bin/pyembroidery-convert | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 bin/pyembroidery-convert (limited to 'bin') diff --git a/bin/pyembroidery-convert b/bin/pyembroidery-convert new file mode 100755 index 00000000..ac58e3e5 --- /dev/null +++ b/bin/pyembroidery-convert @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +import sys +import pyembroidery + +pyembroidery.convert(sys.argv[1], sys.argv[2]) -- cgit v1.3.1 From c0745f2b580c59b80c7b5a690bd9c0d8f5082968 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 17 Jul 2018 21:46:26 -0400 Subject: remove libembroidery-convert install script --- bin/install_libembroidery-convert_Ubuntu.sh | 58 ----------------------------- 1 file changed, 58 deletions(-) delete mode 100644 bin/install_libembroidery-convert_Ubuntu.sh (limited to 'bin') diff --git a/bin/install_libembroidery-convert_Ubuntu.sh b/bin/install_libembroidery-convert_Ubuntu.sh deleted file mode 100644 index ef2626bd..00000000 --- a/bin/install_libembroidery-convert_Ubuntu.sh +++ /dev/null @@ -1,58 +0,0 @@ -# This file is part of the Inkscape extension 'ink/stitch', -# an extension for machine embroidery design using Inkscape. - -# Copyright (C) 2017 Maren Hachmann - -# ink/stitch is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# ink/stitch is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with ink/stitch. If not, see . - -#!/bin/bash - -# make sure we're in tmp directory -cd /tmp - -# install qmake (which is needed to configure libembroidery) -sudo apt-get install qt4-qmake - -# get the source for embroidermodder -wget https://github.com/Embroidermodder/Embroidermodder/archive/master.zip -O /tmp/embroidermodder-master.zip - -# unzip files -unzip embroidermodder-master.zip -d /tmp - -# switch into directory of the library we're interested in -cd Embroidermodder-master/libembroidery-convert/ - -# prepare build -qmake - -# build -make - -# create destination folder (which will automatically be in the PATH environment variable) -mkdir -p $HOME/bin/ - -# copy created library there -cp ./libembroidery-convert $HOME/bin/ - -echo "========================== - -Use the embroidery file format conversion tool like this: - -libembroidery-convert file_to_read file_to_write - -To get a list of supported embroidery formats, enter: - -libembroidery-convert --help - -Run this script again to update your libembroidery-convert version." -- cgit v1.3.1 From d994d2506e6d7e1c88fdf72d77600a577be1a08e Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 17 Jul 2018 22:42:59 -0400 Subject: fix pyinstaller error --- bin/build-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/build-dist b/bin/build-dist index 0d435580..79c89838 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -20,7 +20,7 @@ fi pyinstaller_args+="--hidden-import gi.repository.Gtk " # mac and windows build seem to miss wx import -pyinstaller_args+="--hidden-import wx" +pyinstaller_args+="--hidden-import wx " # This lets pyinstaller see inkex.py, etc. pyinstaller_args+="-p inkscape-0.92.3/share/extensions " -- cgit v1.3.1