浏览代码

add flags for (caffe|glitter|random)

encrypt 8 年之前
父节点
当前提交
118be97fc6
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. 11 2
      immaginibuongiorno.sh

+ 11 - 2
immaginibuongiorno.sh

@@ -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