summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-07-25 21:21:24 -0400
committerGitHub <noreply@github.com>2018-07-25 21:21:24 -0400
commitf1478556565f2e23150c86b17e6e170edc217d23 (patch)
tree4e652bde1122f44f360e140b696cb0eb81a7e9e1
parent82c06cceda54d559e78792e5284f3520908142ed (diff)
parent1bd7aa110a1b30a6c44f4d792b3c817e10234c07 (diff)
Merge pull request #234 from inkstitch/lexelby-integrate-pyembroidery
switch from libembroidery to pyembroidery
-rw-r--r--.gitignore4
-rw-r--r--.gitmodules3
-rw-r--r--.travis.yml18
-rw-r--r--babel.conf1
-rwxr-xr-xbin/build-dist10
-rwxr-xr-xbin/gen-input-inx23
-rwxr-xr-xbin/gen-output-format-option-list21
-rwxr-xr-xbin/gen-output-inx23
-rwxr-xr-xbin/gen-zip-inx21
-rw-r--r--bin/install_libembroidery-convert_Ubuntu.sh58
-rwxr-xr-xbin/pyembroidery-convert6
m---------embroidermodder0
-rw-r--r--inx/inkstitch_embroider.inx31
-rw-r--r--inx/inkstitch_input_COL.inx17
-rw-r--r--inx/inkstitch_input_CSV.inx17
-rw-r--r--inx/inkstitch_input_DAT.inx17
-rw-r--r--inx/inkstitch_input_DSB.inx2
-rw-r--r--inx/inkstitch_input_EDR.inx17
-rw-r--r--inx/inkstitch_input_EXY.inx17
-rw-r--r--inx/inkstitch_input_FXY.inx17
-rw-r--r--inx/inkstitch_input_GT.inx17
-rw-r--r--inx/inkstitch_input_HUS.inx17
-rw-r--r--inx/inkstitch_input_INF.inx17
-rw-r--r--inx/inkstitch_input_MAX.inx17
-rw-r--r--inx/inkstitch_input_MIT.inx17
-rw-r--r--inx/inkstitch_input_NEW.inx17
-rw-r--r--inx/inkstitch_input_OFM.inx17
-rw-r--r--inx/inkstitch_input_PCD.inx17
-rw-r--r--inx/inkstitch_input_PCM.inx17
-rw-r--r--inx/inkstitch_input_PCQ.inx17
-rw-r--r--inx/inkstitch_input_PCS.inx17
-rw-r--r--inx/inkstitch_input_PHB.inx17
-rw-r--r--inx/inkstitch_input_PHC.inx17
-rw-r--r--inx/inkstitch_input_PLT.inx17
-rw-r--r--inx/inkstitch_input_RGB.inx17
-rw-r--r--inx/inkstitch_input_SST.inx17
-rw-r--r--inx/inkstitch_input_T09.inx17
-rw-r--r--inx/inkstitch_input_TBF.inx (renamed from inx/inkstitch_input_CSD.inx)12
-rw-r--r--inx/inkstitch_input_THR.inx17
-rw-r--r--inx/inkstitch_input_U01.inx (renamed from inx/inkstitch_input_U00.inx)12
-rw-r--r--inx/inkstitch_input_VIP.inx17
-rw-r--r--inx/inkstitch_input_ZSK.inx17
-rw-r--r--inx/inkstitch_output_COL.inx19
-rw-r--r--inx/inkstitch_output_CSV.inx19
-rw-r--r--inx/inkstitch_output_DST.inx2
-rw-r--r--inx/inkstitch_output_EDR.inx19
-rw-r--r--inx/inkstitch_output_EXP.inx2
-rw-r--r--inx/inkstitch_output_HUS.inx19
-rw-r--r--inx/inkstitch_output_INF.inx19
-rw-r--r--inx/inkstitch_output_JEF.inx2
-rw-r--r--inx/inkstitch_output_KSM.inx19
-rw-r--r--inx/inkstitch_output_MAX.inx19
-rw-r--r--inx/inkstitch_output_PCD.inx19
-rw-r--r--inx/inkstitch_output_PCQ.inx19
-rw-r--r--inx/inkstitch_output_PCS.inx19
-rw-r--r--inx/inkstitch_output_PEC.inx2
-rw-r--r--inx/inkstitch_output_PES.inx2
-rw-r--r--inx/inkstitch_output_PLT.inx19
-rw-r--r--inx/inkstitch_output_RGB.inx19
-rw-r--r--inx/inkstitch_output_THR.inx19
-rw-r--r--inx/inkstitch_output_TXT.inx19
-rw-r--r--inx/inkstitch_output_VP3.inx2
-rw-r--r--inx/inkstitch_output_XXX.inx19
-rw-r--r--inx/inkstitch_output_ZIP.inx38
-rw-r--r--lib/extensions/input.py44
-rw-r--r--lib/extensions/output.py5
-rw-r--r--lib/extensions/zip.py24
-rw-r--r--lib/output.py76
-rw-r--r--lib/stitch_plan/stitch.py14
-rw-r--r--lib/stitch_plan/stitch_plan.py123
-rw-r--r--lib/stitch_plan/stop.py43
-rw-r--r--lib/stitch_plan/ties.py18
-rw-r--r--lib/stitch_plan/trim.py23
-rw-r--r--lib/svg/svg.py3
-rw-r--r--lib/threads/color.py17
-rw-r--r--lib/utils/geometry.py3
-rw-r--r--messages.po37
-rw-r--r--print/templates/color_swatch.html4
-rw-r--r--print/templates/operator_detailedview.html12
-rw-r--r--print/templates/operator_overview.html4
-rw-r--r--print/templates/print_overview.html4
-rw-r--r--requirements.txt1
82 files changed, 267 insertions, 1210 deletions
diff --git a/.gitignore b/.gitignore
index 16a1e66b..3986ba50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,3 @@
dist/
build/
locales/
-
-# For development, I symlink into my clone, so I have to have a copy of libembroidery.
-libembroidery.py
-_libembroidery.so
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 228fc91e..00000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "embroidermodder"]
- path = embroidermodder
- url = https://github.com/Embroidermodder/Embroidermodder
diff --git a/.travis.yml b/.travis.yml
index 0bc49e06..4bc0355f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,23 +48,20 @@ install:
# for wxPython
sudo apt-get install glib-networking
- # for embroidermodder/libembroidery
- sudo apt-get install swig python-dev
-
# This is the same as the pypi module PyGObject. We can't just do
# "pip install PyGObject" because it depends on a version of
# libgirepository1.0-dev that doesn't exist in Trusty.
sudo apt-get install python-gi python-gi-cairo libgirepository1.0-dev
-
+
# wxPython doen't publish linux wheels in pypi
wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04/wxPython-4.0.3-cp27-cp27mu-linux_x86_64.whl
pip install wxPython-4.0.3-cp27-cp27mu-linux_x86_64.whl
-
+
# We can't use the shapely wheel because it includes the geos
# library but with a weird file name. Details:
# https://github.com/pyinstaller/pyinstaller/blob/61b1c75c2b0469b32d114298a63bf60b8d597e37/PyInstaller/hooks/hook-shapely.py#L34
pip install --no-binary shapely -r requirements.txt
-
+
pip install pyinstaller
elif [ "$BUILD" = "windows" ]; then
set -x
@@ -78,10 +75,6 @@ install:
export WINEDEBUG=-all
- wget -q https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.1.0/windows-libembroidery.tar.gz
- tar zxf windows-libembroidery.tar.gz
- rm windows-libembroidery.tar.gz
-
wget -q http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe
wine vcredist_x86.exe /q
@@ -109,11 +102,6 @@ script:
flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude=embroidermodder
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=embroidermodder
elif [ "$BUILD" = "linux" ]; then
- (
- cd embroidermodder/experimental
- qmake swigpython.pro
- make
- )
make dist
elif [ "$BUILD" = "windows" ]; then
# work around some bug... pyinstaller? shapely? not sure.
diff --git a/babel.conf b/babel.conf
index f7df6cb3..712fc342 100644
--- a/babel.conf
+++ b/babel.conf
@@ -1,4 +1,3 @@
-[ignore: libembroidery.py]
[ignore: embroidermodder/**]
[python: **.py]
diff --git a/bin/build-dist b/bin/build-dist
index 78e42430..79c89838 100755
--- a/bin/build-dist
+++ b/bin/build-dist
@@ -19,14 +19,8 @@ fi
# above!
pyinstaller_args+="--hidden-import gi.repository.Gtk "
-# mac and windows build seem to miss wx and libembroidery import
-pyinstaller_args+="--hidden-import wx --hidden-import libembroidery "
-
-if [ -d windows-libembroidery ]; then
- pyinstaller_args+="-p windows-libembroidery "
-else
- pyinstaller_args+="-p embroidermodder/experimental/python/binding "
-fi
+# mac and windows build seem to miss wx import
+pyinstaller_args+="--hidden-import wx "
# This lets pyinstaller see inkex.py, etc.
pyinstaller_args+="-p inkscape-0.92.3/share/extensions "
diff --git a/bin/gen-input-inx b/bin/gen-input-inx
index 6351d062..ae32b43f 100755
--- a/bin/gen-input-inx
+++ b/bin/gen-input-inx
@@ -2,7 +2,7 @@
import sys, os
from os.path import dirname
-from libembroidery import *
+import pyembroidery
from jinja2 import Environment, FileSystemLoader, select_autoescape
@@ -15,30 +15,21 @@ def build_environment():
)
-def libembroidery_input_formats():
- formatList = embFormatList_create()
- curFormat = formatList
- while(curFormat):
- extension = embFormat_extension(curFormat)
- description = embFormat_description(curFormat)
- reader_state = embFormat_readerState(curFormat)
-
- if reader_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY:
- # extension includes the dot, so we'll remove it
- yield extension[1:], description
-
- curFormat = curFormat.next
+def pyembroidery_input_formats():
+ for format in pyembroidery.supported_formats():
+ if 'reader' in format and format['category'] == 'embroidery':
+ yield format['extension'], format['description']
def main():
env = build_environment()
template = env.get_template('embroider_input.inx')
- for format, description in libembroidery_input_formats():
+ for format, description in pyembroidery_input_formats():
inx = template.render(format=format, description=description)
with open("inx/inkstitch_input_%s.inx" % format.upper(), 'w') as inx_file:
- inx_file.write(inx)
+ print >> inx_file, inx
if __name__ == "__main__":
diff --git a/bin/gen-output-format-option-list b/bin/gen-output-format-option-list
index 674813bb..28a83976 100755
--- a/bin/gen-output-format-option-list
+++ b/bin/gen-output-format-option-list
@@ -1,19 +1,14 @@
#!/usr/bin/env python
import sys
+import pyembroidery
-sys.path.append('embroidermodder/experimental/python/binding')
-from libembroidery import *
+formats = [format for format in pyembroidery.supported_formats() if 'writer' in format]
+formats.sort(key=lambda format: (format['category'] != 'embroidery', format['extension']))
-formatList = embFormatList_create()
-curFormat = formatList
-while(curFormat):
- extension = embFormat_extension(curFormat)
- description = embFormat_description(curFormat)
- writerState = embFormat_writerState(curFormat)
-
- if writerState.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY:
- print '<_option value="%s">%s(%s)</_option>' % (extension[1:], description, extension.upper())
-
- curFormat = curFormat.next
+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)
diff --git a/bin/gen-output-inx b/bin/gen-output-inx
index f167dbee..fbe2ad55 100755
--- a/bin/gen-output-inx
+++ b/bin/gen-output-inx
@@ -2,7 +2,7 @@
import sys, os
from os.path import dirname
-from libembroidery import *
+import pyembroidery
from jinja2 import Environment, FileSystemLoader, select_autoescape
@@ -15,30 +15,21 @@ def build_environment():
)
-def libembroidery_output_formats():
- formatList = embFormatList_create()
- curFormat = formatList
- while(curFormat):
- extension = embFormat_extension(curFormat)
- description = embFormat_description(curFormat)
- writer_state = embFormat_writerState(curFormat)
-
- if writer_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY:
- # extension includes the dot, so we'll remove it
- yield extension[1:], description
-
- curFormat = curFormat.next
+def pyembroidery_output_formats():
+ for format in pyembroidery.supported_formats():
+ if 'writer' in format and format['category'] == 'embroidery':
+ yield format['extension'], format['description']
def main():
env = build_environment()
template = env.get_template('embroider_output.inx')
- for format, description in libembroidery_output_formats():
+ for format, description in pyembroidery_output_formats():
inx = template.render(format=format, description=description)
with open("inx/inkstitch_output_%s.inx" % format.upper(), 'w') as inx_file:
- inx_file.write(inx)
+ print >> inx_file, inx
if __name__ == "__main__":
diff --git a/bin/gen-zip-inx b/bin/gen-zip-inx
index 5fbc8f1e..40948786 100755
--- a/bin/gen-zip-inx
+++ b/bin/gen-zip-inx
@@ -2,7 +2,7 @@
import sys, os
from os.path import dirname
-from libembroidery import *
+import pyembroidery
from jinja2 import Environment, FileSystemLoader, select_autoescape
@@ -15,26 +15,17 @@ def build_environment():
)
-def libembroidery_output_formats():
- formatList = embFormatList_create()
- curFormat = formatList
- while(curFormat):
- extension = embFormat_extension(curFormat)
- description = embFormat_description(curFormat)
- writer_state = embFormat_writerState(curFormat)
-
- if writer_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY:
- # extension includes the dot, so we'll remove it
- yield extension[1:], description
-
- curFormat = curFormat.next
+def pyembroidery_output_formats():
+ for format in pyembroidery.supported_formats():
+ if 'writer' in format and format['category'] == 'embroidery':
+ yield format['extension'], format['description']
def main():
env = build_environment()
template = env.get_template('embroider_zip_output.inx')
- inx = template.render(formats=libembroidery_output_formats())
+ inx = template.render(formats=pyembroidery_output_formats())
with open("inx/inkstitch_output_ZIP.inx", 'w') as inx_file:
inx_file.write(inx)
diff --git a/bin/install_libembroidery-convert_Ubuntu.sh b/bin/install_libembroidery-convert_Ubuntu.sh
deleted file mode 100644
index ef2626bd..00000000
--- a/bin/install_libembroidery-convert_Ubuntu.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-# This file is part of the Inkscape extension 'ink/stitch',
-# an extension for machine embroidery design using Inkscape.
-
-# Copyright (C) 2017 Maren Hachmann
-
-# ink/stitch is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# ink/stitch is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with ink/stitch. If not, see <http://www.gnu.org/licenses/>.
-
-#!/bin/bash
-
-# make sure we're in tmp directory
-cd /tmp
-
-# install qmake (which is needed to configure libembroidery)
-sudo apt-get install qt4-qmake
-
-# get the source for embroidermodder
-wget https://github.com/Embroidermodder/Embroidermodder/archive/master.zip -O /tmp/embroidermodder-master.zip
-
-# unzip files
-unzip embroidermodder-master.zip -d /tmp
-
-# switch into directory of the library we're interested in
-cd Embroidermodder-master/libembroidery-convert/
-
-# prepare build
-qmake
-
-# build
-make
-
-# create destination folder (which will automatically be in the PATH environment variable)
-mkdir -p $HOME/bin/
-
-# copy created library there
-cp ./libembroidery-convert $HOME/bin/
-
-echo "==========================
-
-Use the embroidery file format conversion tool like this:
-
-libembroidery-convert file_to_read file_to_write
-
-To get a list of supported embroidery formats, enter:
-
-libembroidery-convert --help
-
-Run this script again to update your libembroidery-convert version."
diff --git a/bin/pyembroidery-convert b/bin/pyembroidery-convert
new file mode 100755
index 00000000..ac58e3e5
--- /dev/null
+++ b/bin/pyembroidery-convert
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import sys
+import pyembroidery
+
+pyembroidery.convert(sys.argv[1], sys.argv[2])
diff --git a/embroidermodder b/embroidermodder
deleted file mode 160000
-Subproject 1a3faa9747fcff1cce07c4c58b54b1e780017f5
diff --git a/inx/inkstitch_embroider.inx b/inx/inkstitch_embroider.inx
index 1f5619a3..2c988a51 100644
--- a/inx/inkstitch_embroider.inx
+++ b/inx/inkstitch_embroider.inx
@@ -7,29 +7,14 @@
<param name="collapse_len_mm" type="float" min="0.0" max="10.0" _gui-text="Collapse length (mm)"> _gui-description="Jump stitches smaller than this will be treated as normal stitches.">3.0</param>
<param name="hide_layers" type="boolean" _gui-text="Hide other layers" description="Hide all other top-level layers when the embroidery layer is generated, in order to make stitching discernable.">true</param>
<param name="output_format" type="optiongroup" _gui-text="Output file format" appearance="minimal">
- <_option value="csv">Comma Separated Values Format(.CSV)</_option>
- <_option value="col">Embroidery Thread Color Format(.COL)</_option>
- <_option value="dst">Tajima Embroidery Format(.DST)</_option>
- <_option value="edr">Embird Embroidery Format(.EDR)</_option>
- <_option value="exp">Melco Embroidery Format(.EXP)</_option>
- <_option value="hus">Husqvarna Viking Embroidery Format(.HUS)</_option>
- <_option value="inf">Embroidery Color Format(.INF)</_option>
- <_option value="jef">Janome Embroidery Format(.JEF)</_option>
- <_option value="ksm">Pfaff Embroidery Format(.KSM)</_option>
- <_option value="max">Pfaff Embroidery Format(.MAX)</_option>
- <_option value="pcd">Pfaff Embroidery Format(.PCD)</_option>
- <_option value="pcq">Pfaff Embroidery Format(.PCQ)</_option>
- <_option value="pcs">Pfaff Embroidery Format(.PCS)</_option>
- <_option value="pec">Brother Embroidery Format(.PEC)</_option>
- <_option value="pes">Brother Embroidery Format(.PES)</_option>
- <_option value="plt">AutoCAD Plot Drawing Format(.PLT)</_option>
- <_option value="rgb">RGB Embroidery Format(.RGB)</_option>
- <_option value="sew">Janome Embroidery Format(.SEW)</_option>
- <_option value="tap">Happy Embroidery Format(.TAP)</_option>
- <_option value="thr">ThredWorks Embroidery Format(.THR)</_option>
- <_option value="txt">Text File(.TXT)</_option>
- <_option value="vp3">Pfaff Embroidery Format(.VP3)</_option>
- <_option value="xxx">Singer Embroidery Format(.XXX)</_option>
+ <_option value="dst">Tajima Embroidery Format(DST)</_option>
+ <_option value="exp">Melco Embroidery Format(EXP)</_option>
+ <_option value="jef">Janome Embroidery Format(JEF)</_option>
+ <_option value="pec">Brother Embroidery Format(PEC)</_option>
+ <_option value="pes">Brother Embroidery Format(PES)</_option>
+ <_option value="vp3">Pfaff Embroidery Format(VP3)</_option>
+ <_option value="csv">Comma-separated values(CSV) [DEBUG]</_option>
+ <_option value="svg">Scalable Vector Graphics(SVG) [DEBUG]</_option>
</param>
<param name="path" type="string" _gui-text="Directory"></param>
<param name="extension" type="string" gui-hidden="true">embroider</param>
diff --git a/inx/inkstitch_input_COL.inx b/inx/inkstitch_input_COL.inx
deleted file mode 100644
index 38ebe7bd..00000000
--- a/inx/inkstitch_input_COL.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>COL file input</_name>
- <id>org.inkstitch.input.col</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.col</extension>
- <mimetype>application/x-embroidery-col</mimetype>
- <_filetypename>Ink/Stitch: Embroidery Thread Color Format (.col)</_filetypename>
- <_filetypetooltip>convert COL file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_CSV.inx b/inx/inkstitch_input_CSV.inx
deleted file mode 100644
index 0c3e2096..00000000
--- a/inx/inkstitch_input_CSV.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>CSV file input</_name>
- <id>org.inkstitch.input.csv</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.csv</extension>
- <mimetype>application/x-embroidery-csv</mimetype>
- <_filetypename>Ink/Stitch: Comma Separated Values Format (.csv)</_filetypename>
- <_filetypetooltip>convert CSV file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_DAT.inx b/inx/inkstitch_input_DAT.inx
deleted file mode 100644
index e82694b8..00000000
--- a/inx/inkstitch_input_DAT.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>DAT file input</_name>
- <id>org.inkstitch.input.dat</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.dat</extension>
- <mimetype>application/x-embroidery-dat</mimetype>
- <_filetypename>Ink/Stitch: Barudan Embroidery Format (.dat)</_filetypename>
- <_filetypetooltip>convert DAT file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_DSB.inx b/inx/inkstitch_input_DSB.inx
index 8b7c6b02..c78e1c2d 100644
--- a/inx/inkstitch_input_DSB.inx
+++ b/inx/inkstitch_input_DSB.inx
@@ -7,7 +7,7 @@
<input>
<extension>.dsb</extension>
<mimetype>application/x-embroidery-dsb</mimetype>
- <_filetypename>Ink/Stitch: Barudan Embroidery Format (.dsb)</_filetypename>
+ <_filetypename>Ink/Stitch: Tajima(Barudan) Embroidery Format (.dsb)</_filetypename>
<_filetypetooltip>convert DSB file to Ink/Stitch manual-stitch paths</_filetypetooltip>
</input>
<param name="extension" type="string" gui-hidden="true">input</param>
diff --git a/inx/inkstitch_input_EDR.inx b/inx/inkstitch_input_EDR.inx
deleted file mode 100644
index 92cf7d14..00000000
--- a/inx/inkstitch_input_EDR.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>EDR file input</_name>
- <id>org.inkstitch.input.edr</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.edr</extension>
- <mimetype>application/x-embroidery-edr</mimetype>
- <_filetypename>Ink/Stitch: Embird Embroidery Format (.edr)</_filetypename>
- <_filetypetooltip>convert EDR file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_EXY.inx b/inx/inkstitch_input_EXY.inx
deleted file mode 100644
index 78de68d8..00000000
--- a/inx/inkstitch_input_EXY.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>EXY file input</_name>
- <id>org.inkstitch.input.exy</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.exy</extension>
- <mimetype>application/x-embroidery-exy</mimetype>
- <_filetypename>Ink/Stitch: Eltac Embroidery Format (.exy)</_filetypename>
- <_filetypetooltip>convert EXY file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_FXY.inx b/inx/inkstitch_input_FXY.inx
deleted file mode 100644
index c2be8c60..00000000
--- a/inx/inkstitch_input_FXY.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>FXY file input</_name>
- <id>org.inkstitch.input.fxy</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.fxy</extension>
- <mimetype>application/x-embroidery-fxy</mimetype>
- <_filetypename>Ink/Stitch: Fortron Embroidery Format (.fxy)</_filetypename>
- <_filetypetooltip>convert FXY file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_GT.inx b/inx/inkstitch_input_GT.inx
deleted file mode 100644
index 20a9fda0..00000000
--- a/inx/inkstitch_input_GT.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>GT file input</_name>
- <id>org.inkstitch.input.gt</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.gt</extension>
- <mimetype>application/x-embroidery-gt</mimetype>
- <_filetypename>Ink/Stitch: Gold Thread Embroidery Format (.gt)</_filetypename>
- <_filetypetooltip>convert GT file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_HUS.inx b/inx/inkstitch_input_HUS.inx
deleted file mode 100644
index bbac96a2..00000000
--- a/inx/inkstitch_input_HUS.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>HUS file input</_name>
- <id>org.inkstitch.input.hus</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.hus</extension>
- <mimetype>application/x-embroidery-hus</mimetype>
- <_filetypename>Ink/Stitch: Husqvarna Viking Embroidery Format (.hus)</_filetypename>
- <_filetypetooltip>convert HUS file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_INF.inx b/inx/inkstitch_input_INF.inx
deleted file mode 100644
index 9c07ed7f..00000000
--- a/inx/inkstitch_input_INF.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>INF file input</_name>
- <id>org.inkstitch.input.inf</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.inf</extension>
- <mimetype>application/x-embroidery-inf</mimetype>
- <_filetypename>Ink/Stitch: Embroidery Color Format (.inf)</_filetypename>
- <_filetypetooltip>convert INF file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_MAX.inx b/inx/inkstitch_input_MAX.inx
deleted file mode 100644
index 0f5ed952..00000000
--- a/inx/inkstitch_input_MAX.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>MAX file input</_name>
- <id>org.inkstitch.input.max</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.max</extension>
- <mimetype>application/x-embroidery-max</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.max)</_filetypename>
- <_filetypetooltip>convert MAX file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_MIT.inx b/inx/inkstitch_input_MIT.inx
deleted file mode 100644
index a0181182..00000000
--- a/inx/inkstitch_input_MIT.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>MIT file input</_name>
- <id>org.inkstitch.input.mit</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.mit</extension>
- <mimetype>application/x-embroidery-mit</mimetype>
- <_filetypename>Ink/Stitch: Mitsubishi Embroidery Format (.mit)</_filetypename>
- <_filetypetooltip>convert MIT file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_NEW.inx b/inx/inkstitch_input_NEW.inx
deleted file mode 100644
index 15d877d8..00000000
--- a/inx/inkstitch_input_NEW.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>NEW file input</_name>
- <id>org.inkstitch.input.new</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.new</extension>
- <mimetype>application/x-embroidery-new</mimetype>
- <_filetypename>Ink/Stitch: Ameco Embroidery Format (.new)</_filetypename>
- <_filetypetooltip>convert NEW file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_OFM.inx b/inx/inkstitch_input_OFM.inx
deleted file mode 100644
index 3e162355..00000000
--- a/inx/inkstitch_input_OFM.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>OFM file input</_name>
- <id>org.inkstitch.input.ofm</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.ofm</extension>
- <mimetype>application/x-embroidery-ofm</mimetype>
- <_filetypename>Ink/Stitch: Melco Embroidery Format (.ofm)</_filetypename>
- <_filetypetooltip>convert OFM file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_PCD.inx b/inx/inkstitch_input_PCD.inx
deleted file mode 100644
index eff3c2f7..00000000
--- a/inx/inkstitch_input_PCD.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PCD file input</_name>
- <id>org.inkstitch.input.pcd</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.pcd</extension>
- <mimetype>application/x-embroidery-pcd</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcd)</_filetypename>
- <_filetypetooltip>convert PCD file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_PCM.inx b/inx/inkstitch_input_PCM.inx
deleted file mode 100644
index 684b7e20..00000000
--- a/inx/inkstitch_input_PCM.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PCM file input</_name>
- <id>org.inkstitch.input.pcm</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.pcm</extension>
- <mimetype>application/x-embroidery-pcm</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcm)</_filetypename>
- <_filetypetooltip>convert PCM file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_PCQ.inx b/inx/inkstitch_input_PCQ.inx
deleted file mode 100644
index 44d2d6df..00000000
--- a/inx/inkstitch_input_PCQ.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PCQ file input</_name>
- <id>org.inkstitch.input.pcq</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.pcq</extension>
- <mimetype>application/x-embroidery-pcq</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcq)</_filetypename>
- <_filetypetooltip>convert PCQ file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_PCS.inx b/inx/inkstitch_input_PCS.inx
deleted file mode 100644
index 1a030e53..00000000
--- a/inx/inkstitch_input_PCS.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PCS file input</_name>
- <id>org.inkstitch.input.pcs</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.pcs</extension>
- <mimetype>application/x-embroidery-pcs</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcs)</_filetypename>
- <_filetypetooltip>convert PCS file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_PHB.inx b/inx/inkstitch_input_PHB.inx
deleted file mode 100644
index 0e14f097..00000000
--- a/inx/inkstitch_input_PHB.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PHB file input</_name>
- <id>org.inkstitch.input.phb</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.phb</extension>
- <mimetype>application/x-embroidery-phb</mimetype>
- <_filetypename>Ink/Stitch: Brother Embroidery Format (.phb)</_filetypename>
- <_filetypetooltip>convert PHB file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_PHC.inx b/inx/inkstitch_input_PHC.inx
deleted file mode 100644
index 3c2d10f5..00000000
--- a/inx/inkstitch_input_PHC.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PHC file input</_name>
- <id>org.inkstitch.input.phc</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.phc</extension>
- <mimetype>application/x-embroidery-phc</mimetype>
- <_filetypename>Ink/Stitch: Brother Embroidery Format (.phc)</_filetypename>
- <_filetypetooltip>convert PHC file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_PLT.inx b/inx/inkstitch_input_PLT.inx
deleted file mode 100644
index d811ff02..00000000
--- a/inx/inkstitch_input_PLT.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PLT file input</_name>
- <id>org.inkstitch.input.plt</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.plt</extension>
- <mimetype>application/x-embroidery-plt</mimetype>
- <_filetypename>Ink/Stitch: AutoCAD Plot Drawing Format (.plt)</_filetypename>
- <_filetypetooltip>convert PLT file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_RGB.inx b/inx/inkstitch_input_RGB.inx
deleted file mode 100644
index b64e285b..00000000
--- a/inx/inkstitch_input_RGB.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>RGB file input</_name>
- <id>org.inkstitch.input.rgb</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.rgb</extension>
- <mimetype>application/x-embroidery-rgb</mimetype>
- <_filetypename>Ink/Stitch: RGB Embroidery Format (.rgb)</_filetypename>
- <_filetypetooltip>convert RGB file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_SST.inx b/inx/inkstitch_input_SST.inx
deleted file mode 100644
index 85533659..00000000
--- a/inx/inkstitch_input_SST.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>SST file input</_name>
- <id>org.inkstitch.input.sst</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.sst</extension>
- <mimetype>application/x-embroidery-sst</mimetype>
- <_filetypename>Ink/Stitch: Sunstar Embroidery Format (.sst)</_filetypename>
- <_filetypetooltip>convert SST file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_T09.inx b/inx/inkstitch_input_T09.inx
deleted file mode 100644
index eb6ab6d9..00000000
--- a/inx/inkstitch_input_T09.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>T09 file input</_name>
- <id>org.inkstitch.input.t09</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.t09</extension>
- <mimetype>application/x-embroidery-t09</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.t09)</_filetypename>
- <_filetypetooltip>convert T09 file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_CSD.inx b/inx/inkstitch_input_TBF.inx
index 444270f0..e2b72ec9 100644
--- a/inx/inkstitch_input_CSD.inx
+++ b/inx/inkstitch_input_TBF.inx
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>CSD file input</_name>
- <id>org.inkstitch.input.csd</id>
+ <_name>TBF file input</_name>
+ <id>org.inkstitch.input.tbf</id>
<dependency type="executable" location="extensions">inkstitch.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<input>
- <extension>.csd</extension>
- <mimetype>application/x-embroidery-csd</mimetype>
- <_filetypename>Ink/Stitch: Singer Embroidery Format (.csd)</_filetypename>
- <_filetypetooltip>convert CSD file to Ink/Stitch manual-stitch paths</_filetypetooltip>
+ <extension>.tbf</extension>
+ <mimetype>application/x-embroidery-tbf</mimetype>
+ <_filetypename>Ink/Stitch: Tajima Embroidery Format (.tbf)</_filetypename>
+ <_filetypetooltip>convert TBF file to Ink/Stitch manual-stitch paths</_filetypetooltip>
</input>
<param name="extension" type="string" gui-hidden="true">input</param>
<script>
diff --git a/inx/inkstitch_input_THR.inx b/inx/inkstitch_input_THR.inx
deleted file mode 100644
index e6a6e09e..00000000
--- a/inx/inkstitch_input_THR.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>THR file input</_name>
- <id>org.inkstitch.input.thr</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.thr</extension>
- <mimetype>application/x-embroidery-thr</mimetype>
- <_filetypename>Ink/Stitch: ThredWorks Embroidery Format (.thr)</_filetypename>
- <_filetypetooltip>convert THR file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_U00.inx b/inx/inkstitch_input_U01.inx
index b28da66d..befadd5b 100644
--- a/inx/inkstitch_input_U00.inx
+++ b/inx/inkstitch_input_U01.inx
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>U00 file input</_name>
- <id>org.inkstitch.input.u00</id>
+ <_name>U01 file input</_name>
+ <id>org.inkstitch.input.u01</id>
<dependency type="executable" location="extensions">inkstitch.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<input>
- <extension>.u00</extension>
- <mimetype>application/x-embroidery-u00</mimetype>
- <_filetypename>Ink/Stitch: Barudan Embroidery Format (.u00)</_filetypename>
- <_filetypetooltip>convert U00 file to Ink/Stitch manual-stitch paths</_filetypetooltip>
+ <extension>.u01</extension>
+ <mimetype>application/x-embroidery-u01</mimetype>
+ <_filetypename>Ink/Stitch: Barudan Embroidery Format (.u01)</_filetypename>
+ <_filetypetooltip>convert U01 file to Ink/Stitch manual-stitch paths</_filetypetooltip>
</input>
<param name="extension" type="string" gui-hidden="true">input</param>
<script>
diff --git a/inx/inkstitch_input_VIP.inx b/inx/inkstitch_input_VIP.inx
deleted file mode 100644
index 3723285c..00000000
--- a/inx/inkstitch_input_VIP.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>VIP file input</_name>
- <id>org.inkstitch.input.vip</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.vip</extension>
- <mimetype>application/x-embroidery-vip</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.vip)</_filetypename>
- <_filetypetooltip>convert VIP file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_input_ZSK.inx b/inx/inkstitch_input_ZSK.inx
deleted file mode 100644
index 4178126f..00000000
--- a/inx/inkstitch_input_ZSK.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>ZSK file input</_name>
- <id>org.inkstitch.input.zsk</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <input>
- <extension>.zsk</extension>
- <mimetype>application/x-embroidery-zsk</mimetype>
- <_filetypename>Ink/Stitch: ZSK USA Embroidery Format (.zsk)</_filetypename>
- <_filetypetooltip>convert ZSK file to Ink/Stitch manual-stitch paths</_filetypetooltip>
- </input>
- <param name="extension" type="string" gui-hidden="true">input</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension>
diff --git a/inx/inkstitch_output_COL.inx b/inx/inkstitch_output_COL.inx
deleted file mode 100644
index 8a240a38..00000000
--- a/inx/inkstitch_output_COL.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>COL file output</_name>
- <id>org.inkstitch.output.col</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.col</extension>
- <mimetype>application/x-embroidery-col</mimetype>
- <_filetypename>Ink/Stitch: Embroidery Thread Color Format (.col)</_filetypename>
- <_filetypetooltip>Save design in COL format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">col</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_CSV.inx b/inx/inkstitch_output_CSV.inx
deleted file mode 100644
index d2f340cd..00000000
--- a/inx/inkstitch_output_CSV.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>CSV file output</_name>
- <id>org.inkstitch.output.csv</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.csv</extension>
- <mimetype>application/x-embroidery-csv</mimetype>
- <_filetypename>Ink/Stitch: Comma Separated Values Format (.csv)</_filetypename>
- <_filetypetooltip>Save design in CSV format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">csv</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_DST.inx b/inx/inkstitch_output_DST.inx
index 2230600a..fa034f40 100644
--- a/inx/inkstitch_output_DST.inx
+++ b/inx/inkstitch_output_DST.inx
@@ -16,4 +16,4 @@
<script>
<command reldir="extensions" interpreter="python">inkstitch.py</command>
</script>
-</inkscape-extension> \ No newline at end of file
+</inkscape-extension>
diff --git a/inx/inkstitch_output_EDR.inx b/inx/inkstitch_output_EDR.inx
deleted file mode 100644
index 0756b37a..00000000
--- a/inx/inkstitch_output_EDR.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>EDR file output</_name>
- <id>org.inkstitch.output.edr</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.edr</extension>
- <mimetype>application/x-embroidery-edr</mimetype>
- <_filetypename>Ink/Stitch: Embird Embroidery Format (.edr)</_filetypename>
- <_filetypetooltip>Save design in EDR format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">edr</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_EXP.inx b/inx/inkstitch_output_EXP.inx
index ce98dbc0..853bab9f 100644
--- a/inx/inkstitch_output_EXP.inx
+++ b/inx/inkstitch_output_EXP.inx
@@ -16,4 +16,4 @@
<script>
<command reldir="extensions" interpreter="python">inkstitch.py</command>
</script>
-</inkscape-extension> \ No newline at end of file
+</inkscape-extension>
diff --git a/inx/inkstitch_output_HUS.inx b/inx/inkstitch_output_HUS.inx
deleted file mode 100644
index 44536f2a..00000000
--- a/inx/inkstitch_output_HUS.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>HUS file output</_name>
- <id>org.inkstitch.output.hus</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.hus</extension>
- <mimetype>application/x-embroidery-hus</mimetype>
- <_filetypename>Ink/Stitch: Husqvarna Viking Embroidery Format (.hus)</_filetypename>
- <_filetypetooltip>Save design in HUS format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">hus</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_INF.inx b/inx/inkstitch_output_INF.inx
deleted file mode 100644
index 47c2b63e..00000000
--- a/inx/inkstitch_output_INF.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>INF file output</_name>
- <id>org.inkstitch.output.inf</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.inf</extension>
- <mimetype>application/x-embroidery-inf</mimetype>
- <_filetypename>Ink/Stitch: Embroidery Color Format (.inf)</_filetypename>
- <_filetypetooltip>Save design in INF format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">inf</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_JEF.inx b/inx/inkstitch_output_JEF.inx
index af92a836..74b752fc 100644
--- a/inx/inkstitch_output_JEF.inx
+++ b/inx/inkstitch_output_JEF.inx
@@ -16,4 +16,4 @@
<script>
<command reldir="extensions" interpreter="python">inkstitch.py</command>
</script>
-</inkscape-extension> \ No newline at end of file
+</inkscape-extension>
diff --git a/inx/inkstitch_output_KSM.inx b/inx/inkstitch_output_KSM.inx
deleted file mode 100644
index ad5ae4dd..00000000
--- a/inx/inkstitch_output_KSM.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>KSM file output</_name>
- <id>org.inkstitch.output.ksm</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.ksm</extension>
- <mimetype>application/x-embroidery-ksm</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.ksm)</_filetypename>
- <_filetypetooltip>Save design in KSM format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">ksm</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_MAX.inx b/inx/inkstitch_output_MAX.inx
deleted file mode 100644
index 45a5ba01..00000000
--- a/inx/inkstitch_output_MAX.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>MAX file output</_name>
- <id>org.inkstitch.output.max</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.max</extension>
- <mimetype>application/x-embroidery-max</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.max)</_filetypename>
- <_filetypetooltip>Save design in MAX format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">max</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_PCD.inx b/inx/inkstitch_output_PCD.inx
deleted file mode 100644
index b42f79de..00000000
--- a/inx/inkstitch_output_PCD.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PCD file output</_name>
- <id>org.inkstitch.output.pcd</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.pcd</extension>
- <mimetype>application/x-embroidery-pcd</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcd)</_filetypename>
- <_filetypetooltip>Save design in PCD format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">pcd</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_PCQ.inx b/inx/inkstitch_output_PCQ.inx
deleted file mode 100644
index 1764f670..00000000
--- a/inx/inkstitch_output_PCQ.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PCQ file output</_name>
- <id>org.inkstitch.output.pcq</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.pcq</extension>
- <mimetype>application/x-embroidery-pcq</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcq)</_filetypename>
- <_filetypetooltip>Save design in PCQ format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">pcq</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_PCS.inx b/inx/inkstitch_output_PCS.inx
deleted file mode 100644
index ef07c4bd..00000000
--- a/inx/inkstitch_output_PCS.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PCS file output</_name>
- <id>org.inkstitch.output.pcs</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.pcs</extension>
- <mimetype>application/x-embroidery-pcs</mimetype>
- <_filetypename>Ink/Stitch: Pfaff Embroidery Format (.pcs)</_filetypename>
- <_filetypetooltip>Save design in PCS format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">pcs</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_PEC.inx b/inx/inkstitch_output_PEC.inx
index 15880ce6..6d76b165 100644
--- a/inx/inkstitch_output_PEC.inx
+++ b/inx/inkstitch_output_PEC.inx
@@ -16,4 +16,4 @@
<script>
<command reldir="extensions" interpreter="python">inkstitch.py</command>
</script>
-</inkscape-extension> \ No newline at end of file
+</inkscape-extension>
diff --git a/inx/inkstitch_output_PES.inx b/inx/inkstitch_output_PES.inx
index cd7e7369..b821225a 100644
--- a/inx/inkstitch_output_PES.inx
+++ b/inx/inkstitch_output_PES.inx
@@ -16,4 +16,4 @@
<script>
<command reldir="extensions" interpreter="python">inkstitch.py</command>
</script>
-</inkscape-extension> \ No newline at end of file
+</inkscape-extension>
diff --git a/inx/inkstitch_output_PLT.inx b/inx/inkstitch_output_PLT.inx
deleted file mode 100644
index 649ef76b..00000000
--- a/inx/inkstitch_output_PLT.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>PLT file output</_name>
- <id>org.inkstitch.output.plt</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.plt</extension>
- <mimetype>application/x-embroidery-plt</mimetype>
- <_filetypename>Ink/Stitch: AutoCAD Plot Drawing Format (.plt)</_filetypename>
- <_filetypetooltip>Save design in PLT format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">plt</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_RGB.inx b/inx/inkstitch_output_RGB.inx
deleted file mode 100644
index e60d729e..00000000
--- a/inx/inkstitch_output_RGB.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>RGB file output</_name>
- <id>org.inkstitch.output.rgb</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.rgb</extension>
- <mimetype>application/x-embroidery-rgb</mimetype>
- <_filetypename>Ink/Stitch: RGB Embroidery Format (.rgb)</_filetypename>
- <_filetypetooltip>Save design in RGB format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">rgb</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_THR.inx b/inx/inkstitch_output_THR.inx
deleted file mode 100644
index c460bdfc..00000000
--- a/inx/inkstitch_output_THR.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>THR file output</_name>
- <id>org.inkstitch.output.thr</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.thr</extension>
- <mimetype>application/x-embroidery-thr</mimetype>
- <_filetypename>Ink/Stitch: ThredWorks Embroidery Format (.thr)</_filetypename>
- <_filetypetooltip>Save design in THR format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">thr</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_TXT.inx b/inx/inkstitch_output_TXT.inx
deleted file mode 100644
index 805deffe..00000000
--- a/inx/inkstitch_output_TXT.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>TXT file output</_name>
- <id>org.inkstitch.output.txt</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.txt</extension>
- <mimetype>application/x-embroidery-txt</mimetype>
- <_filetypename>Ink/Stitch: Text File (.txt)</_filetypename>
- <_filetypetooltip>Save design in TXT format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">txt</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_VP3.inx b/inx/inkstitch_output_VP3.inx
index dff29de4..11843420 100644
--- a/inx/inkstitch_output_VP3.inx
+++ b/inx/inkstitch_output_VP3.inx
@@ -16,4 +16,4 @@
<script>
<command reldir="extensions" interpreter="python">inkstitch.py</command>
</script>
-</inkscape-extension> \ No newline at end of file
+</inkscape-extension>
diff --git a/inx/inkstitch_output_XXX.inx b/inx/inkstitch_output_XXX.inx
deleted file mode 100644
index ad4135b0..00000000
--- a/inx/inkstitch_output_XXX.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>XXX file output</_name>
- <id>org.inkstitch.output.xxx</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <output>
- <extension>.xxx</extension>
- <mimetype>application/x-embroidery-xxx</mimetype>
- <_filetypename>Ink/Stitch: Singer Embroidery Format (.xxx)</_filetypename>
- <_filetypetooltip>Save design in XXX format using Ink/Stitch</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <param name="extension" type="string" gui-hidden="true">output</param>
- <param name="format" type="string" gui-hidden="true">xxx</param>
- <script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
- </script>
-</inkscape-extension> \ No newline at end of file
diff --git a/inx/inkstitch_output_ZIP.inx b/inx/inkstitch_output_ZIP.inx
index b5b2cf1c..81f17b23 100644
--- a/inx/inkstitch_output_ZIP.inx
+++ b/inx/inkstitch_output_ZIP.inx
@@ -12,50 +12,20 @@
<dataloss>true</dataloss>
</output>
- <param name="format-col" type="boolean" _gui-text=".COL: Embroidery Thread Color Format">false</param>
-
- <param name="format-csv" type="boolean" _gui-text=".CSV: Comma Separated Values Format">false</param>
-
- <param name="format-dst" type="boolean" _gui-text=".DST: Tajima Embroidery Format">false</param>
-
- <param name="format-edr" type="boolean" _gui-text=".EDR: Embird Embroidery Format">false</param>
-
- <param name="format-exp" type="boolean" _gui-text=".EXP: Melco Embroidery Format">false</param>
-
- <param name="format-hus" type="boolean" _gui-text=".HUS: Husqvarna Viking Embroidery Format">false</param>
-
- <param name="format-inf" type="boolean" _gui-text=".INF: Embroidery Color Format">false</param>
-
- <param name="format-jef" type="boolean" _gui-text=".JEF: Janome Embroidery Format">false</param>
-
- <param name="format-ksm" type="boolean" _gui-text=".KSM: Pfaff Embroidery Format">false</param>
-
- <param name="format-max" type="boolean" _gui-text=".MAX: Pfaff Embroidery Format">false</param>
-
- <param name="format-pcd" type="boolean" _gui-text=".PCD: Pfaff Embroidery Format">false</param>
-
- <param name="format-pcq" type="boolean" _gui-text=".PCQ: Pfaff Embroidery Format">false</param>
-
- <param name="format-pcs" type="boolean" _gui-text=".PCS: Pfaff Embroidery Format">false</param>
-
<param name="format-pec" type="boolean" _gui-text=".PEC: Brother Embroidery Format">false</param>
<param name="format-pes" type="boolean" _gui-text=".PES: Brother Embroidery Format">false</param>
- <param name="format-plt" type="boolean" _gui-text=".PLT: AutoCAD Plot Drawing Format">false</param>
-
- <param name="format-rgb" type="boolean" _gui-text=".RGB: RGB Embroidery Format">false</param>
+ <param name="format-exp" type="boolean" _gui-text=".EXP: Melco Embroidery Format">false</param>
- <param name="format-thr" type="boolean" _gui-text=".THR: ThredWorks Embroidery Format">false</param>
+ <param name="format-dst" type="boolean" _gui-text=".DST: Tajima Embroidery Format">false</param>
- <param name="format-txt" type="boolean" _gui-text=".TXT: Text File">false</param>
+ <param name="format-jef" type="boolean" _gui-text=".JEF: Janome Embroidery Format">false</param>
<param name="format-vp3" type="boolean" _gui-text=".VP3: Pfaff Embroidery Format">false</param>
- <param name="format-xxx" type="boolean" _gui-text=".XXX: Singer Embroidery Format">false</param>
-
<param name="extension" type="string" gui-hidden="true">zip</param>
<script>
<command reldir="extensions" interpreter="python">inkstitch.py</command>
</script>
-</inkscape-extension>
+</inkscape-extension> \ No newline at end of file
diff --git a/lib/extensions/input.py b/lib/extensions/input.py
index 21248dd9..cb5ac452 100644
--- a/lib/extensions/input.py
+++ b/lib/extensions/input.py
@@ -3,53 +3,29 @@ from os.path import realpath, dirname, join as path_join
import sys
from inkex import etree
import inkex
-
-# help python find libembroidery when running in a local repo clone
-if getattr(sys, 'frozen', None) is None:
- sys.path.append(realpath(path_join(dirname(__file__), '..', '..')))
-
-from libembroidery import *
+import pyembroidery
from ..svg import PIXELS_PER_MM, render_stitch_plan
from ..svg.tags import INKSCAPE_LABEL
from ..i18n import _
-from ..stitch_plan import StitchPlan
+from ..stitch_plan import StitchPlan, ColorBlock
from ..utils.io import save_stdout
class Input(object):
- def pattern_stitches(self, pattern):
- stitch_pointer = pattern.stitchList
- while stitch_pointer:
- yield stitch_pointer.stitch
- stitch_pointer = stitch_pointer.next
-
-
def affect(self, args):
- # libembroidery likes to dump a bunch of debugging stuff to stdout
- save_stdout()
-
embroidery_file = args[0]
- pattern = embPattern_create()
- embPattern_read(pattern, embroidery_file)
- embPattern_flipVertical(pattern)
+ pattern = pyembroidery.read(embroidery_file)
stitch_plan = StitchPlan()
color_block = None
- current_color = None
-
- for stitch in self.pattern_stitches(pattern):
- if stitch.color != current_color:
- thread = embThreadList_getAt(pattern.threadList, stitch.color)
- color = thread.color
- color_block = stitch_plan.new_color_block((color.r, color.g, color.b))
- current_color = stitch.color
- if not stitch.flags & END:
- color_block.add_stitch(stitch.xx * PIXELS_PER_MM, stitch.yy * PIXELS_PER_MM,
- jump=stitch.flags & JUMP,
- color_change=stitch.flags & STOP,
- trim=stitch.flags & TRIM)
+ for raw_stitches, thread in pattern.get_as_colorblocks():
+ color_block = stitch_plan.new_color_block(thread)
+ for x, y, command in raw_stitches:
+ color_block.add_stitch(x * PIXELS_PER_MM / 10.0, y * PIXELS_PER_MM / 10.0,
+ jump=(command == pyembroidery.JUMP),
+ trim=(command == pyembroidery.TRIM))
extents = stitch_plan.extents
svg = etree.Element("svg", nsmap=inkex.NSS, attrib=
@@ -69,4 +45,4 @@ class Input(object):
# Note: this is NOT the same as centering the design in the canvas!
layer.set('transform', 'translate(%s,%s)' % (extents[0], extents[1]))
- print >> sys.real_stdout, etree.tostring(svg)
+ print etree.tostring(svg)
diff --git a/lib/extensions/output.py b/lib/extensions/output.py
index f4b153e6..1dc8d19d 100644
--- a/lib/extensions/output.py
+++ b/lib/extensions/output.py
@@ -29,20 +29,17 @@ class Output(InkstitchExtension):
patches = self.elements_to_patches(self.elements)
stitch_plan = patches_to_stitch_plan(patches, self.options.collapse_length_mm * PIXELS_PER_MM)
- # libembroidery wants to write to an actual file rather than stdout
temp_file = tempfile.NamedTemporaryFile(suffix=".%s" % self.options.file_extension, delete=False)
# in windows, failure to close here will keep the file locked
temp_file.close()
- # libembroidery likes to debug log things to stdout. No way to disable it.
- save_stdout()
write_embroidery_file(temp_file.name, stitch_plan, self.document.getroot())
# inkscape will read the file contents from stdout and copy
# to the destination file that the user chose
with open(temp_file.name) as output_file:
- sys.real_stdout.write(output_file.read())
+ sys.stdout.write(output_file.read())
# clean up the temp file
os.remove(temp_file.name)
diff --git a/lib/extensions/zip.py b/lib/extensions/zip.py
index ca12efdd..02f29e8a 100644
--- a/lib/extensions/zip.py
+++ b/lib/extensions/zip.py
@@ -4,7 +4,7 @@ import os
import inkex
import tempfile
from zipfile import ZipFile
-from libembroidery import *
+import pyembroidery
from .base import InkstitchExtension
from ..i18n import _
@@ -24,18 +24,11 @@ class Zip(InkstitchExtension):
# it's kind of obnoxious that I have to do this...
self.formats = []
- formatList = embFormatList_create()
- curFormat = formatList
- while(curFormat):
- # extension includes the dot, so we'll remove it
- extension = embFormat_extension(curFormat)[1:]
- description = embFormat_description(curFormat)
- writer_state = embFormat_writerState(curFormat)
-
- if writer_state.strip() and embFormat_type(curFormat) != EMBFORMAT_OBJECTONLY:
+ for format in pyembroidery.supported_formats():
+ if 'writer' in format and format['category'] == 'embroidery':
+ extension = format['extension']
self.OptionParser.add_option('--format-%s' % extension, type="inkbool", dest=extension)
self.formats.append(extension)
- curFormat = curFormat.next
def effect(self):
if not self.get_elements():
@@ -49,19 +42,12 @@ class Zip(InkstitchExtension):
files = []
- # libembroidery likes to debug log things to stdout. No way to disable it.
- save_stdout()
for format in self.formats:
if getattr(self.options, format):
output_file = os.path.join(path, "%s.%s" % (base_file_name, format))
write_embroidery_file(output_file, stitch_plan, self.document.getroot())
files.append(output_file)
- # I'd love to do restore_stderr() here, but if I do, libembroidery's
- # stuff still prints out and corrupts the zip! That's because it uses
- # C's buffered stdout, so it hasn't actually written anything to the
- # real standard output yet.
-
if not files:
self.errormsg(_("No embroidery file formats selected."))
@@ -77,7 +63,7 @@ class Zip(InkstitchExtension):
# inkscape will read the file contents from stdout and copy
# to the destination file that the user chose
with open(temp_file.name) as output_file:
- sys.real_stdout.write(output_file.read())
+ sys.stdout.write(output_file.read())
os.remove(temp_file.name)
for file in files:
diff --git a/lib/output.py b/lib/output.py
index 84128a25..0d7f9918 100644
--- a/lib/output.py
+++ b/lib/output.py
@@ -1,4 +1,4 @@
-import libembroidery
+import pyembroidery
import inkex
import simpletransform
import shapely.geometry as shgeo
@@ -7,36 +7,17 @@ from .utils import Point
from .svg import PIXELS_PER_MM, get_doc_size, get_viewbox_transform
-def make_thread(color):
- thread = libembroidery.EmbThread()
- thread.color = libembroidery.embColor_make(*color.rgb)
-
- thread.description = color.name
- thread.catalogNumber = ""
-
- return thread
-
-def add_thread(pattern, thread):
- """Add a thread to a pattern and return the thread's index"""
-
- libembroidery.embPattern_addThread(pattern, thread)
-
- return libembroidery.embThreadList_count(pattern.threadList) - 1
-
-def get_flags(stitch):
- flags = 0
-
+def get_command(stitch):
if stitch.jump:
- flags |= libembroidery.JUMP
-
- if stitch.trim:
- flags |= libembroidery.TRIM
-
- if stitch.color_change:
- flags |= libembroidery.STOP
-
- return flags
-
+ return pyembroidery.JUMP
+ elif stitch.trim:
+ return pyembroidery.TRIM
+ elif stitch.color_change:
+ return pyembroidery.COLOR_CHANGE
+ elif stitch.stop:
+ return pyembroidery.STOP
+ else:
+ return pyembroidery.NEEDLE_AT
def _string_to_floats(string):
floats = string.split(',')
@@ -102,27 +83,32 @@ def get_origin(svg):
def write_embroidery_file(file_path, stitch_plan, svg):
origin = get_origin(svg)
- pattern = libembroidery.embPattern_create()
+ pattern = pyembroidery.EmbPattern()
for color_block in stitch_plan:
- add_thread(pattern, make_thread(color_block.color))
+ pattern.add_thread(color_block.color.pyembroidery_thread)
for stitch in color_block:
- if stitch.stop:
- # This is the start of the extra color block added by the
- # "STOP after" handler (see stitch_plan/stop.py). Assign it
- # the same color.
- add_thread(pattern, make_thread(color_block.color))
+ command = get_command(stitch)
+ pattern.add_stitch_absolute(command, stitch.x, stitch.y)
- flags = get_flags(stitch)
- libembroidery.embPattern_addStitchAbs(pattern, stitch.x - origin.x, stitch.y - origin.y, flags, 1)
-
- libembroidery.embPattern_addStitchAbs(pattern, stitch.x - origin.x, stitch.y - origin.y, libembroidery.END, 1)
+ pattern.add_stitch_absolute(pyembroidery.END, stitch.x, stitch.y)
# convert from pixels to millimeters
- libembroidery.embPattern_scale(pattern, 1/PIXELS_PER_MM)
+ # also multiply by 10 to get tenths of a millimeter as required by pyembroidery
+ scale = 10 / PIXELS_PER_MM
+
+ settings = {
+ # correct for the origin
+ "translate": -origin,
+
+ # convert from pixels to millimeters
+ # also multiply by 10 to get tenths of a millimeter as required by pyembroidery
+ "scale": (scale, scale),
- # SVG and embroidery disagree on the direction of the Y axis
- libembroidery.embPattern_flipVertical(pattern)
+ # This forces a jump at the start of the design and after each trim,
+ # even if we're close enough not to need one.
+ "full_jump": True,
+ }
- libembroidery.embPattern_write(pattern, file_path)
+ pyembroidery.write(pattern, file_path, settings)
diff --git a/lib/stitch_plan/stitch.py b/lib/stitch_plan/stitch.py
index 12642a60..5230efec 100644
--- a/lib/stitch_plan/stitch.py
+++ b/lib/stitch_plan/stitch.py
@@ -2,7 +2,7 @@ from ..utils.geometry import Point
class Stitch(Point):
- def __init__(self, x, y, color=None, jump=False, stop=False, trim=False, color_change=False, no_ties=False):
+ def __init__(self, x, y, color=None, jump=False, stop=False, trim=False, color_change=False, fake_color_change=False, no_ties=False):
self.x = x
self.y = y
self.color = color
@@ -10,10 +10,20 @@ class Stitch(Point):
self.trim = trim
self.stop = stop
self.color_change = color_change
+ self.fake_color_change = fake_color_change
self.no_ties = no_ties
def __repr__(self):
- return "Stitch(%s, %s, %s, %s, %s, %s, %s)" % (self.x, self.y, self.color, "JUMP" if self.jump else " ", "TRIM" if self.trim else " ", "STOP" if self.stop else " ", "NO TIES" if self.no_ties else " ")
+ return "Stitch(%s, %s, %s, %s, %s, %s, %s, %s%s)" % (self.x,
+ self.y,
+ self.color,
+ "JUMP" if self.jump else " ",
+ "TRIM" if self.trim else " ",
+ "STOP" if self.stop else " ",
+ "NO TIES" if self.no_ties else " ",
+ "FAKE " if self.fake_color_change else "",
+ "COLOR CHANGE" if self.color_change else " "
+ )
def copy(self):
return Stitch(self.x, self.y, self.color, self.jump, self.stop, self.trim, self.color_change, self.no_ties)
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py
index 742916f0..682ea09f 100644
--- a/lib/stitch_plan/stitch_plan.py
+++ b/lib/stitch_plan/stitch_plan.py
@@ -1,6 +1,4 @@
from .stitch import Stitch
-from .stop import process_stop
-from .trim import process_trim
from .ties import add_ties
from ..svg import PIXELS_PER_MM
from ..utils.geometry import Point
@@ -16,62 +14,45 @@ def patches_to_stitch_plan(patches, collapse_len=3.0 * PIXELS_PER_MM):
"""
stitch_plan = StitchPlan()
- color_block = stitch_plan.new_color_block()
- need_trim = False
+ if not patches:
+ return stitch_plan
+
+ color_block = stitch_plan.new_color_block(color=patches[0].color)
+
for patch in patches:
if not patch.stitches:
continue
- if not color_block.has_color():
- # set the color for the first color block
- color_block.color = patch.color
-
- if color_block.color == patch.color:
- if need_trim:
- process_trim(color_block, patch.stitches[0])
- need_trim = False
-
- # add a jump stitch between patches if the distance is more
- # than the collapse length
- if color_block.last_stitch:
- if (patch.stitches[0] - color_block.last_stitch).length() > collapse_len:
- color_block.add_stitch(patch.stitches[0].x, patch.stitches[0].y, jump=True)
-
- else:
- # add a color change (only if we didn't just do a "STOP after")
- if not color_block.last_stitch.color_change:
- stitch = color_block.last_stitch.copy()
- stitch.color_change = True
- color_block.add_stitch(stitch)
+ if color_block.color != patch.color:
+ if len(color_block) == 0:
+ # We just processed a stop, which created a new color block.
+ # We'll just claim this new block as ours:
+ color_block.color = patch.color
+ else:
+ # end the previous block with a color change
+ color_block.add_stitch(color_change=True)
- color_block = stitch_plan.new_color_block()
- color_block.color = patch.color
+ # make a new block of our color
+ color_block = stitch_plan.new_color_block(color=patch.color)
- color_block.filter_duplicate_stitches()
color_block.add_stitches(patch.stitches, no_ties=patch.stitch_as_is)
if patch.trim_after:
- # a trim needs to be followed by a jump to the next stitch, so
- # we'll process it when we start the next patch
- need_trim = True
+ color_block.add_stitch(trim=True)
if patch.stop_after:
- process_stop(color_block)
-
- add_jumps(stitch_plan)
- add_ties(stitch_plan)
-
- return stitch_plan
+ color_block.add_stitch(stop=True)
+ color_block = stitch_plan.new_color_block(color_block.color)
+ if len(color_block) == 0:
+ # last block ended in a stop, so now we have an empty block
+ del stitch_plan.color_blocks[-1]
-def add_jumps(stitch_plan):
- """Add a JUMP stitch at the start of each color block."""
+ stitch_plan.filter_duplicate_stitches()
+ stitch_plan.add_ties()
- for color_block in stitch_plan:
- stitch = color_block.stitches[0].copy()
- stitch.jump = True
- color_block.stitches.insert(0, stitch)
+ return stitch_plan
class StitchPlan(object):
@@ -85,6 +66,17 @@ class StitchPlan(object):
self.color_blocks.append(color_block)
return color_block
+ def add_color_block(self, color_block):
+ self.color_blocks.append(color_block)
+
+ def filter_duplicate_stitches(self):
+ for color_block in self:
+ color_block.filter_duplicate_stitches()
+
+ def add_ties(self):
+ # see ties.py
+ add_ties(self)
+
def __iter__(self):
return iter(self.color_blocks)
@@ -100,8 +92,12 @@ class StitchPlan(object):
return len({block.color for block in self})
@property
+ def num_color_blocks(self):
+ return len(self.color_blocks)
+
+ @property
def num_stops(self):
- return sum(block.num_stops for block in self)
+ return sum(1 for block in self if block.stop_after)
@property
def num_trims(self):
@@ -137,6 +133,13 @@ class StitchPlan(object):
dimensions = self.dimensions
return (dimensions[0] / PIXELS_PER_MM, dimensions[1] / PIXELS_PER_MM)
+ @property
+ def last_color_block(self):
+ if self.color_blocks:
+ return self.color_blocks[-1]
+ else:
+ return None
+
class ColorBlock(object):
"""Holds a set of stitches, all with the same thread color."""
@@ -148,6 +151,9 @@ class ColorBlock(object):
def __iter__(self):
return iter(self.stitches)
+ def __len__(self):
+ return len(self.stitches)
+
def __repr__(self):
return "ColorBlock(%s, %s)" % (self.color, self.stitches)
@@ -180,17 +186,18 @@ class ColorBlock(object):
return len(self.stitches)
@property
- def num_stops(self):
- """Number of pauses in this color block."""
-
- return sum(1 for stitch in self if stitch.stop)
-
- @property
def num_trims(self):
"""Number of trims in this color block."""
return sum(1 for stitch in self if stitch.trim)
+ @property
+ def stop_after(self):
+ if self.last_stitch is not None:
+ return self.last_stitch.stop
+ else:
+ return False
+
def filter_duplicate_stitches(self):
if not self.stitches:
return
@@ -198,12 +205,12 @@ class ColorBlock(object):
stitches = [self.stitches[0]]
for stitch in self.stitches[1:]:
- if stitches[-1].jump or stitch.stop or stitch.trim:
- # Don't consider jumps, stops, or trims as candidates for filtering
+ if stitches[-1].jump or stitch.stop or stitch.trim or stitch.color_change:
+ # Don't consider jumps, stops, color changes, or trims as candidates for filtering
pass
else:
l = (stitch - stitches[-1]).length()
- if l <= 0.1:
+ if l <= 0.1 * PIXELS_PER_MM:
# duplicate stitch, skip this one
continue
@@ -212,11 +219,21 @@ class ColorBlock(object):
self.stitches = stitches
def add_stitch(self, *args, **kwargs):
+ if not args:
+ # They're adding a command, e.g. `color_block.add_stitch(stop=True)``.
+ # Use the position from the last stitch.
+ if self.last_stitch:
+ args = (self.last_stitch.x, self.last_stitch.y)
+ else:
+ raise ValueError("internal error: can't add a command to an empty stitch block")
+
if isinstance(args[0], Stitch):
self.stitches.append(args[0])
elif isinstance(args[0], Point):
self.stitches.append(Stitch(args[0].x, args[0].y, *args[1:], **kwargs))
else:
+ if not args and self.last_stitch:
+ args = (self.last_stitch.x, self.last_stitch.y)
self.stitches.append(Stitch(*args, **kwargs))
def add_stitches(self, stitches, *args, **kwargs):
diff --git a/lib/stitch_plan/stop.py b/lib/stitch_plan/stop.py
deleted file mode 100644
index 81dec1da..00000000
--- a/lib/stitch_plan/stop.py
+++ /dev/null
@@ -1,43 +0,0 @@
-def process_stop(color_block):
- """Handle the "stop after" checkbox.
-
- The user wants the machine to pause after this patch. This can
- be useful for applique and similar on multi-needle machines that
- normally would not stop between colors.
-
- In machine embroidery files, there's no such thing as an actual
- "STOP" instruction. All that exists is a "color change" command
- (which libembroidery calls STOP just to be confusing).
-
- On multi-needle machines, the user assigns needles to the colors in
- the design before starting stitching. C01, C02, etc are normal
- needles, but C00 is special. For a block of stitches assigned
- to C00, the machine will continue sewing with the last color it
- had and pause after it completes the C00 block.
-
- That means we need to add an artificial color change instruction
- shortly before the current stitch so that the user can set that color
- block to C00. We'll go back 3 stitches and mark the start of the C00
- block:
- """
-
- if len(color_block.stitches) >= 3:
- # make a copy of the stitch and set it as a color change
- stitch = color_block.stitches[-3].copy()
- stitch.color_change = True
-
- # mark this stitch as a "stop" so that we can avoid
- # adding tie stitches in ties.py
- stitch.stop = True
-
- # insert it after the stitch
- color_block.stitches.insert(-2, stitch)
-
- # and also add a color change on this stitch, completing the C00
- # block:
-
- stitch = color_block.stitches[-1].copy()
- stitch.color_change = True
- color_block.add_stitch(stitch)
-
- # reference for the above: https://github.com/lexelby/inkstitch/pull/29#issuecomment-359175447
diff --git a/lib/stitch_plan/ties.py b/lib/stitch_plan/ties.py
index 6d07ac71..573469f5 100644
--- a/lib/stitch_plan/ties.py
+++ b/lib/stitch_plan/ties.py
@@ -30,15 +30,16 @@ def add_tie_in(stitches, upcoming_stitches):
def add_ties(stitch_plan):
"""Add tie-off before and after trims, jumps, and color changes."""
+ need_tie_in = True
for color_block in stitch_plan:
- need_tie_in = True
new_stitches = []
for i, stitch in enumerate(color_block.stitches):
- # Tie before and after TRIMs, JUMPs, and color changes, but ignore
- # the fake color change introduced by a "STOP after" (see stop.py).
- is_special = stitch.trim or stitch.jump or (stitch.color_change and not stitch.stop)
+ is_special = stitch.trim or stitch.jump or stitch.color_change or stitch.stop
- if is_special and not need_tie_in:
+ # see stop.py for an explanation of the fake color change
+ is_fake = stitch.fake_color_change
+
+ if is_special and not is_fake and not need_tie_in:
add_tie_off(new_stitches)
new_stitches.append(stitch)
need_tie_in = True
@@ -49,7 +50,8 @@ def add_ties(stitch_plan):
else:
new_stitches.append(stitch)
- if not need_tie_in:
- add_tie_off(new_stitches)
-
color_block.replace_stitches(new_stitches)
+
+ if not need_tie_in:
+ # tie off at the end if we haven't already
+ add_tie_off(color_block.stitches)
diff --git a/lib/stitch_plan/trim.py b/lib/stitch_plan/trim.py
deleted file mode 100644
index f692a179..00000000
--- a/lib/stitch_plan/trim.py
+++ /dev/null
@@ -1,23 +0,0 @@
-def process_trim(color_block, next_stitch):
- """Handle the "trim after" checkbox.
-
- DST (and maybe other formats?) has no actual TRIM instruction.
- Instead, 3 sequential JUMPs cause the machine to trim the thread.
-
- To support both DST and other formats, we'll add a TRIM and two
- JUMPs. The TRIM will be converted to a JUMP by libembroidery
- if saving to DST, resulting in the 3-jump sequence.
- """
-
- delta = next_stitch - color_block.last_stitch
- delta = delta * (1/4.0)
-
- pos = color_block.last_stitch
-
- for i in xrange(3):
- pos += delta
- color_block.add_stitch(pos.x, pos.y, jump=True)
-
- # first one should be TRIM instead of JUMP
- color_block.stitches[-3].jump = False
- color_block.stitches[-3].trim = True
diff --git a/lib/svg/svg.py b/lib/svg/svg.py
index 5552abd8..48b1343a 100644
--- a/lib/svg/svg.py
+++ b/lib/svg/svg.py
@@ -37,6 +37,9 @@ def color_block_to_realistic_stitches(color_block, svg):
paths = []
for point_list in color_block_to_point_lists(color_block):
+ if not point_list:
+ continue
+
color = color_block.color.visible_on_white.darker.to_hex_str()
start = point_list[0]
for point in point_list[1:]:
diff --git a/lib/threads/color.py b/lib/threads/color.py
index fede2ecc..cc6c0c48 100644
--- a/lib/threads/color.py
+++ b/lib/threads/color.py
@@ -1,7 +1,7 @@
import simplestyle
import re
import colorsys
-
+from pyembroidery.EmbThread import EmbThread
class ThreadColor(object):
hex_str_re = re.compile('#([0-9a-z]{3}|[0-9a-z]{6})', re.I)
@@ -9,6 +9,12 @@ class ThreadColor(object):
def __init__(self, color, name=None, number=None, manufacturer=None):
if color is None:
self.rgb = (0, 0, 0)
+ elif isinstance(color, EmbThread):
+ self.name = color.description
+ self.number = color.catalog_number
+ self.manufacturer = color.brand
+ self.rgb = (color.get_red(), color.get_green(), color.get_blue())
+ return
elif isinstance(color, (list, tuple)):
self.rgb = tuple(color)
elif self.hex_str_re.match(color):
@@ -39,6 +45,15 @@ class ThreadColor(object):
return "#%s" % self.hex_digits
@property
+ def pyembroidery_thread(self):
+ return {
+ "name": self.name,
+ "id": self.number,
+ "manufacturer": self.manufacturer,
+ "rgb": int(self.hex_digits, 16),
+ }
+
+ @property
def hex_digits(self):
return "%02X%02X%02X" % self.rgb
diff --git a/lib/utils/geometry.py b/lib/utils/geometry.py
index 7ff9b1cd..d0cb96cf 100644
--- a/lib/utils/geometry.py
+++ b/lib/utils/geometry.py
@@ -65,6 +65,9 @@ class Point:
else:
raise ValueError("cannot multiply Point by %s" % type(other))
+ def __neg__(self):
+ return self * -1
+
def __rmul__(self, other):
if isinstance(other, (int, float)):
return self.__mul__(other)
diff --git a/messages.po b/messages.po
index 41a04cb3..19400443 100644
--- a/messages.po
+++ b/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2018-07-24 20:19-0400\n"
+"POT-Creation-Date: 2018-07-25 21:18-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -418,7 +418,7 @@ msgstr ""
msgid "Embroidery Simulation"
msgstr ""
-#: lib/extensions/zip.py:66
+#: lib/extensions/zip.py:52
msgid "No embroidery file formats selected."
msgstr ""
@@ -434,7 +434,7 @@ msgid ""
"file to lexelby@github."
msgstr ""
-#: lib/svg/svg.py:87
+#: lib/svg/svg.py:90
msgid "Stitch Plan"
msgstr ""
@@ -462,18 +462,27 @@ msgid "thread"
msgstr ""
#: print/templates/color_swatch.html:19 print/templates/color_swatch.html:43
-#: print/templates/operator_detailedview.html:64
+#: print/templates/operator_detailedview.html:62
msgid "# stitches"
msgstr ""
#: print/templates/color_swatch.html:23 print/templates/color_swatch.html:44
-#: print/templates/operator_detailedview.html:67
-msgid "# stops"
+msgid "# trims"
msgstr ""
#: print/templates/color_swatch.html:24 print/templates/color_swatch.html:45
-#: print/templates/operator_detailedview.html:68
-msgid "# trims"
+#: print/templates/operator_detailedview.html:66
+msgid "stop after?"
+msgstr ""
+
+#: print/templates/color_swatch.html:24 print/templates/color_swatch.html:45
+#: print/templates/operator_detailedview.html:66
+msgid "yes"
+msgstr ""
+
+#: print/templates/color_swatch.html:24 print/templates/color_swatch.html:45
+#: print/templates/operator_detailedview.html:66
+msgid "no"
msgstr ""
#: print/templates/footer.html:2
@@ -554,20 +563,24 @@ msgstr ""
#: print/templates/operator_detailedview.html:33
#: print/templates/operator_overview.html:8
#: print/templates/print_overview.html:8
-msgid "Total nr stops"
+msgid "Total stops"
msgstr ""
#: print/templates/operator_detailedview.html:34
#: print/templates/operator_overview.html:9
#: print/templates/print_overview.html:9
-msgid "Total nr trims"
+msgid "Total trims"
msgstr ""
-#: print/templates/operator_detailedview.html:63
+#: print/templates/operator_detailedview.html:61
msgid "thread used"
msgstr ""
-#: print/templates/operator_detailedview.html:71
+#: print/templates/operator_detailedview.html:65
+msgid "trims"
+msgstr ""
+
+#: print/templates/operator_detailedview.html:69
msgid "Enter operator notes..."
msgstr ""
diff --git a/print/templates/color_swatch.html b/print/templates/color_swatch.html
index 6785b080..71022f6f 100644
--- a/print/templates/color_swatch.html
+++ b/print/templates/color_swatch.html
@@ -20,8 +20,8 @@
{% endif %}
{# We don't want to see stops and trims if we have more than 13 colorSwatches to show #}
{% if color_blocks|length < 13 %}
- <tspan dy="1.2em" x="2mm" class="swatch-stops">{{ _('# stops') }}: {{ color_block.num_stops }}</tspan>
<tspan dy="1.2em" x="2mm" class="swatch-trims">{{ _('# trims') }}: {{ color_block.num_trims }}</tspan>
+ <tspan dy="1.2em" x="2mm" class="swatch-stops">{{ _('stop after?') }}: {{ _("yes") if color_block.stop_after else _("no") }}</tspan>
{% endif %}
</text>
</svg>
@@ -41,8 +41,8 @@
<p><span class="color-rgb">{{ _('rgb') }}:</span><span>{{ color_block.color.rgb }}</span></p>
<p><span class="swatch-thread">{{ _('thread') }}:</span><span data-field-name="thread-{{ color_block.color.hex_digits }}" contenteditable="true">{{ color_block.color.manufacturer }} {{ "#" + color_block.color.number if color_block.color.number }}</span></p>
<p><span class="swatch-stitches">{{ _('# stitches') }}:</span><span>{{ color_block.num_stitches }}</span></p>
- <p><span class="swatch-stops">{{ _('# stops') }}:</span><span>{{ color_block.num_stops }}</span></p>
<p><span class="swatch-trims">{{ _('# trims') }}:</span><span>{{ color_block.num_trims }}</span></p>
+ <p><span class="swatch-stops">{{ _('stop after?') }}:</span><span>{{ _("yes") if color_block.stop_after else _("no") }}</span></p>
</div>
</div>
</div>
diff --git a/print/templates/operator_detailedview.html b/print/templates/operator_detailedview.html
index e1899db4..e3c0d441 100644
--- a/print/templates/operator_detailedview.html
+++ b/print/templates/operator_detailedview.html
@@ -30,18 +30,16 @@
<span>{{ _('Total stitch count') }}: {{job.num_stitches }}</span>
</p>
<p>
- <span>{{ _('Total nr stops') }}: {{ job.num_stops }}</span>
- <span>{{ _('Total nr trims') }}: {{ job.num_trims }}</span>
+ <span>{{ _('Total stops') }}: {{ job.num_stops }}</span>
+ <span>{{ _('Total trims') }}: {{ job.num_trims }}</span>
</p>
<p>
<span></span>
</p>
</div>
-
{% for color_block in color_blocks %}
-
<div class="opd-color-block">
<p class="operator-svg operator-colorswatch">
<svg xmlns="http://www.w3.org/2000/svg">
@@ -64,13 +62,11 @@
<span>{{ _('# stitches') }}: {{ color_block.num_stitches }}</span>
</p>
<p>
- <span>{{ _('# stops') }}: {{ color_block.num_stops }}</span>
- <span>{{ _('# trims') }}: {{ color_block.num_trims }}</span>
+ <span>{{ _('trims') }}: {{ color_block.num_trims }}</span>
+ <span>{{ _('stop after?') }}: {{ _("yes") if color_block.stop_after else _("no") }}</span>
</p>
<p>
<span class="notes" contenteditable="true" data-field-name="operator-notes-block{{ loop.index }}" data-placeholder="{{ _("Enter operator notes...") }}"></span>
</p>
</div>
{% endfor %}
-
-
diff --git a/print/templates/operator_overview.html b/print/templates/operator_overview.html
index 0c379316..048fd58e 100644
--- a/print/templates/operator_overview.html
+++ b/print/templates/operator_overview.html
@@ -5,8 +5,8 @@
<div class="table">
<p><span>{{ _('Unique Colors') }}:</span><span>{{ job.num_colors }}</span></p>
<p><span>{{ _('Color Blocks') }}:</span><span>{{ job.num_color_blocks }}</span></p>
- <p><span>{{ _('Total nr stops') }}:</span><span>{{ job.num_stops }}</span></p>
- <p><span>{{ _('Total nr trims') }}:</span><span>{{ job.num_trims }}</span></p>
+ <p><span>{{ _('Total stops') }}:</span><span>{{ job.num_stops }}</span></p>
+ <p><span>{{ _('Total trims') }}:</span><span>{{ job.num_trims }}</span></p>
</div>
</div>
<div>
diff --git a/print/templates/print_overview.html b/print/templates/print_overview.html
index ca8638ff..cfbb81d1 100644
--- a/print/templates/print_overview.html
+++ b/print/templates/print_overview.html
@@ -5,8 +5,8 @@
<div class="table">
<p><span>{{ _('Unique Colors') }}:</span><span>{{ job.num_colors }}</span></p>
<p><span>{{ _('Color Blocks') }}:</span><span>{{ job.num_color_blocks }}</span></p>
- <p><span>{{ _('Total nr stops') }}:</span><span>{{ job.num_stops }}</span></p>
- <p><span>{{ _('Total nr trims') }}:</span><span>{{ job.num_trims }}</span></p>
+ <p><span>{{ _('Total stops') }}:</span><span>{{ job.num_stops }}</span></p>
+ <p><span>{{ _('Total trims') }}:</span><span>{{ job.num_trims }}</span></p>
</div>
</div>
<div>
diff --git a/requirements.txt b/requirements.txt
index 314a2b0e..8d487a2c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,4 @@
+pyembroidery >=1.2.12, <1.3.0
backports.functools_lru_cache
wxPython
networkx