2019-10-23 14:32:32 +02:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
INKSCAPE="/usr/bin/inkscape"
|
2020-06-20 16:53:17 +02:00
|
|
|
OPTIPNG="/usr/bin/optipng"
|
2019-10-23 14:32:32 +02:00
|
|
|
|
|
|
|
INDEX="select.txt"
|
|
|
|
ASSETS_DIR="select-4k"
|
|
|
|
SRC_FILE="select.svg"
|
|
|
|
|
|
|
|
install -d $ASSETS_DIR
|
|
|
|
|
|
|
|
for i in `cat $INDEX`
|
|
|
|
do
|
|
|
|
if [ -f $ASSETS_DIR/$i.png ]; then
|
|
|
|
echo $ASSETS_DIR/$i.png exists.
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo Rendering $ASSETS_DIR/$i.png
|
|
|
|
$INKSCAPE --export-id=$i \
|
|
|
|
--export-dpi=192 \
|
|
|
|
--export-id-only \
|
2020-06-20 16:53:17 +02:00
|
|
|
--export-filename=$ASSETS_DIR/$i.png $SRC_FILE >/dev/null
|
|
|
|
$OPTIPNG -o7 --quiet $ASSETS_DIR/$1.png
|
2019-10-23 14:32:32 +02:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|