diff options
| author | Rick Levine <rick@xoab.us> | 2023-02-02 21:27:16 -0800 |
|---|---|---|
| committer | Rick Levine <rick@xoab.us> | 2023-02-02 21:27:16 -0800 |
| commit | 31fbdf521b0e584ca3395e3827a6f2a02db688c1 (patch) | |
| tree | bcf1ee602e6b1a021c83a16e9893007b6849166d /lib | |
| parent | a2c6d5fbcbbfaffb0604705c5530310649a8db82 (diff) | |
Add filename to .dst header
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/output.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/output.py b/lib/output.py index a65a3af1..a6edfe86 100644 --- a/lib/output.py +++ b/lib/output.py @@ -3,6 +3,7 @@ # Copyright (c) 2010 Authors # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. +import os import sys import inkex @@ -60,6 +61,10 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}): # origin = origin * scale pattern = pyembroidery.EmbPattern() + + # For later use when writing .dst header title field. + pattern.extras['filename'] = os.path.splitext(os.path.basename(file_path))[0] + stitch = Stitch(0, 0) for color_block in stitch_plan: |
