meme-tools

Meme format tools
git clone git://r-36.net/meme-tools
Log | Files | Refs | README | LICENSE

meme-classify (485B)


      1 #!/bin/sh
      2 
      3 set -x
      4 
      5 if [ $# -lt 1 ];
      6 then
      7 	printf "usage: %s file.ext\n" "$(basename "$0")" >&2
      8 	exit 1
      9 fi
     10 
     11 inputpath="$1"
     12 inputfile="$(basename "${inputpath}")"
     13 filename="${inputfile%.*}"
     14 memename="$(thinglaunch -o -p "${filename} meme name> ")"
     15 
     16 memebase="$HOME/fotos/memes"
     17 cp $inputpath ${memebase}
     18 
     19 cd $memebase
     20 outputfile="$(quinq-size "${inputfile}" | cut -d' ' -f 3-)"
     21 outputext="${outputfile#*.}"
     22 mv ${outputfile} ${outputfile/${filename}_quinqsize/${memename}}
     23 rm $inputfile
     24