inkstitch/bin/gen-output-format-option-list

15 wiersze
472 B
Python
Executable File

#!/usr/bin/env python
import sys
import pyembroidery
formats = [format for format in pyembroidery.supported_formats() if 'writer' in format]
formats.sort(key=lambda format: (format['category'] != 'embroidery', format['extension']))
for format in formats:
tag = ""
if format['category'] != 'embroidery':
tag = " [DEBUG]"
print '<_option value="%s">%s(%s)%s</_option>' % (format['extension'], format['description'], format['extension'].upper(), tag)