summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/gen-zip-inx21
-rw-r--r--inx/inkstitch_output_ZIP.inx38
2 files changed, 10 insertions, 49 deletions
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 @@
<dataloss>true</dataloss>
</output>
- <param name="format-col" type="boolean" _gui-text=".COL: Embroidery Thread Color Format">false</param>
-
- <param name="format-csv" type="boolean" _gui-text=".CSV: Comma Separated Values Format">false</param>
-
- <param name="format-dst" type="boolean" _gui-text=".DST: Tajima Embroidery Format">false</param>
-
- <param name="format-edr" type="boolean" _gui-text=".EDR: Embird Embroidery Format">false</param>
-
- <param name="format-exp" type="boolean" _gui-text=".EXP: Melco Embroidery Format">false</param>
-
- <param name="format-hus" type="boolean" _gui-text=".HUS: Husqvarna Viking Embroidery Format">false</param>
-
- <param name="format-inf" type="boolean" _gui-text=".INF: Embroidery Color Format">false</param>
-
- <param name="format-jef" type="boolean" _gui-text=".JEF: Janome Embroidery Format">false</param>
-
- <param name="format-ksm" type="boolean" _gui-text=".KSM: Pfaff Embroidery Format">false</param>
-
- <param name="format-max" type="boolean" _gui-text=".MAX: Pfaff Embroidery Format">false</param>
-
- <param name="format-pcd" type="boolean" _gui-text=".PCD: Pfaff Embroidery Format">false</param>
-
- <param name="format-pcq" type="boolean" _gui-text=".PCQ: Pfaff Embroidery Format">false</param>
-
- <param name="format-pcs" type="boolean" _gui-text=".PCS: Pfaff Embroidery Format">false</param>
-
<param name="format-pec" type="boolean" _gui-text=".PEC: Brother Embroidery Format">false</param>
<param name="format-pes" type="boolean" _gui-text=".PES: Brother Embroidery Format">false</param>
- <param name="format-plt" type="boolean" _gui-text=".PLT: AutoCAD Plot Drawing Format">false</param>
-
- <param name="format-rgb" type="boolean" _gui-text=".RGB: RGB Embroidery Format">false</param>
+ <param name="format-exp" type="boolean" _gui-text=".EXP: Melco Embroidery Format">false</param>
- <param name="format-thr" type="boolean" _gui-text=".THR: ThredWorks Embroidery Format">false</param>
+ <param name="format-dst" type="boolean" _gui-text=".DST: Tajima Embroidery Format">false</param>
- <param name="format-txt" type="boolean" _gui-text=".TXT: Text File">false</param>
+ <param name="format-jef" type="boolean" _gui-text=".JEF: Janome Embroidery Format">false</param>
<param name="format-vp3" type="boolean" _gui-text=".VP3: Pfaff Embroidery Format">false</param>
- <param name="format-xxx" type="boolean" _gui-text=".XXX: Singer Embroidery Format">false</param>
-
<param name="extension" type="string" gui-hidden="true">zip</param>
<script>
<command reldir="extensions" interpreter="python">inkstitch.py</command>
</script>
-</inkscape-extension>
+</inkscape-extension> \ No newline at end of file