diff options
| author | Feuerfuchs <git@feuerfuchs.dev> | 2019-09-30 09:33:01 +0200 |
|---|---|---|
| committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-09-30 09:33:01 +0200 |
| commit | dae496e28b60c87b0c41a5386165ec65088f4a54 (patch) | |
| tree | f73a89ebe8296f30280a338a62e903f7b9b41619 /animate.sh | |
| parent | new: kirby, lurkaww, prelurk*, science, wave (diff) | |
| download | blobfox-emojis-dae496e28b60c87b0c41a5386165ec65088f4a54.tar.gz blobfox-emojis-dae496e28b60c87b0c41a5386165ec65088f4a54.tar.bz2 blobfox-emojis-dae496e28b60c87b0c41a5386165ec65088f4a54.zip | |
"a" prefix for animated files, improved (pre)lurk*
Diffstat (limited to 'animate.sh')
| -rwxr-xr-x | animate.sh | 35 |
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 | |||
| 3 | SOURCEBASE=$1 | ||
| 4 | MAX=$2 | ||
| 5 | DELAY=$3 | ||
| 6 | SOURCESVG=`printf "%s.svg" $SOURCEBASE` | ||
| 7 | TARGETSVG=`printf "export/%s.png" $SOURCEBASE` | ||
| 8 | |||
| 9 | |||
| 10 | mkdir -p export_tmp | ||
| 11 | rm -f export_tmp/* | ||
| 12 | |||
| 13 | |||
| 14 | counter=1 | ||
| 15 | while [ $counter -le $MAX ] | ||
| 16 | do | ||
| 17 | source=`printf "%s%s.svg" $SOURCEBASE $counter` | ||
| 18 | file=`printf "export_tmp/%s.png" $counter` | ||
| 19 | inkscape -z -e $file $source | ||
| 20 | ((counter++)) | ||
| 21 | done | ||
| 22 | |||
| 23 | |||
| 24 | declare -a args | ||
| 25 | |||
| 26 | counter=1 | ||
| 27 | while [ $counter -le $MAX ] | ||
| 28 | do | ||
| 29 | file=`printf "export_tmp/%s.png" $counter` | ||
| 30 | args+=($file $DELAY) | ||
| 31 | ((counter++)) | ||
| 32 | done | ||
| 33 | |||
| 34 | apngasm -o $TARGETSVG ${args[@]} | ||
| 35 | rm -f export_tmp/* | ||
