From dae496e28b60c87b0c41a5386165ec65088f4a54 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Mon, 30 Sep 2019 09:33:01 +0200 Subject: "a" prefix for animated files, improved (pre)lurk* --- animate.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 animate.sh (limited to 'animate.sh') diff --git a/animate.sh b/animate.sh new file mode 100755 index 0000000..8d8afda --- /dev/null +++ b/animate.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +SOURCEBASE=$1 +MAX=$2 +DELAY=$3 +SOURCESVG=`printf "%s.svg" $SOURCEBASE` +TARGETSVG=`printf "export/%s.png" $SOURCEBASE` + + +mkdir -p export_tmp +rm -f export_tmp/* + + +counter=1 +while [ $counter -le $MAX ] +do + source=`printf "%s%s.svg" $SOURCEBASE $counter` + file=`printf "export_tmp/%s.png" $counter` + inkscape -z -e $file $source + ((counter++)) +done + + +declare -a args + +counter=1 +while [ $counter -le $MAX ] +do + file=`printf "export_tmp/%s.png" $counter` + args+=($file $DELAY) + ((counter++)) +done + +apngasm -o $TARGETSVG ${args[@]} +rm -f export_tmp/* -- cgit v1.3.1