add flags for (caffe|glitter|random)

This commit is contained in:
encrypt 2016-04-11 12:43:30 +02:00
parent 5526094029
commit 118be97fc6

View file

@ -5,9 +5,18 @@ match=$(date +"%a" | tr '[:upper:]' '[:lower:]' | sed 's/mon/lunedi/;s/tue/marte
case $1 in
-g|--gattini)
match="gatto\|gattin\|micett"
;;
;;
--caffe)
match="caffè"
;;
--glitter)
match="glitter"
;;
--random)
match="uploads"
;;
*)
;;
;;
esac
curl -s "http://immaginibuongiorno.it" | grep "$match" | grep -oP "(?<=src=\").*(?=\")" | cut -d '"' -f 1 | shuf -n 1