Commit 2737ab5d authored by Mitchell Pomery's avatar Mitchell Pomery

adding existing scripts

parent aeae757e
#!/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
#!/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
#!/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"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment