From e84a86d4ac0caf29d6074728376ff0a594243fec Mon Sep 17 00:00:00 2001
From: Kaalleen <36401965+kaalleen@users.noreply.github.com>
Date: Thu, 4 Mar 2021 18:40:53 +0100
Subject: Update for Inkscape 1.0 (#880)
* update for inkscape 1.0
* add about extension
* Build improvements for the inkscape1.0 branch (#985)
* zip: export real svg not stitch plan
* #411 and #726
* Tools for Font Creators (#1018)
* ignore very small holes in fills
* remove embroider (#1026)
* auto_fill: ignore shrink_or_grow if result is empty (#589)
* break apart: do not ignore small fills
Co-authored-by: Hagen Fritsch
Co-authored-by: Lex Neva
---
.github/workflows/build.yml | 127 ++++++++++------------
.gitignore | 1 +
Makefile | 8 +-
bin/build-distribution-archives | 10 +-
bin/build-python | 5 -
bin/generate-version-file | 10 ++
bin/inkstitch-fonts-gettext | 8 +-
bin/pyembroidery-gettext | 4 +-
electron/.electron-vue/webpack.renderer.config.js | 18 ++-
electron/.electron-vue/webpack.web.config.js | 18 ++-
electron/src/lib/i18n.js | 28 ++++-
electron/src/main/index.js | 2 -
electron/src/renderer/assets/js/simulator.js | 2 +-
electron/src/renderer/assets/style/simulator.css | 28 ++++-
electron/src/renderer/components/Simulator.vue | 6 +-
electron/src/renderer/main.js | 2 +-
icons/inkstitch_colour_logo.svg | 27 +++++
inkstitch.py | 30 +++--
lib/api/install.py | 2 +-
lib/api/server.py | 9 +-
lib/api/stitch_plan.py | 4 +-
lib/commands.py | 88 ++++++++-------
lib/debug.py | 37 ++++---
lib/elements/__init__.py | 22 ++--
lib/elements/auto_fill.py | 28 ++++-
lib/elements/clone.py | 75 +++----------
lib/elements/element.py | 56 +++++-----
lib/elements/fill.py | 6 +
lib/elements/image.py | 14 +--
lib/elements/polyline.py | 7 +-
lib/elements/satin_column.py | 47 ++++----
lib/elements/stroke.py | 10 +-
lib/elements/svg_objects.py | 71 ------------
lib/elements/text.py | 14 +--
lib/extensions/__init__.py | 57 ++++++----
lib/extensions/auto_satin.py | 4 +-
lib/extensions/base.py | 45 ++------
lib/extensions/break_apart.py | 12 +-
lib/extensions/cleanup.py | 19 ++--
lib/extensions/commands.py | 4 +-
lib/extensions/convert_to_satin.py | 35 +++---
lib/extensions/cut_satin.py | 6 +-
lib/extensions/embroider.py | 87 ---------------
lib/extensions/embroider_settings.py | 17 +++
lib/extensions/flip.py | 9 +-
lib/extensions/import_threadlist.py | 19 ++--
lib/extensions/input.py | 11 +-
lib/extensions/layer_commands.py | 30 ++---
lib/extensions/lettering.py | 82 +++++++-------
lib/extensions/lettering_custom_font_dir.py | 48 ++++++++
lib/extensions/lettering_generate_json.py | 76 +++++++++++++
lib/extensions/lettering_remove_kerning.py | 30 +++++
lib/extensions/object_commands.py | 2 +-
lib/extensions/output.py | 10 +-
lib/extensions/params.py | 38 +++----
lib/extensions/print_pdf.py | 35 ++++--
lib/extensions/remove_embroidery_settings.py | 20 ++--
lib/extensions/reorder.py | 36 ++++++
lib/extensions/stitch_plan_preview.py | 9 +-
lib/extensions/troubleshoot.py | 27 ++---
lib/extensions/zip.py | 34 +++---
lib/gui/electron.py | 4 +-
lib/gui/presets.py | 4 +-
lib/gui/simulator.py | 26 ++---
lib/i18n.py | 4 +-
lib/inx/__init__.py | 2 +-
lib/inx/about.py | 7 ++
lib/inx/extensions.py | 11 +-
lib/inx/generate.py | 4 +-
lib/inx/info.py | 9 ++
lib/inx/inputs.py | 2 +-
lib/inx/outputs.py | 13 ++-
lib/inx/utils.py | 31 ++++--
lib/lettering/__init__.py | 2 +-
lib/lettering/font.py | 44 +++++---
lib/lettering/font_variant.py | 22 ++--
lib/lettering/glyph.py | 31 +++---
lib/lettering/kerning.py | 69 ++++++++++++
lib/output.py | 7 +-
lib/stitch_plan/stitch_plan.py | 4 +-
lib/stitches/__init__.py | 6 +-
lib/stitches/auto_fill.py | 15 +--
lib/stitches/auto_satin.py | 29 +++--
lib/stitches/fill.py | 5 +-
lib/stitches/running_stitch.py | 2 +-
lib/svg/guides.py | 8 +-
lib/svg/path.py | 29 ++---
lib/svg/rendering.py | 59 +++++-----
lib/svg/svg.py | 3 +-
lib/svg/tags.py | 5 +-
lib/svg/units.py | 25 +++--
lib/threads/__init__.py | 6 +-
lib/threads/catalog.py | 2 +-
lib/threads/color.py | 9 +-
lib/threads/palette.py | 5 +-
lib/utils/dotdict.py | 2 +-
lib/utils/geometry.py | 6 +-
lib/utils/inkscape.py | 4 +-
lib/utils/io.py | 22 ++--
lib/utils/version.py | 17 +++
print/resources/inkstitch.js | 4 +-
print/resources/style.css | 3 +-
print/templates/operator_detailedview.html | 2 +-
pyembroidery | 2 +-
requirements.txt | 14 +--
templates/about.xml | 28 +++++
templates/auto_satin.inx | 19 ----
templates/auto_satin.xml | 19 ++++
templates/break_apart.inx | 24 ----
templates/break_apart.xml | 24 ++++
templates/cleanup.inx | 24 ----
templates/cleanup.xml | 24 ++++
templates/convert_to_satin.inx | 17 ---
templates/convert_to_satin.xml | 17 +++
templates/cut_satin.inx | 17 ---
templates/cut_satin.xml | 17 +++
templates/embroider.inx | 28 -----
templates/embroider.xml | 18 +++
templates/embroider_settings.xml | 21 ++++
templates/flip.inx | 17 ---
templates/flip.xml | 17 +++
templates/global_commands.inx | 22 ----
templates/global_commands.xml | 22 ++++
templates/import_threadlist.inx | 27 -----
templates/import_threadlist.xml | 25 +++++
templates/input.inx | 15 ---
templates/input.xml | 15 +++
templates/install.inx | 15 ---
templates/install.xml | 15 +++
templates/layer_commands.inx | 21 ----
templates/layer_commands.xml | 21 ++++
templates/lettering.inx | 15 ---
templates/lettering.xml | 15 +++
templates/lettering_custom_font_dir.xml | 26 +++++
templates/lettering_generate_json.xml | 46 ++++++++
templates/lettering_remove_kerning.xml | 28 +++++
templates/object_commands.inx | 20 ----
templates/object_commands.xml | 20 ++++
templates/output.inx | 19 ----
templates/output.xml | 19 ++++
templates/output_params_txt.xml | 2 +-
templates/params.inx | 15 ---
templates/params.xml | 15 +++
templates/print.inx | 17 ---
templates/print.xml | 17 +++
templates/remove_embroidery_settings.inx | 23 ----
templates/remove_embroidery_settings.xml | 23 ++++
templates/reorder.xml | 15 +++
templates/simulator.inx | 17 ---
templates/simulator.xml | 17 +++
templates/stitch_plan_preview.inx | 17 ---
templates/stitch_plan_preview.xml | 17 +++
templates/troubleshoot.inx | 17 ---
templates/troubleshoot.xml | 17 +++
templates/zip.inx | 21 ----
templates/zip.xml | 23 ++++
156 files changed, 1824 insertions(+), 1392 deletions(-)
create mode 100755 bin/generate-version-file
create mode 100644 icons/inkstitch_colour_logo.svg
delete mode 100644 lib/elements/svg_objects.py
delete mode 100644 lib/extensions/embroider.py
create mode 100644 lib/extensions/embroider_settings.py
create mode 100644 lib/extensions/lettering_custom_font_dir.py
create mode 100644 lib/extensions/lettering_generate_json.py
create mode 100644 lib/extensions/lettering_remove_kerning.py
create mode 100644 lib/extensions/reorder.py
create mode 100755 lib/inx/about.py
create mode 100755 lib/inx/info.py
create mode 100644 lib/lettering/kerning.py
create mode 100644 lib/utils/version.py
create mode 100644 templates/about.xml
delete mode 100644 templates/auto_satin.inx
create mode 100644 templates/auto_satin.xml
delete mode 100644 templates/break_apart.inx
create mode 100644 templates/break_apart.xml
delete mode 100644 templates/cleanup.inx
create mode 100644 templates/cleanup.xml
delete mode 100644 templates/convert_to_satin.inx
create mode 100644 templates/convert_to_satin.xml
delete mode 100644 templates/cut_satin.inx
create mode 100644 templates/cut_satin.xml
delete mode 100644 templates/embroider.inx
create mode 100644 templates/embroider.xml
create mode 100644 templates/embroider_settings.xml
delete mode 100644 templates/flip.inx
create mode 100644 templates/flip.xml
delete mode 100644 templates/global_commands.inx
create mode 100644 templates/global_commands.xml
delete mode 100644 templates/import_threadlist.inx
create mode 100644 templates/import_threadlist.xml
delete mode 100644 templates/input.inx
create mode 100644 templates/input.xml
delete mode 100644 templates/install.inx
create mode 100644 templates/install.xml
delete mode 100644 templates/layer_commands.inx
create mode 100644 templates/layer_commands.xml
delete mode 100644 templates/lettering.inx
create mode 100644 templates/lettering.xml
create mode 100644 templates/lettering_custom_font_dir.xml
create mode 100644 templates/lettering_generate_json.xml
create mode 100644 templates/lettering_remove_kerning.xml
delete mode 100644 templates/object_commands.inx
create mode 100644 templates/object_commands.xml
delete mode 100644 templates/output.inx
create mode 100644 templates/output.xml
delete mode 100644 templates/params.inx
create mode 100644 templates/params.xml
delete mode 100644 templates/print.inx
create mode 100644 templates/print.xml
delete mode 100644 templates/remove_embroidery_settings.inx
create mode 100644 templates/remove_embroidery_settings.xml
create mode 100644 templates/reorder.xml
delete mode 100644 templates/simulator.inx
create mode 100644 templates/simulator.xml
delete mode 100644 templates/stitch_plan_preview.inx
create mode 100644 templates/stitch_plan_preview.xml
delete mode 100644 templates/troubleshoot.inx
create mode 100644 templates/troubleshoot.xml
delete mode 100644 templates/zip.inx
create mode 100644 templates/zip.xml
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 76f221a9..0da74dee 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,156 +10,149 @@ jobs:
linux:
runs-on: ubuntu-16.04
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
with:
submodules: recursive
+ - uses: actions/setup-python@v2
+ with:
+ python-version: '3.9'
- uses: actions/setup-node@v1
with:
- node-version: '11.x'
- - name: download dependencies
- shell: bash
- run: |
- curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2
+ node-version: '15.x'
+
+ - uses: actions/cache@v2
+ id: pip-cache
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-16.04-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-16.04-pip-
+
+ - name: Get yarn cache directory path
+ id: yarn-cache-dir-path
+ run: echo "::set-output name=dir::$(yarn cache dir)"
+
+ - uses: actions/cache@v2
+ id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
- name: install dependencies
shell: bash
run: |
- # I'd love to use a setup-python action but it seems to give a
- # python that doesn't support unicode. See:
- # https://github.com/actions/setup-python/issues/23
-
sudo apt-get update
-
- sudo apt-get install python2.7
python -m pip install --upgrade pip
+ python -m pip install wheel
sudo apt-get install gettext
# for wxPython
- sudo apt-get install glib-networking libsdl1.2-dev
+ sudo apt install glib-networking libsdl1.2-dev
# for PyGObject
- sudo apt install libgirepository1.0-dev
+ sudo apt install libgirepository1.0-dev libcairo2-dev
# for shapely
- sudo apt install libgeos-dev
+ sudo apt install libgeos-dev build-essential libgtk-3-dev
uname -a
python --version
python -m pip --version
python -m pip debug
- # wxPython doen't publish linux wheels in pypi
- wget -q https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/wxPython-4.0.6-cp27-cp27mu-linux_x86_64.whl
- python -m pip install wxPython*.whl
+ python -m pip install pycairo==1.11.1
+ python -m pip install PyGObject==3.30.5
- python -m pip install PyGObject
+ # colormath - last official release: 3.0.0
+ # we need already submitted fixes - so let's grab them from the github repository
+ python -m pip install git+https://github.com/gtaylor/python-colormath
python -m pip install -r requirements.txt
- python -m pip install pyinstaller==3.3.1
+ python -m pip install pyinstaller
- tar -jxf inkscape-0.92.3.tar.bz2
- rm inkscape-0.92.3.tar.bz2
- mv inkscape-0.92.3 inkscape
-
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
- shell: bash
run: |
make dist
env:
BUILD: linux
- - uses: actions/upload-artifact@master
+ - uses: actions/upload-artifact@v2
with:
name: inkstitch-linux
path: artifacts
windows:
runs-on: windows-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-node@v1
with:
- node-version: '11.x'
- - uses: actions/setup-python@v1
+ node-version: '15.x'
+ - uses: actions/setup-python@v2
with:
- python-version: '2.7.x'
+ python-version: '3.9'
architecture: 'x86'
- uses: microsoft/setup-msbuild@v1.0.2
- - name: download dependencies
- shell: bash
- run: |
- curl -sOL https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.0.0/Shapely-1.6.3-cp27-cp27m-win32.whl
- curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2
- name: install dependencies
shell: bash
run: |
- pip install Shapely-1.6.3-cp27-cp27m-win32.whl
- pip install -r requirements.txt
- pip install pyinstaller==3.3.1
+ python -m pip install --upgrade pip
+ python -m pip install wheel
- # Just using tar -j freezes forever with no output. Heck if I know why. This seems to work.
- bzcat inkscape-0.92.3.tar.bz2 | tar -vxf -
- rm inkscape-0.92.3.tar.bz2
- mv inkscape-0.92.3 inkscape
+ python -m pip install git+https://github.com/gtaylor/python-colormath
+
+ python -m pip install -r requirements.txt
+ python -m pip install pyinstaller
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
- - name: fix geos
- shell: bash
- run: |
- cd "${{ env.pythonLocation }}\Lib/site-packages/shapely/DLLs"
- cp geos_c.dll geos.dll
- shell: bash
run: |
make dist
env:
BUILD: windows
- - uses: actions/upload-artifact@master
+ - uses: actions/upload-artifact@v2
with:
name: inkstitch-windows
path: artifacts
mac:
runs-on: macos-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
with:
submodules: recursive
- - uses: actions/setup-node@v1
+ - uses: actions/setup-python@v2
with:
- node-version: '11.x'
- - uses: actions/setup-python@v1
- with:
- python-version: '2.7.x'
+ python-version: '3.9'
- uses: actions/setup-node@v1
with:
- node-version: '10.x'
- - name: download inkscape
- shell: bash
- run: |
- curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2
+ node-version: '15.x'
- name: install dependencies
shell: bash
run: |
brew update
- # this errors because it installs python3 but python2 is already installed
- brew install gtk+3 pkg-config gobject-introspection libffi gettext || true
+ brew install gtk+3 pkg-config gobject-introspection geos libffi gettext || true
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
-
+
# for msgfmt
echo "/usr/local/opt/gettext/bin" >> $GITHUB_PATH
echo "GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0/" >> $GITHUB_ENV
+ pip install --upgrade pip
pip --version
+ pip install wheel
pip install PyGObject
+ pip install git+https://github.com/gtaylor/python-colormath
+
pip install -r requirements.txt
- pip install pyinstaller==3.3.1
-
- tar -jxf inkscape-0.92.3.tar.bz2
- rm inkscape-0.92.3.tar.bz2
- mv inkscape-0.92.3 inkscape
+ pip install pyinstaller
echo "${{ env.pythonLocation }}/bin" >> $GITHUB_PATH
- shell: bash
@@ -167,7 +160,7 @@ jobs:
make dist
env:
BUILD: osx
- - uses: actions/upload-artifact@master
+ - uses: actions/upload-artifact@v2
with:
name: inkstitch-mac
path: artifacts
diff --git a/.gitignore b/.gitignore
index 4ff89f90..09f99873 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ locales/
/debug.log
/debug.svg
/.idea
+/VERSION
diff --git a/Makefile b/Makefile
index b5bbd4e5..3253a570 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-dist: locales inx
+dist: version locales inx
bash bin/build-python
bash bin/build-electron
bash bin/build-distribution-archives
@@ -8,7 +8,7 @@ distclean:
rm -rf build dist inx locales *.spec *.tar.gz *.zip electron/node_modules electron/dist
.PHONY: inx
-inx: locales
+inx: version locales
mkdir -p inx
python bin/generate-inx-files; \
@@ -49,6 +49,10 @@ locales:
mkdir -p locales; \
fi
+.PHONY: version
+version:
+ bash bin/generate-version-file
+
.PHONY: style
style:
flake8 . --count --max-complexity=10 --max-line-length=150 --statistics --exclude=pyembroidery,__init__.py,electron,build
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives
index 6e11818d..6402122b 100755
--- a/bin/build-distribution-archives
+++ b/bin/build-distribution-archives
@@ -4,12 +4,14 @@ VERSION="$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e
OS="${BUILD:-$(uname)}"
ARCH="$(uname -m)"
-cp -a images/examples palettes symbols fonts dist/inkstitch
-cp -a icons locales print dist/inkstitch/bin
-
if [ "$BUILD" = "osx" ]; then
- cp -a electron/build/mac dist/inkstitch/electron
+ cp -a images/examples palettes symbols fonts LICENSE VERSION dist/inkstitch.app/Contents
+ cp -a icons locales print dist/inkstitch.app/Contents/MacOS
+ cp -a electron/build/mac dist/inkstitch.app/Contents/electron
+ rm -rf dist/inkstitch/
else
+ cp -a images/examples palettes symbols fonts LICENSE VERSION dist/inkstitch
+ cp -a icons locales print dist/inkstitch/bin
cp -a electron/build/*-unpacked dist/inkstitch/electron
fi
diff --git a/bin/build-python b/bin/build-python
index 0dd3e0a0..88e166ae 100755
--- a/bin/build-python
+++ b/bin/build-python
@@ -52,8 +52,3 @@ shopt -s dotglob
mkdir dist/bin
mv dist/inkstitch/* dist/bin
mv dist/bin dist/inkstitch
-
-# on Mac, pyinstaller creates a .app version as well, but we don't need that
-if [ "$BUILD" = "osx" ]; then
- rm -rf dist/inkstitch.app/
-fi
diff --git a/bin/generate-version-file b/bin/generate-version-file
new file mode 100755
index 00000000..36c70944
--- /dev/null
+++ b/bin/generate-version-file
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+VERSION="${GITHUB_REF##*/}"
+OS="${BUILD:-$(uname)}"
+
+if [[ "$VERSION" == "" ]]; then
+ VERSION="Manual Install"
+fi
+
+echo "${VERSION} (${OS})" > VERSION
diff --git a/bin/inkstitch-fonts-gettext b/bin/inkstitch-fonts-gettext
index 8b802fee..24fb9fdf 100755
--- a/bin/inkstitch-fonts-gettext
+++ b/bin/inkstitch-fonts-gettext
@@ -12,8 +12,8 @@ for font in sorted(os.listdir(fonts_dir)):
with open(os.path.join(fonts_dir, font, "font.json")) as font_json:
font_metadata = json.load(font_json)
- print "# L10N name of font in fonts/%s" % font
- print "_(%s)" % repr(font_metadata.get("name", ""))
+ print("# L10N name of font in fonts/%s" % font)
+ print("_(%s)" % repr(font_metadata.get("name", "")))
- print "# L10N description of font in fonts/%s" % font
- print "_(%s)" % repr(font_metadata.get("description", ""))
+ print("# L10N description of font in fonts/%s" % font)
+ print("_(%s)" % repr(font_metadata.get("description", "")))
diff --git a/bin/pyembroidery-gettext b/bin/pyembroidery-gettext
index ac9bd1ab..f4e844b9 100755
--- a/bin/pyembroidery-gettext
+++ b/bin/pyembroidery-gettext
@@ -6,5 +6,5 @@ import pyembroidery
# generate fake python code containing the descriptions of pyembroidery formats
# as gettext calls so that pybabel will extract them into messages.po
for format in pyembroidery.supported_formats():
- print "# L10N description for pyembroidery file format: %s" % format['extension']
- print "_(%s)" % repr(format['description'])
+ print("# L10N description for pyembroidery file format: %s" % format['extension'])
+ print("_(%s)" % repr(format['description']))
diff --git a/electron/.electron-vue/webpack.renderer.config.js b/electron/.electron-vue/webpack.renderer.config.js
index 89f8cd78..ac281db6 100644
--- a/electron/.electron-vue/webpack.renderer.config.js
+++ b/electron/.electron-vue/webpack.renderer.config.js
@@ -103,12 +103,6 @@ let rendererConfig = {
'css-loader',
{
loader: 'sass-loader',
- // Requires sass-loader@^7.0.0
- options: {
- implementation: require('sass'),
- fiber: require('fibers'),
- indentedSyntax: true // optional
- },
// Requires sass-loader@^8.0.0
options: {
implementation: require('sass'),
@@ -132,6 +126,18 @@ let rendererConfig = {
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
+ templateParameters(compilation, assets, options) {
+ return {
+ compilation: compilation,
+ webpack: compilation.getStats().toJson(),
+ webpackConfig: compilation.options,
+ htmlWebpackPlugin: {
+ files: assets,
+ options: options
+ },
+ process
+ }
+ },
minify: {
collapseWhitespace: true,
removeAttributeQuotes: true,
diff --git a/electron/.electron-vue/webpack.web.config.js b/electron/.electron-vue/webpack.web.config.js
index 913518a2..50a73df6 100644
--- a/electron/.electron-vue/webpack.web.config.js
+++ b/electron/.electron-vue/webpack.web.config.js
@@ -77,12 +77,6 @@ let webConfig = {
'css-loader',
{
loader: 'sass-loader',
- // Requires sass-loader@^7.0.0
- options: {
- implementation: require('sass'),
- fiber: require('fibers'),
- indentedSyntax: true // optional
- },
// Requires sass-loader@^8.0.0
options: {
implementation: require('sass'),
@@ -102,6 +96,18 @@ let webConfig = {
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
+ templateParameters(compilation, assets, options) {
+ return {
+ compilation: compilation,
+ webpack: compilation.getStats().toJson(),
+ webpackConfig: compilation.options,
+ htmlWebpackPlugin: {
+ files: assets,
+ options: options
+ },
+ process
+ }
+ },
minify: {
collapseWhitespace: true,
removeAttributeQuotes: true,
diff --git a/electron/src/lib/i18n.js b/electron/src/lib/i18n.js
index 886fd654..4f9395d7 100644
--- a/electron/src/lib/i18n.js
+++ b/electron/src/lib/i18n.js
@@ -1,9 +1,27 @@
-module.exports.selectLanguage = function () {
- ['LANGUAGE', 'LC_ALL', 'LC_MESSAGES', 'LANG'].forEach(language => {
+module.exports.selectLanguage = function (translations) {
+ // get a list of available translations
+ var availableTranslations = ['en_US'];
+ for(var k in translations) availableTranslations.push(k);
+
+ var lang = undefined;
+
+ // get system language / Inkscape language
+ ['LANG', 'LC_MESSAGES', 'LC_ALL', 'LANGUAGE'].forEach(language => {
if (process.env[language]) {
- return process.env[language].split(":")[0]
+ // split encoding information, we don't need it
+ var current_lang = process.env[language].split(".")[0];
+ if (current_lang.length == 2) {
+ // current language has only two letters (e.g. en),
+ // compare with available languages and if present, set to a long locale name (e.g. en_US)
+ lang = availableTranslations.find(elem => elem.startsWith(current_lang));
+ } else {
+ lang = current_lang;
+ }
}
})
-
- return "en_US"
+ // set default language
+ if (lang === undefined) {
+ lang = "en_US"
+ }
+ return lang
}
diff --git a/electron/src/main/index.js b/electron/src/main/index.js
index f7fb9437..14a3da55 100644
--- a/electron/src/main/index.js
+++ b/electron/src/main/index.js
@@ -61,9 +61,7 @@ function createWindow() {
app.on('ready', createWindow)
app.on('window-all-closed', () => {
- if (process.platform !== 'darwin') {
app.quit()
- }
})
app.on('activate', () => {
diff --git a/electron/src/renderer/assets/js/simulator.js b/electron/src/renderer/assets/js/simulator.js
index 638f0ca2..6c251a59 100644
--- a/electron/src/renderer/assets/js/simulator.js
+++ b/electron/src/renderer/assets/js/simulator.js
@@ -126,7 +126,7 @@ export default {
return ""
}
- let label = "STITCH"
+ let label = this.$gettext("STITCH")
switch (true) {
case stitch.jump:
label = this.$gettext("JUMP")
diff --git a/electron/src/renderer/assets/style/simulator.css b/electron/src/renderer/assets/style/simulator.css
index 7da1d9ef..30e601b0 100644
--- a/electron/src/renderer/assets/style/simulator.css
+++ b/electron/src/renderer/assets/style/simulator.css
@@ -20,7 +20,18 @@
}
button {
- color: rgb(0, 51, 153)
+ color: rgb(0, 51, 153);
+ align-items: flex-start;
+ text-align: center;
+ cursor: default;
+ background-color: buttonface;
+ box-sizing: border-box;
+ padding: 2px 6px 3px;
+ border-width: 2px;
+ border-style: outset;
+ border-color: buttonface;
+ border-image: initial;
+ margin-bottom: 5px;
}
.fa-spin-fast {
@@ -59,11 +70,13 @@ button {
text-align: center;
flex: 1;
white-space: nowrap;
+ margin: 0 5px;
}
fieldset {
border: 2px solid rgb(0, 51, 153);
position: relative;
+ padding: 0 5px
}
.window-controls {
@@ -142,6 +155,10 @@ fieldset.show-commands {
text-align: left;
}
+fieldset.show-commands legend {
+ text-align: center;
+}
+
fieldset.show-commands span {
display: inline-block;
vertical-align: top;
@@ -152,7 +169,7 @@ fieldset.show-commands span.npp {
}
fieldset.show-commands span:first-of-type {
- padding-right: 12px;
+ padding: 0 5px;
}
button.pressed {
@@ -164,8 +181,7 @@ button.pressed {
}
.slider-container {
- margin-top: 25px;
- margin-bottom: 25px;
+ margin: 25px 5px;
flex-grow: 0;
}
@@ -244,12 +260,15 @@ button.pressed {
width: 4rem;
float: right;
font-size: 1rem;
+ border-style: inset;
+ padding: 0 3px;
}
.simulator {
display: flex;
flex-direction: column;
height: 95vh;
+ margin: 10px;
}
.current-command {
@@ -269,6 +288,7 @@ div.simulator::v-deep svg.simulation {
div.simulator::v-deep svg.simulation-scale {
height: 50px;
order: -1;
+ margin-left: 5px;
}
div.simulator::v-deep .simulation-scale-label {
diff --git a/electron/src/renderer/components/Simulator.vue b/electron/src/renderer/components/Simulator.vue
index c6a190fb..66abadd6 100644
--- a/electron/src/renderer/components/Simulator.vue
+++ b/electron/src/renderer/components/Simulator.vue
@@ -189,7 +189,9 @@
{{currentCommand}}
{{ _('Total stops') }}: {{ job.num_stops }}
diff --git a/pyembroidery b/pyembroidery
index c0b817d0..d23ead18 160000
--- a/pyembroidery
+++ b/pyembroidery
@@ -1 +1 @@
-Subproject commit c0b817d0626140221e707e88be571728c393a3ca
+Subproject commit d23ead18908706a5db2365441d4bef6884e99ba9
diff --git a/requirements.txt b/requirements.txt
index 3bf490a6..84ba47d0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,19 +1,19 @@
./pyembroidery
+inkex
backports.functools_lru_cache
-wxPython==4.0.6
-networkx==2.2
-shapely==1.6.3
+wxPython
+networkx
+shapely
lxml
appdirs
-numpy<1.16.0
+numpy<=1.17.4
jinja2>2.9
requests
colormath
stringcase
tinycss2
-
-# We're not ready for flask 1.0 yet. Logging changed, among othe things.
-flask==0.*
+flask
+fonttools
pywinutils; sys.platform == 'win32'
pywin32; sys.platform == 'win32'
diff --git a/templates/about.xml b/templates/about.xml
new file mode 100644
index 00000000..68609d95
--- /dev/null
+++ b/templates/about.xml
@@ -0,0 +1,28 @@
+
+
+ {% trans %}About{% endtrans %}
+ org.inkstitch.about.{{ locale }}
+
+
+ {{ image_path }}inkstitch_colour_logo.svg
+
+
+
+
+
+
+
+
+
+{{ inkstitch_license }}
+
+
+
+
+ all
+
+
+
+
+
+
diff --git a/templates/auto_satin.inx b/templates/auto_satin.inx
deleted file mode 100644
index 673ac51e..00000000
--- a/templates/auto_satin.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- {% trans %}Auto-Route Satin Columns{% endtrans %}
- org.inkstitch.auto_satin.{{ locale }}
- true
- false
- auto_satin
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/auto_satin.xml b/templates/auto_satin.xml
new file mode 100644
index 00000000..673ac51e
--- /dev/null
+++ b/templates/auto_satin.xml
@@ -0,0 +1,19 @@
+
+
+ {% trans %}Auto-Route Satin Columns{% endtrans %}
+ org.inkstitch.auto_satin.{{ locale }}
+ true
+ false
+ auto_satin
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/break_apart.inx b/templates/break_apart.inx
deleted file mode 100644
index 83333ad1..00000000
--- a/templates/break_apart.inx
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- {% trans %}Break Apart Fill Objects{% endtrans %}
- org.inkstitch.break_apart.{{ locale }}
- break_apart
-
- all
-
-
-
-
-
-
-
- {% trans %}This extension will try to repair fill shapes and break them apart if necessary. Holes will be retained. Use on simple or overlapping shapes.{% endtrans %}
-
-
-
-
-
-
-
diff --git a/templates/break_apart.xml b/templates/break_apart.xml
new file mode 100644
index 00000000..83333ad1
--- /dev/null
+++ b/templates/break_apart.xml
@@ -0,0 +1,24 @@
+
+
+ {% trans %}Break Apart Fill Objects{% endtrans %}
+ org.inkstitch.break_apart.{{ locale }}
+ break_apart
+
+ all
+
+
+
+
+
+
+
+ {% trans %}This extension will try to repair fill shapes and break them apart if necessary. Holes will be retained. Use on simple or overlapping shapes.{% endtrans %}
+
+
+
+
+
+
+
diff --git a/templates/cleanup.inx b/templates/cleanup.inx
deleted file mode 100644
index 4cf11ce1..00000000
--- a/templates/cleanup.inx
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
- {% trans %}Cleanup Document{% endtrans %}
- org.inkstitch.cleanup.{{ locale }}
- {% trans %}Use this extension to remove small objects from the document.{% endtrans %}
- true
- 20
- true
- 5
- cleanup
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/cleanup.xml b/templates/cleanup.xml
new file mode 100644
index 00000000..4cf11ce1
--- /dev/null
+++ b/templates/cleanup.xml
@@ -0,0 +1,24 @@
+
+
+ {% trans %}Cleanup Document{% endtrans %}
+ org.inkstitch.cleanup.{{ locale }}
+ {% trans %}Use this extension to remove small objects from the document.{% endtrans %}
+ true
+ 20
+ true
+ 5
+ cleanup
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/convert_to_satin.inx b/templates/convert_to_satin.inx
deleted file mode 100644
index 80f0b678..00000000
--- a/templates/convert_to_satin.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- {% trans %}Convert Line to Satin{% endtrans %}
- org.inkstitch.convert_to_satin.{{ locale }}
- convert_to_satin
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/convert_to_satin.xml b/templates/convert_to_satin.xml
new file mode 100644
index 00000000..80f0b678
--- /dev/null
+++ b/templates/convert_to_satin.xml
@@ -0,0 +1,17 @@
+
+
+ {% trans %}Convert Line to Satin{% endtrans %}
+ org.inkstitch.convert_to_satin.{{ locale }}
+ convert_to_satin
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/cut_satin.inx b/templates/cut_satin.inx
deleted file mode 100644
index b780543a..00000000
--- a/templates/cut_satin.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- {% trans %}Cut Satin Column{% endtrans %}
- org.inkstitch.cut_satin.{{ locale }}
- cut_satin
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/cut_satin.xml b/templates/cut_satin.xml
new file mode 100644
index 00000000..b780543a
--- /dev/null
+++ b/templates/cut_satin.xml
@@ -0,0 +1,17 @@
+
+
+ {% trans %}Cut Satin Column{% endtrans %}
+ org.inkstitch.cut_satin.{{ locale }}
+ cut_satin
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/embroider.inx b/templates/embroider.inx
deleted file mode 100644
index b79c2f5f..00000000
--- a/templates/embroider.inx
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- {% trans %}Embroider{% endtrans %}
- org.inkstitch.embroider.{{ locale }}
- 3.0
- true
-
- {% for format, description in formats %}
- <_option value="{{ format }}">{{ _(description) }} ({{ format | upper }})
- {% endfor %}
- {% for format, description in debug_formats %}
- <_option value="{{ format }}">{{ _(description) }} ({{ format | upper }}) [{{ _("DEBUG") }}]
- {% endfor %}
-
-
- embroider
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/embroider.xml b/templates/embroider.xml
new file mode 100644
index 00000000..ff56ac7d
--- /dev/null
+++ b/templates/embroider.xml
@@ -0,0 +1,18 @@
+
+
+ {% trans %}Embroider{% endtrans %}
+ org.inkstitch.embroider.{{ locale }}
+ {% trans %}Create a stitch file{% endtrans %}
+ {% trans %}Save your embroidery file through | File > Save a Copy ... |{% endtrans %}
+ {% trans %}Choose from listed embroidery file formats and save.{% endtrans %}
+
+ {% trans %}Multiple file formats can be saved by choosing the zip file format.{% endtrans %}
+
+ all
+
+
+
+
+
+
+
diff --git a/templates/embroider_settings.xml b/templates/embroider_settings.xml
new file mode 100644
index 00000000..51ce9d16
--- /dev/null
+++ b/templates/embroider_settings.xml
@@ -0,0 +1,21 @@
+
+
+ {% trans %}Settings{% endtrans %}
+ org.inkstitch.embroider_settings.{{ locale }}
+ embroider_settings
+
+ all
+
+
+
+
+
+ {% trans %}Output Settings{% endtrans %}
+
+ 3
+
+
diff --git a/templates/flip.inx b/templates/flip.inx
deleted file mode 100644
index 29b11457..00000000
--- a/templates/flip.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- {% trans %}Flip Satin Column Rails{% endtrans %}
- org.inkstitch.flip_satins.{{ locale }}
- flip
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/flip.xml b/templates/flip.xml
new file mode 100644
index 00000000..29b11457
--- /dev/null
+++ b/templates/flip.xml
@@ -0,0 +1,17 @@
+
+
+ {% trans %}Flip Satin Column Rails{% endtrans %}
+ org.inkstitch.flip_satins.{{ locale }}
+ flip
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/global_commands.inx b/templates/global_commands.inx
deleted file mode 100644
index d37e2e41..00000000
--- a/templates/global_commands.inx
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- {% trans %}Add Commands{% endtrans %}
- org.inkstitch.global_commands.{{ locale }}
- {% trans %}These commands affect the entire embroidery design.{% endtrans %}
- {% for command, description in global_commands %}
- false
- {% endfor %}
- global_commands
-
- all
-
-
- {# L10N Inkscape submenu under Extensions -> Ink/Stitch #}
-
-
-
-
-
-
diff --git a/templates/global_commands.xml b/templates/global_commands.xml
new file mode 100644
index 00000000..d37e2e41
--- /dev/null
+++ b/templates/global_commands.xml
@@ -0,0 +1,22 @@
+
+
+ {% trans %}Add Commands{% endtrans %}
+ org.inkstitch.global_commands.{{ locale }}
+ {% trans %}These commands affect the entire embroidery design.{% endtrans %}
+ {% for command, description in global_commands %}
+ false
+ {% endfor %}
+ global_commands
+
+ all
+
+
+ {# L10N Inkscape submenu under Extensions -> Ink/Stitch #}
+
+
+
+
+
+
diff --git a/templates/import_threadlist.inx b/templates/import_threadlist.inx
deleted file mode 100644
index 081a881a..00000000
--- a/templates/import_threadlist.inx
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
- {% trans %}Import Threadlist{% endtrans %}
- org.inkstitch.import_threadlist.{{ locale }}
- import_threadlist
-
- {{ _("Enter path to file") }}
-
-
-
-
-
- {%- for item in threadcatalog %}
- - {{ item }}
- {%- endfor %}
-
-
- all
-
-
-
-
-
-
diff --git a/templates/import_threadlist.xml b/templates/import_threadlist.xml
new file mode 100644
index 00000000..5db963b6
--- /dev/null
+++ b/templates/import_threadlist.xml
@@ -0,0 +1,25 @@
+
+
+ {% trans %}Import Threadlist{% endtrans %}
+ org.inkstitch.import_threadlist.{{ locale }}
+ import_threadlist
+
+
+
+
+
+
+ {%- for item in threadcatalog %}
+ - {{ item }}
+ {%- endfor %}
+
+
+ all
+
+
+
+
+
+
diff --git a/templates/input.inx b/templates/input.inx
deleted file mode 100644
index 5f4a4610..00000000
--- a/templates/input.inx
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- {{ format | upper }} file input
- org.inkstitch.input.{{ format }}.{{ locale }}
-
- .{{ format }}
- application/x-embroidery-{{ format }}
- <_filetypename>Ink/Stitch: {{ _(description) }} (.{{ format }})
- <_filetypetooltip>{{ _("convert %(file_extension)s file to Ink/Stitch manual-stitch paths") % dict(file_extension=format.upper()) }}
-
- input
-
-
diff --git a/templates/input.xml b/templates/input.xml
new file mode 100644
index 00000000..5f4a4610
--- /dev/null
+++ b/templates/input.xml
@@ -0,0 +1,15 @@
+
+
+ {{ format | upper }} file input
+ org.inkstitch.input.{{ format }}.{{ locale }}
+
+ .{{ format }}
+ application/x-embroidery-{{ format }}
+ <_filetypename>Ink/Stitch: {{ _(description) }} (.{{ format }})
+ <_filetypetooltip>{{ _("convert %(file_extension)s file to Ink/Stitch manual-stitch paths") % dict(file_extension=format.upper()) }}
+
+ input
+
+
diff --git a/templates/install.inx b/templates/install.inx
deleted file mode 100644
index ffcb9b7b..00000000
--- a/templates/install.inx
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- {% trans %}Install thread color palettes for Inkscape{% endtrans %}
- org.inkstitch.install.{{ locale }}
- install
-
- all
-
-
-
-
-
-
diff --git a/templates/install.xml b/templates/install.xml
new file mode 100644
index 00000000..764027b8
--- /dev/null
+++ b/templates/install.xml
@@ -0,0 +1,15 @@
+
+
+ {% trans %}Install thread color palettes for Inkscape{% endtrans %}
+ org.inkstitch.install.{{ locale }}
+ install
+
+ all
+
+
+
+
+
+
diff --git a/templates/layer_commands.inx b/templates/layer_commands.inx
deleted file mode 100644
index 249d536e..00000000
--- a/templates/layer_commands.inx
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- {% trans %}Add Layer Commands{% endtrans %}
- org.inkstitch.layer_commands.{{ locale }}
- {% trans %}Commands will be added to the currently-selected layer.{% endtrans %}
- {% for command, description in layer_commands %}
- false
- {% endfor %}
- layer_commands
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/layer_commands.xml b/templates/layer_commands.xml
new file mode 100644
index 00000000..249d536e
--- /dev/null
+++ b/templates/layer_commands.xml
@@ -0,0 +1,21 @@
+
+
+ {% trans %}Add Layer Commands{% endtrans %}
+ org.inkstitch.layer_commands.{{ locale }}
+ {% trans %}Commands will be added to the currently-selected layer.{% endtrans %}
+ {% for command, description in layer_commands %}
+ false
+ {% endfor %}
+ layer_commands
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/lettering.inx b/templates/lettering.inx
deleted file mode 100644
index 65eee8a1..00000000
--- a/templates/lettering.inx
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- {% trans %}Lettering{% endtrans %}
- org.inkstitch.lettering.{{ locale }}
- lettering
-
- all
-
-
-
-
-
-
diff --git a/templates/lettering.xml b/templates/lettering.xml
new file mode 100644
index 00000000..6dea9e93
--- /dev/null
+++ b/templates/lettering.xml
@@ -0,0 +1,15 @@
+
+
+ {% trans %}Lettering{% endtrans %}
+ org.inkstitch.lettering.{{ locale }}
+ lettering
+
+ all
+
+
+
+
+
+
diff --git a/templates/lettering_custom_font_dir.xml b/templates/lettering_custom_font_dir.xml
new file mode 100644
index 00000000..b08c37d6
--- /dev/null
+++ b/templates/lettering_custom_font_dir.xml
@@ -0,0 +1,26 @@
+
+
+ {% trans %}Custom font directory{% endtrans %}
+ org.inkstitch.lettering_custom_font_dir.{{ locale }}
+ lettering_custom_font_dir
+
+ all
+
+
+
+
+
+
+
+ {% trans %}Set a custom directory for additional fonts to be used with the lettering tool.{% endtrans %}
+
+
+
+
+
+ {% trans %}Usage: Create a subdirectory for each font you add.{% endtrans %}
+
+
+
diff --git a/templates/lettering_generate_json.xml b/templates/lettering_generate_json.xml
new file mode 100644
index 00000000..5f4907f7
--- /dev/null
+++ b/templates/lettering_generate_json.xml
@@ -0,0 +1,46 @@
+
+
+ {% trans %}Generate JSON{% endtrans %}
+ org.inkstitch.lettering_generate_json.{{ locale }}
+ lettering_generate_json
+
+ all
+
+
+
+
+
+
+
+ {% trans %}Generates font.json which can be used by the lettering tool.{% endtrans %}
+
+
+
+
+
+
+
+
+ {% trans %}Insert a font SVG file with kerning information.{% endtrans %}
+
+
+
+
+ true
+ true
+
+ �
+
+
+ 1
+ 1
+
+
+
+
+
+
diff --git a/templates/lettering_remove_kerning.xml b/templates/lettering_remove_kerning.xml
new file mode 100644
index 00000000..5657e003
--- /dev/null
+++ b/templates/lettering_remove_kerning.xml
@@ -0,0 +1,28 @@
+
+
+ {% trans %}Remove Kerning{% endtrans %}
+ org.inkstitch.lettering_remove_kerning.{{ locale }}
+ lettering_remove_kerning
+
+ all
+
+
+
+
+
+
+
+ {% trans %}Removes Kerning information from given SVG files{% endtrans %}
+
+
+
+ ⚠ {% trans %}Make sure you keep a copy of the original file. After running this extension kerning information will be lost unrevertably from these files.{% endtrans %}
+
+
+
+
+
+
+
diff --git a/templates/object_commands.inx b/templates/object_commands.inx
deleted file mode 100644
index affe7584..00000000
--- a/templates/object_commands.inx
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
- {% trans %}Attach Commands to Selected Objects{% endtrans %}
- org.inkstitch.commands.{{ locale }}
- {% for command, description in object_commands %}
- false
- {% endfor %}
- object_commands
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/object_commands.xml b/templates/object_commands.xml
new file mode 100644
index 00000000..affe7584
--- /dev/null
+++ b/templates/object_commands.xml
@@ -0,0 +1,20 @@
+
+
+ {% trans %}Attach Commands to Selected Objects{% endtrans %}
+ org.inkstitch.commands.{{ locale }}
+ {% for command, description in object_commands %}
+ false
+ {% endfor %}
+ object_commands
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/output.inx b/templates/output.inx
deleted file mode 100644
index ffff4be9..00000000
--- a/templates/output.inx
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- {{ format | upper }} file output
- org.inkstitch.output.{{ format }}.{{ locale }}
-
- output
- {{ format }}
- {% set params = "output_params_" + format + ".xml" %}
- {% include params ignore missing %}
-
-
diff --git a/templates/output.xml b/templates/output.xml
new file mode 100644
index 00000000..545c3d28
--- /dev/null
+++ b/templates/output.xml
@@ -0,0 +1,19 @@
+
+
+ {{ format | upper }} file output
+ org.inkstitch.output.{{ format }}.{{ locale }}
+
+ output
+ {{ format }}
+ {% set params = "output_params_" + format + ".xml" %}
+ {% include params ignore missing %}
+
+
diff --git a/templates/output_params_txt.xml b/templates/output_params_txt.xml
index c8ca35ee..8b7f66f5 100644
--- a/templates/output_params_txt.xml
+++ b/templates/output_params_txt.xml
@@ -36,6 +36,6 @@
gui-description="{{ _("minimum spindle speed value (grbl $31 setting)") }}" min="-1" max="1000000000">-1
-1
- -1
+ -1
diff --git a/templates/params.inx b/templates/params.inx
deleted file mode 100644
index a2dc89a3..00000000
--- a/templates/params.inx
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- {% trans %}Params{% endtrans %}
- org.inkstitch.params.{{ locale }}
- params
-
- all
-
-
-
-
-
-
diff --git a/templates/params.xml b/templates/params.xml
new file mode 100644
index 00000000..4ceb9020
--- /dev/null
+++ b/templates/params.xml
@@ -0,0 +1,15 @@
+
+
+ {% trans %}Params{% endtrans %}
+ org.inkstitch.params.{{ locale }}
+ params
+
+ all
+
+
+
+
+
+
diff --git a/templates/print.inx b/templates/print.inx
deleted file mode 100644
index 33d8b25c..00000000
--- a/templates/print.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- {% trans %}PDF Export{% endtrans %}
- org.inkstitch.print.{{ locale }}
- print
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/print.xml b/templates/print.xml
new file mode 100644
index 00000000..410f9b54
--- /dev/null
+++ b/templates/print.xml
@@ -0,0 +1,17 @@
+
+
+ {% trans %}PDF Export{% endtrans %}
+ org.inkstitch.print.{{ locale }}
+ print
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/remove_embroidery_settings.inx b/templates/remove_embroidery_settings.inx
deleted file mode 100644
index c83cc1b8..00000000
--- a/templates/remove_embroidery_settings.inx
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- {% trans %}Remove embroidery settings{% endtrans %}
- org.inkstitch.remove_embroidery_settings.{{ locale }}
- {% trans %}Use this extension to remove the information Ink/Stitch has stored in your document. This can be especially useful if you copy and paste objects from an embroidery design into another document.{% endtrans %}
- true
- false
- false
- remove_embroidery_settings
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/remove_embroidery_settings.xml b/templates/remove_embroidery_settings.xml
new file mode 100644
index 00000000..c83cc1b8
--- /dev/null
+++ b/templates/remove_embroidery_settings.xml
@@ -0,0 +1,23 @@
+
+
+ {% trans %}Remove embroidery settings{% endtrans %}
+ org.inkstitch.remove_embroidery_settings.{{ locale }}
+ {% trans %}Use this extension to remove the information Ink/Stitch has stored in your document. This can be especially useful if you copy and paste objects from an embroidery design into another document.{% endtrans %}
+ true
+ false
+ false
+ remove_embroidery_settings
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/reorder.xml b/templates/reorder.xml
new file mode 100644
index 00000000..7e002616
--- /dev/null
+++ b/templates/reorder.xml
@@ -0,0 +1,15 @@
+
+
+ {% trans %}Reorder{% endtrans %}
+ org.inkstitch.reorder.{{ locale }}
+ reorder
+
+ all
+
+
+
+
+
+
diff --git a/templates/simulator.inx b/templates/simulator.inx
deleted file mode 100644
index dfa6b34a..00000000
--- a/templates/simulator.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- {% trans %}Simulator / Realistic Preview{% endtrans %}
- org.inkstitch.simulator.{{ locale }}
- simulator
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/simulator.xml b/templates/simulator.xml
new file mode 100644
index 00000000..029d8b37
--- /dev/null
+++ b/templates/simulator.xml
@@ -0,0 +1,17 @@
+
+
+ {% trans %}Simulator / Realistic Preview{% endtrans %}
+ org.inkstitch.simulator.{{ locale }}
+ simulator
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/stitch_plan_preview.inx b/templates/stitch_plan_preview.inx
deleted file mode 100644
index 72ea7f04..00000000
--- a/templates/stitch_plan_preview.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- {% trans %}Stitch Plan Preview{% endtrans %}
- org.inkstitch.stitch_plan_preview.{{ locale }}
- stitch_plan_preview
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/stitch_plan_preview.xml b/templates/stitch_plan_preview.xml
new file mode 100644
index 00000000..72ea7f04
--- /dev/null
+++ b/templates/stitch_plan_preview.xml
@@ -0,0 +1,17 @@
+
+
+ {% trans %}Stitch Plan Preview{% endtrans %}
+ org.inkstitch.stitch_plan_preview.{{ locale }}
+ stitch_plan_preview
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/troubleshoot.inx b/templates/troubleshoot.inx
deleted file mode 100644
index 02df8ddc..00000000
--- a/templates/troubleshoot.inx
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- {% trans %}Troubleshoot Objects{% endtrans %}
- org.inkstitch.troubleshoot.{{ locale }}
- troubleshoot
-
- all
-
-
-
-
-
-
-
-
diff --git a/templates/troubleshoot.xml b/templates/troubleshoot.xml
new file mode 100644
index 00000000..02df8ddc
--- /dev/null
+++ b/templates/troubleshoot.xml
@@ -0,0 +1,17 @@
+
+
+ {% trans %}Troubleshoot Objects{% endtrans %}
+ org.inkstitch.troubleshoot.{{ locale }}
+ troubleshoot
+
+ all
+
+
+
+
+
+
+
+
diff --git a/templates/zip.inx b/templates/zip.inx
deleted file mode 100644
index 42623019..00000000
--- a/templates/zip.inx
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- embroidery ZIP file output
- org.inkstitch.output.zip.{{ locale }}
-
- {%- for format, description in formats %}
- false
- {%- endfor %}
- false
- false
- zip
-
-
diff --git a/templates/zip.xml b/templates/zip.xml
new file mode 100644
index 00000000..4d620424
--- /dev/null
+++ b/templates/zip.xml
@@ -0,0 +1,23 @@
+
+
+ embroidery ZIP file output
+ org.inkstitch.output.zip.{{ locale }}
+
+ {%- for format, description, mimetype, category in formats %}
+ {%- if category == "embroidery" %}
+ false
+ {%- endif %}
+ {%- endfor %}
+ false
+ false
+ zip
+
+
--
cgit v1.3.1