diff options
| author | Rick Levine <rick@xoab.us> | 2023-02-15 14:27:36 -0800 |
|---|---|---|
| committer | Rick Levine <rick@xoab.us> | 2023-02-15 14:27:36 -0800 |
| commit | b1ffd8ad92b4803998b5447b45e71c30250db739 (patch) | |
| tree | 1aacaa6ff4e0df4b744e45bac192cfe4c22852ee | |
| parent | d2805f23de87d168d836d6bc4fabaa7023aba285 (diff) | |
Update output.py
Retrieve svg file name for .dst header
| -rw-r--r-- | lib/output.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/output.py b/lib/output.py index 0b9e4ad5..3ce6e5cd 100644 --- a/lib/output.py +++ b/lib/output.py @@ -63,7 +63,8 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}): pattern = pyembroidery.EmbPattern() # For later use when writing .dst header title field. - pattern.extras['name'] = os.path.splitext(os.path.basename(file_path))[0] + svg_docname = svg.root.attrib['{http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}docname'] + pattern.extras['name'] = os.path.splitext(os.path.basename(svg_docname))[0] stitch = Stitch(0, 0) |
