exes - add relative movement to sphere script

This commit is contained in:
Felix Van der Jeugt 2016-05-17 17:03:40 +02:00
parent ddbbfe10b5
commit bf1e52fb94

View File

@ -1,14 +1,27 @@
case $1 in cmd_url=kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi
scrot) foto="$(mktemp XXXXXX.jpg)"
curl http://kelder.zeus.ugent.be/webcam/video/mjpg.cgi \ if [ -n "$1" ]; then
| ffmpeg -y -ss 0 -i - -vframes 1 -q:v 2 "$foto" while [ -n "$1" ]; do
feh "$foto" case $1 in
rm "$foto" scrot) foto="$(mktemp XXXXXX.jpg)"
;; curl http://kelder.zeus.ugent.be/webcam/video/mjpg.cgi \
klein) curl --data "command=set_pos&posX=0&posY=12" kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi ;; | ffmpeg -y -ss 0 -i - -vframes 1 -q:v 2 "$foto"
groot) curl --data "command=set_pos&posX=50&posY=10" kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi ;; feh "$foto"
zetel) curl --data "command=set_pos&posX=50&posY=22" kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi ;; rm "$foto"
*) curl http://kelder.zeus.ugent.be/webcam/video/mjpg.cgi | mpv --no-correct-pts --fps 4 - ;; ;;
esac > /dev/null 2>&1 klein) curl --data "command=set_pos&posX=0&posY=12" "$cmd_url" ;;
groot) curl --data "command=set_pos&posX=50&posY=10" "$cmd_url" ;;
zetel) curl --data "command=set_pos&posX=50&posY=22" "$cmd_url" ;;
\>) curl --data "command=set_relative_pos&posX=10&posY=0" "$cmd_url" ;;
\<) curl --data "command=set_relative_pos&posX=-10&posY=0" "$cmd_url" ;;
v) curl --data "command=set_relative_pos&posX=0&posY=-10" "$cmd_url" ;;
\^) curl --data "command=set_relative_pos&posX=0&posY=10" "$cmd_url" ;;
esac > /dev/null 2>&1
shift
done
else
curl http://kelder.zeus.ugent.be/webcam/video/mjpg.cgi | mpv --no-correct-pts --fps 4 -
fi