meme-classify - brcon2023-hackathons - Bitreichcon 2023 Hackathon Repository | |
git clone git://bitreich.org/brcon2023-hackathons git://enlrupgkhuxnvlhsf6lc3fz… | |
Log | |
Files | |
Refs | |
Tags | |
--- | |
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 |