summaryrefslogtreecommitdiff
path: root/dxf_export/main.sh
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2014-12-06 14:40:00 +0100
committerMichael Schwarz <michi.schwarz@gmail.com>2014-12-06 14:40:00 +0100
commit785aec3aa6e2deda9acfefa8a9114ea3e7d39f44 (patch)
treef5b18da6ee3caf3e91c2e4dbc3f509ef0e2717ff /dxf_export/main.sh
parent9da7f66feec3ec222760e5d34ff83e43ab41af39 (diff)
downloadpogojig-785aec3aa6e2deda9acfefa8a9114ea3e7d39f44.tar.gz
pogojig-785aec3aa6e2deda9acfefa8a9114ea3e7d39f44.tar.bz2
pogojig-785aec3aa6e2deda9acfefa8a9114ea3e7d39f44.zip
Replaced Script used for DXF export by more advanced version working with Inkscape 0.99.
Diffstat (limited to 'dxf_export/main.sh')
-rwxr-xr-xdxf_export/main.sh38
1 files changed, 0 insertions, 38 deletions
diff --git a/dxf_export/main.sh b/dxf_export/main.sh
deleted file mode 100755
index 4a7f3f3..0000000
--- a/dxf_export/main.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /usr/bin/env bash
-
-set -e -o pipefail
-
-in_file=$1
-out_file=$2
-
-# If environment variable DXF_EXPORT_DEBUG is set, the temporary file that is modified using Inkscape is saved in the same directory as the source file and not removed.
-if [ "$DXF_EXPORT_DEBUG" ]; then
- temp_file="$(dirname "$in_file")/$(basename "$in_file" '.svg')~temp.svg"
-else
- temp_dir=$(mktemp -d)
- temp_file="$temp_dir/temp.svg"
-fi
-
-script_path=$(dirname "$BASH_SOURCE")
-
-cp "$in_file" "$temp_file"
-
-# Run a few commands using Inkscape on the SVG file to get in into a shape that makes a successful conversion to DXF more likely.
-"$INKSCAPE" \
- --verb UnlockAllInAllLayers \
- --verb EditSelectAllInAllLayers \
- --verb ObjectToPath \
- --verb EditSelectAllInAllLayers \
- --verb SelectionUnGroup \
- --verb EditSelectAllInAllLayers \
- --verb StrokeToPath \
- --verb FileSave \
- --verb FileClose \
- "$temp_file"
-
-# Convert the SVG to a DXF file.
-python2 "$script_path/better_dxf_outlines.py" "$temp_file" > "$out_file"
-
-if ! [ "$DXF_EXPORT_DEBUG" ]; then
- rm -rf "$temp_dir"
-fi