adding bash script to export slices from single inkscape file

pull/549/merge^2
Set Hallstrom 2016-08-31 14:08:57 +02:00
parent 8510b5fc70
commit a169189125
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#!/bin/bash
if [[ -z $1 ]] ; then
echo "Usage: $0 [FILE]"
exit 0
else
FILENAME=$1
fi
PREFIX=EXP-
for ID in `grep -o "id=\"$PREFIX.*\"" $FILENAME | cut -d\" -f2` ; do
OUTPUT=${ID#$PREFIX}.png
echo "Exporting area $ID to $OUTPUT..."
inkscape --export-id=$ID --export-png=$OUTPUT --file=$FILENAME
done