From f4754c009d97b963b0c9dfcb55811af795bc0035 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Sat, 28 Sep 2019 18:08:18 +0200 Subject: [PATCH] new: hypercofe, generalized hyper script --- blobfoxhypercofe.svg | 293 ++++++++++++++++++++++++++++++ gen.sh | 13 +- blobfoxhyperowo.sh => hyperize.sh | 8 +- 3 files changed, 305 insertions(+), 9 deletions(-) create mode 100644 blobfoxhypercofe.svg rename blobfoxhyperowo.sh => hyperize.sh (71%) diff --git a/blobfoxhypercofe.svg b/blobfoxhypercofe.svg new file mode 100644 index 0000000..3218db2 --- /dev/null +++ b/blobfoxhypercofe.svg @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gen.sh b/gen.sh index 544f31a..ca7488c 100755 --- a/gen.sh +++ b/gen.sh @@ -8,14 +8,16 @@ rm -f export_flip/* find . -type f \( -iname "*.svg" ! -iname ".*" \) -print0 | parallel -0 'x={.}; inkscape -z -e "export/${x#./}.png" "{}"' {} \; ./blobfoxdundundun.sh -./blobfoxhyperowo.sh +./hyperize.sh blobfoxhyperowo +./hyperize.sh blobfoxhypercofe cp LICENSE export/ -cp export/* export_flip/ cd export apngasm -o ablobfoxbongo.png blobfoxbongo.png 100 blobfoxbongostart.png 100 apngasm -o ablobfoxhyper.png blobfoxhyper1.png 2:100 blobfoxhyper2.png 2:100 blobfoxhyper3.png 2:100 -rm blobfoxhyper1.png blobfoxhyper2.png blobfoxhyper3.png blobfoxhyperowo.png +rm blobfoxhyper1.png blobfoxhyper2.png blobfoxhyper3.png blobfoxhyperowo.png blobfoxhypercofe.png +cp ./blobfox* ../export_flip/ + FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.png} $x' {} \;` jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<< "${FILELIST%|}" > blobfox.json @@ -27,11 +29,8 @@ CHECKSUM=`sha256sum -z blobfox.zip | awk '{ print $1 }'` cd ../export_flip rm blobfoxsign*.png blobfoxconfused.png blobfoxbreadsnoot*.png -find . -type f -iname '*.png' -exec sh -c 'x=${0#./blobfox}; mv blobfox$x revblobfox$x' {} \; +find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; mv $x rev$x' {} \; mogrify -flop *.png -apngasm -o arevblobfoxbongo.png revblobfoxbongo.png 100 revblobfoxbongostart.png 100 -apngasm -o arevblobfoxhyper.png revblobfoxhyper1.png 2:100 revblobfoxhyper2.png 2:100 revblobfoxhyper3.png 2:100 -rm revblobfoxhyper1.png revblobfoxhyper2.png revblobfoxhyper3.png revblobfoxhyperowo.png FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.png} $x' {} \;` jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<< "${FILELIST%|}" > blobfox_flip.json diff --git a/blobfoxhyperowo.sh b/hyperize.sh similarity index 71% rename from blobfoxhyperowo.sh rename to hyperize.sh index d53b829..6f6ad0a 100755 --- a/blobfoxhyperowo.sh +++ b/hyperize.sh @@ -5,6 +5,10 @@ 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/* @@ -15,7 +19,7 @@ while [ $counter -le 75 ] do offset=${shakeOffsets[counter-1]} file=`printf "export_tmp/%s.png" $counter` - inkscape -z -e $file -a $offset "blobfoxhyperowo.svg" + inkscape -z -e $file -a $offset $SOURCESVG ((counter++)) done @@ -30,5 +34,5 @@ do ((counter++)) done -apngasm -o export/ablobfoxhyperowo.png ${args[@]} +apngasm -o $TARGETSVG ${args[@]} rm -f export_tmp/*