summaryrefslogtreecommitdiffstats
path: root/animate.sh
diff options
context:
space:
mode:
Diffstat (limited to 'animate.sh')
-rwxr-xr-xanimate.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/animate.sh b/animate.sh
new file mode 100755
index 0000000..8d8afda
--- /dev/null
+++ b/animate.sh
@@ -0,0 +1,35 @@
1#!/bin/sh
2
3SOURCEBASE=$1
4MAX=$2
5DELAY=$3
6SOURCESVG=`printf "%s.svg" $SOURCEBASE`
7TARGETSVG=`printf "export/%s.png" $SOURCEBASE`
8
9
10mkdir -p export_tmp
11rm -f export_tmp/*
12
13
14counter=1
15while [ $counter -le $MAX ]
16do
17 source=`printf "%s%s.svg" $SOURCEBASE $counter`
18 file=`printf "export_tmp/%s.png" $counter`
19 inkscape -z -e $file $source
20 ((counter++))
21done
22
23
24declare -a args
25
26counter=1
27while [ $counter -le $MAX ]
28do
29 file=`printf "export_tmp/%s.png" $counter`
30 args+=($file $DELAY)
31 ((counter++))
32done
33
34apngasm -o $TARGETSVG ${args[@]}
35rm -f export_tmp/*