summaryrefslogtreecommitdiff
path: root/lib/inx/outputs.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/inx/outputs.py')
-rw-r--r--lib/inx/outputs.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/inx/outputs.py b/lib/inx/outputs.py
new file mode 100644
index 00000000..aef0c8b5
--- /dev/null
+++ b/lib/inx/outputs.py
@@ -0,0 +1,18 @@
+import pyembroidery
+
+from .utils import build_environment, write_inx_file
+
+
+def pyembroidery_output_formats():
+ for format in pyembroidery.supported_formats():
+ if 'writer' in format and format['category'] == 'embroidery':
+ yield format['extension'], format['description']
+
+
+def generate_output_inx_files():
+ env = build_environment()
+ template = env.get_template('output.inx')
+
+ for format, description in pyembroidery_output_formats():
+ name = "output_%s" % format.upper()
+ write_inx_file(name, template.render(format=format, description=description))