diff --git a/Misc./terribly_old_scripts/gif2a b/Misc./terribly_old_scripts/gif2a new file mode 100755 index 0000000..7b44286 --- /dev/null +++ b/Misc./terribly_old_scripts/gif2a @@ -0,0 +1,27 @@ +#!/bin/bash + +# Play gif as color ascii art +# Usage: gif2a + + +DIR=$(mktemp -d) + +for i in $@; do + if [ -z "$(file "$i" | grep "GIF image")" ]; then + echo "Not a GIF file." + continue + fi + + declare -a dur=($(identify -format "%T " "$i")) + convert "$i" -coalesce +adjoin $DIR/GIF_FRAME.png + + counter=0 + for h in $DIR/*; do + jp2a --color --height=${LINES} $h + sleep 0.${dur[$counter]}0 + counter=$(expr ${counter} + 1) + done + + rm $DIR/* +done + +rm -d $DIR