People keep asking what I'm doing when I'm idle and I realized that the screen for Maya actually looks pretty neat most of the time I'm working in it, so... I wrote a little desktop grabber thingy for MacOS. You'll have to find/download ncftp to get it to work and change the path to it accordingly. The rest is pretty straight-forward. SIPS comes free with OSX-10.3 but may not be in earlier OSX's. I copied it from 10.3 to 10.2.8 and it runs just fine. You could also replace it with ImageMagick. Other than that, here's the whole script.
And then of course, you also want a cronjob to run it every 5 minutes:
You can go to http://circle.twu.net/photos/webcam/desktop.html and see it run. You can also hit 'view source' and get the script (It's just a meta refresh)
So... that's it. I love Macs! :) Next time someone asks, they can just look there instead. (Unless I'm doing physical animation in which case I'll have the webcam turned on, maybe. :)
(Okay, maybe I am an attention whore)
#!/bin/sh #Define some variables. NCFTPDIR="$HOME/ical_synch/ncftp" USER="user_name" PASS="user_password" SERVER="twu.net"; #Where to put the file. WEBDIR="public_html/photos/webcam"; #Directory on website to put file. FILENAME="desktop"; #Image name without suffix. (includes path) XSIZE=800; #Number of pixels across. YSIZE=600; #Number of pixels down. /usr/sbin/screencapture $FILENAME.pdf /usr/bin/sips -s format jpeg $FILENAME.pdf -s formatOptions low -z $YSIZE $XSIZE -o $FILENAME.jpg /bin/rm $FILENAME.pdf $NCFTPDIR/ncftpput -u $USER -p $PASS $SERVER $WEBDIR $FILENAME.jpg /bin/rm $FILENAME.jpg
And then of course, you also want a cronjob to run it every 5 minutes:
1,6,11,16,21,26,31,36,41,46,51,56 * * * * /Users/sammi/deskgrab/deskgrab.sh
You can go to http://circle.twu.net/photos/webcam/desktop.html and see it run. You can also hit 'view source' and get the script (It's just a meta refresh)
So... that's it. I love Macs! :) Next time someone asks, they can just look there instead. (Unless I'm doing physical animation in which case I'll have the webcam turned on, maybe. :)
(Okay, maybe I am an attention whore)