diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-08-19 22:14:10 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-08-19 22:14:10 -0400 |
| commit | 512c3411648b24505165d555a04e82ba689f8aed (patch) | |
| tree | 3eb79343f2be57bace6e2f3e62cfe319d7fdb2f1 /lib/inx/inputs.py | |
| parent | a4d588e392c734c9e32bf4c06b2403ca32e7f1e2 (diff) | |
integrate inx generation into ink/stitch proper
Diffstat (limited to 'lib/inx/inputs.py')
| -rwxr-xr-x | lib/inx/inputs.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/inx/inputs.py b/lib/inx/inputs.py new file mode 100755 index 00000000..d40ffeaf --- /dev/null +++ b/lib/inx/inputs.py @@ -0,0 +1,18 @@ +import pyembroidery + +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': + yield format['extension'], format['description'] + + +def generate_input_inx_files(): + env = build_environment() + template = env.get_template('input.inx') + + for format, description in pyembroidery_input_formats(): + name = "input_%s" % format.upper() + write_inx_file(name, template.render(format=format, description=description)) |
