From f4754c009d97b963b0c9dfcb55811af795bc0035 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Sat, 28 Sep 2019 18:08:18 +0200 Subject: new: hypercofe, generalized hyper script --- hyperize.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 hyperize.sh (limited to 'hyperize.sh') diff --git a/hyperize.sh b/hyperize.sh new file mode 100755 index 0000000..6f6ad0a --- /dev/null +++ b/hyperize.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +source ./shakeoffsets.sh + +declare -a shakeOffsets +getShakeOffsets shakeOffsets + +SOURCEBASE=$1 +SOURCESVG=`printf "%s.svg" $SOURCEBASE` +TARGETSVG=`printf "export/a%s.png" $SOURCEBASE` + + +mkdir -p export_tmp +rm -f export_tmp/* + + +counter=1 +while [ $counter -le 75 ] +do + offset=${shakeOffsets[counter-1]} + file=`printf "export_tmp/%s.png" $counter` + inkscape -z -e $file -a $offset $SOURCESVG + ((counter++)) +done + + +declare -a args + +counter=1 +while [ $counter -le 75 ] +do + file=`printf "export_tmp/%s.png" $counter` + args+=($file 1:50) + ((counter++)) +done + +apngasm -o $TARGETSVG ${args[@]} +rm -f export_tmp/* -- cgit v1.2.3-54-g00ecf