diff --git a/scripts/camwhore-grab b/scripts/camwhore-grab new file mode 100755 index 0000000000000000000000000000000000000000..f94fa4dd53420ad7e72c0035616adde6e28305ef --- /dev/null +++ b/scripts/camwhore-grab @@ -0,0 +1,11 @@ +#!/bin/zsh + +cd /home/other/webcam +sleep 5 +for i in 1 2; do + wget http://camwhore.ucc.gu.uwa.edu.au:8990/$1 -O $2.jpg.tmp 2> /dev/null + if [[ -s $2.jpg.tmp ]]; then + mv $2.jpg.tmp $2.jpg + fi + sleep 30 +done diff --git a/scripts/get-images-and-archive.sh b/scripts/get-images-and-archive.sh new file mode 100755 index 0000000000000000000000000000000000000000..efcfc0c1f121b439696f155be9f8eb167bf34d83 --- /dev/null +++ b/scripts/get-images-and-archive.sh @@ -0,0 +1,22 @@ +#!/bin/zsh +# Get all images +#for i in 1 2 3 4; do + /home/other/webcam/webcam-grab "http://ipcamera1/snapshot.cgi" "ipcamera1" "Clubroom_SW" + /home/other/webcam/webcam-grab "http://ipcamera2/snapshot.cgi" "ipcamera2" "Machine_Room_SW" + /home/other/webcam/webcam-grab "http://ipcamera3/image.jpg" "ipcamera3" "Clubroom_SE" + /home/other/webcam/webcam-grab "http://ipcamera4/image.jpg" "ipcamera4" "Machine_Room_SE" + /home/other/webcam/webcam-grab "http://ipcamera5/image.jpg" "ipcamera5" "Clubroom_N" + /home/other/webcam/webcam-grab "http://ipcamera6/image.jpg" "ipcamera6" "UniGames" + #/home/other/webcam/webcam-grab "http://ipcamera3/image.jpg" "webcam1" "Clubroom_SE" + #/home/other/webcam/camwhore-grab Machine_Room_SW.jpg bw-webcam + #/home/other/webcam/camwhore-grab Machine_Room_SE.jpg webcam3 + #/home/other/webcam/camwhore-grab USB_Cam.jpg uvc1 + #/home/other/webcam/camwhore-grab Clubroom_SW.jpg webcam +# if [[ "$i" -eq "1" ]]; then +# # Copy images as necessary +# /services/webcam/archive-script.sh +# fi + #echo "sleeping" + #sleep 10 +#done +# /services/webcam/archive-script.sh diff --git a/scripts/webcam-grab b/scripts/webcam-grab new file mode 100755 index 0000000000000000000000000000000000000000..0757351934582b0c72ad62c88f71f8cea1b3c312 --- /dev/null +++ b/scripts/webcam-grab @@ -0,0 +1,25 @@ +#!/bin/zsh + +# Written by [SLX] and [BG3] +# Because we finally can get rid of camwhore +# 20140509 + +cd /home/other/webcam +#sleep 5 +#wget --http-user="admin" --http-password="[INSERTREALPASSWORDHERE]" "$1" -O $2.jpg.tmp 2> /dev/null +curl -u admin:admin $1 -o $2.jpg.tmp 2> /dev/null +if [[ -s $2.jpg.tmp ]]; then + #grep "Auth" $2.jpg.tmp + #if [ $? = "0" ]; then + #rm $2.jpg.tmp + #fi +fi +if [[ -s $2.jpg.tmp ]]; then + #mv $2.jpg.tmp $2.jpg + label=$(date +"%d/%m/%y %H:%M:%S") + fontargs="-font Inconsolata-Medium -pointsize 12 -undercolor black" + convert $2.jpg.tmp ${=fontargs} -draw "gravity northwest fill white text 0,0 ' $3 - ${label} '" $2.jpg + exiftool -comment="'$2 - ${label} - $3'" $2.jpg 1> /dev/null + rm $2.jpg.tmp +fi +#echo "done"