2021-03-12 04:17:19 +00:00
|
|
|
# Authors: see git history
|
|
|
|
#
|
|
|
|
# Copyright (c) 2010 Authors
|
|
|
|
# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
|
|
|
|
|
2018-08-20 02:14:10 +00:00
|
|
|
import pyembroidery
|
|
|
|
|
|
|
|
from .utils import build_environment, write_inx_file
|
|
|
|
|
|
|
|
|
|
|
|
def pyembroidery_input_formats():
|
|
|
|
for format in pyembroidery.supported_formats():
|
2022-07-08 05:33:45 +00:00
|
|
|
if 'reader' in format and format['category'] in ['embroidery', 'color', 'stitch', 'debug']:
|
2018-08-20 02:14:10 +00:00
|
|
|
yield format['extension'], format['description']
|
|
|
|
|
|
|
|
|
|
|
|
def generate_input_inx_files():
|
|
|
|
env = build_environment()
|
2021-03-04 17:40:53 +00:00
|
|
|
template = env.get_template('input.xml')
|
2018-08-20 02:14:10 +00:00
|
|
|
|
|
|
|
for format, description in pyembroidery_input_formats():
|
|
|
|
name = "input_%s" % format.upper()
|
|
|
|
write_inx_file(name, template.render(format=format, description=description))
|