From acaebaa956006a0fa064c2361b47f902a8a50b77 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 23 Jan 2018 20:13:37 -0500 Subject: add params for "TRIM after" and "STOP after" (#29) * adds new options to Params: "TRIM after" and "STOP after" * adds tooltip support to Params * inkstitch now includes libembroidery and can directly output any supported file type * this avoids the need for `libembroidery-convert` and compiling embroidermodder! * TRIM support for DST format (inserts 3 JUMPs) * STOP command supported as an extra color change that the operator can assign to code C00 * TRIMs cause the following jump stitch not to be displayed in the Embroidery layer --- bin/build-dist | 3 +++ bin/embroider | 21 --------------------- bin/embroider-remote | 27 --------------------------- bin/gen-format-list | 19 +++++++++++++++++++ 4 files changed, 22 insertions(+), 48 deletions(-) delete mode 100755 bin/embroider delete mode 100755 bin/embroider-remote create mode 100755 bin/gen-format-list (limited to 'bin') diff --git a/bin/build-dist b/bin/build-dist index f3090178..4f134aab 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -18,6 +18,9 @@ pyinstaller_args+="--hidden-import gi.repository.Gtk " # This lets pyinstaller see inkex.py, etc. pyinstaller_args+="-p /usr/share/inkscape/extensions " +# for libembroidery +pyinstaller_args+="-p embroidermodder/experimental/python/binding " + mkdir -p dist/inkstitch/bin for extension in "$@"; do # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of diff --git a/bin/embroider b/bin/embroider deleted file mode 100755 index ee419f3e..00000000 --- a/bin/embroider +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# /etc/fstab entry: /dev/disk/by-id/usb-B-EMB_USB_RAM_Disk_INST_0-0:0-part1 /mnt/embroidery vfat user,uid=1000,gid=1000,nobootwait,noauto 0 0 - - -set -e - -if [[ "$1" == *.csv ]]; then - pes=$(mktemp /tmp/XXXXXXXXXXX.pes) - libembroidery-convert "$1" "$pes" - file="$pes" -else - file="$1" -fi - -( - mount /mnt/embroidery && \ - rm -f /mnt/embroidery/* && \ - cp $file /mnt/embroidery/embroidery.pes && \ - umount /mnt/embroidery -) || echo '(local) failed to upload embroidery :(' diff --git a/bin/embroider-remote b/bin/embroider-remote deleted file mode 100755 index 2b943fe5..00000000 --- a/bin/embroider-remote +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# This tool converts a .CSV file to a .PES file and uploads it to my embroidery -# machine, which is connected to my home server. This way, I can embroider from my -# laptop over my wifi without having to connect the sewing machine to my laptop every -# time. - -# /etc/fstab entry: /dev/disk/by-id/usb-B-EMB_USB_RAM_Disk_INST_0-0:0-part1 /mnt/embroidery vfat user,uid=1000,gid=1000,nobootwait,noauto 0 0 - -HOST=myhomeserver.local - -set -e - -if [[ "$1" == *.csv ]]; then - pes=$(mktemp /tmp/XXXXXXXXXXX.pes) - libembroidery-convert "$1" "$pes" - file="$pes" -else - file="$1" -fi - -cat "$file" | ssh $HOST " - mount /mnt/embroidery && - rm -f /mnt/embroidery/* && - cat > /mnt/embroidery/embroidery.pes && - umount /mnt/embroidery" \ - || echo 'failed to upload embroidery :(' diff --git a/bin/gen-format-list b/bin/gen-format-list new file mode 100755 index 00000000..674813bb --- /dev/null +++ b/bin/gen-format-list @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +import sys + +sys.path.append('embroidermodder/experimental/python/binding') +from libembroidery import * + +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)' % (extension[1:], description, extension.upper()) + + curFormat = curFormat.next + -- cgit v1.2.3