<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Code Train &#187; camcapture</title>
	<atom:link href="http://thecodetrain.co.uk/tag/camcapture/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecodetrain.co.uk</link>
	<description>Where Neil Crosby talks about coding on the train...</description>
	<lastBuildDate>Sun, 03 Apr 2011 18:15:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Automatically Take Photos Using Your Mac&#8217;s Webcam</title>
		<link>http://thecodetrain.co.uk/2008/11/how-to-automatically-take-photos-using-your-macs-webcam/</link>
		<comments>http://thecodetrain.co.uk/2008/11/how-to-automatically-take-photos-using-your-macs-webcam/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 19:34:47 +0000</pubDate>
		<dc:creator>Neil Crosby</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[camcapture]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[isight]]></category>
		<category><![CDATA[scratching an itch]]></category>

		<guid isPermaLink="false">http://thecodetrain.co.uk/?p=143</guid>
		<description><![CDATA[<p>On friday, <a href="http://marknormanfrancis.com/">Norm</a> happened across <a href="http://www.flickr.com/photos/thevoicewithin/2249082200/">one of my automated photos</a> on Flickr and asked me how I did it.  Because I realised that I couldn&#8217;t actually remember exactly how everything fitted together I decided to take a look at it again this weekend and actually write things up this time.</p>

<p><a href="http://www.flickr.com/photos/thevoicewithin/2249082200/" title="Where is my happy face, take 2 by thevoicewithin, on Flickr"><img src="http://farm3.static.flickr.com/2343/2249082200_49f25a4281.jpg" width="500" height="375" alt="Where is my happy face, take 2" /></a></p>

<p>So, here&#8217;s how to do it:</p>

<ol>
<li><p>Create a directory <code>/Applications/autocamcapture</code> &#8211; this is where the executables we&#8217;ll be using will live.</p></li>
<li><p>Create a directory <code>~/Pictures/autocamcapture</code> &#8211; this is where the automatically generated images will live.</p></li>
<li><p>Download <a href="http://slappingturtle.com/home/index.php?option=com_content&amp;task=view&amp;id=20&amp;Itemid=1">CamCapture</a> and put the executable in <code>/Applications/autocamcapture</code></p></li>
<li><p>Open the &#8220;Script Editor&#8221; application and enter the following:</p>

<pre><code>set commandPath to "/Applications/autocamcapture/"
set commandName to "camcapture"
set outputImagePath to "~/Pictures/autocamcapture/"
set outputImageName to do shell script "date +%Y%m%d-%H%M%S"
do shell script commandPath &amp; commandName &amp; " " &amp; outputImagePath &amp; outputImageName
</code></pre></li>
<li><p>Save this file as <code>/Applications/autocamcapture/autocamcapture.scpt</code></p></li>
<li><p>Open a terminal window, and run <code>crontab -e</code>.  Add the following cron job:</p>

<pre><code>*      *       *       *       *       osascript /Applications/autocamcapture/autocamcapture.scpt
</code></pre></li>
<li><p>Now, once a minute a cron job will be fired off and a picture will be taken and placed in your <code>~/Pictures/autocamcapture</code> directory.</p></li>
</ol>

<p>The obvious question to go with this is &#8220;but why would you do this?&#8221;.  Frankly, originally the answer was just &#8220;because I can&#8221;.  I carried on doing it though because in amongst all the dross that inevitably gets taken <a href="http://www.flickr.com/search/?q=automated&amp;w=36778932%40N00">some interesting photos do occur</a>.  Try it out yourself, you might snap something fun.</p>
<div style="display:block"><small><em><a href="http://neilcrosby.com">Neil Crosby</a> also blogs at about t-shirts at <a href="http://iwearcotton.com">I Wear Cotton</a>, writes <a href="http://thetenwordreview.com/users/workingwithme">Ten Word Reviews</a>, and uploads <a href="http://www.flickr.com/photos/thevoicewithin/">photos</a> to flickr.  You can follow a combined feed of posts at <a href="http://neilcrosby.com/">NeilCrosby.com</a>.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>On friday, <a href="http://marknormanfrancis.com/">Norm</a> happened across <a href="http://www.flickr.com/photos/thevoicewithin/2249082200/">one of my automated photos</a> on Flickr and asked me how I did it.  Because I realised that I couldn&#8217;t actually remember exactly how everything fitted together I decided to take a look at it again this weekend and actually write things up this time.</p>

<p><a href="http://www.flickr.com/photos/thevoicewithin/2249082200/" title="Where is my happy face, take 2 by thevoicewithin, on Flickr"><img src="http://farm3.static.flickr.com/2343/2249082200_49f25a4281.jpg" width="500" height="375" alt="Where is my happy face, take 2" /></a></p>

<p>So, here&#8217;s how to do it:</p>

<ol>
<li><p>Create a directory <code>/Applications/autocamcapture</code> &#8211; this is where the executables we&#8217;ll be using will live.</p></li>
<li><p>Create a directory <code>~/Pictures/autocamcapture</code> &#8211; this is where the automatically generated images will live.</p></li>
<li><p>Download <a href="http://slappingturtle.com/home/index.php?option=com_content&amp;task=view&amp;id=20&amp;Itemid=1">CamCapture</a> and put the executable in <code>/Applications/autocamcapture</code></p></li>
<li><p>Open the &#8220;Script Editor&#8221; application and enter the following:</p>

<pre><code>set commandPath to "/Applications/autocamcapture/"
set commandName to "camcapture"
set outputImagePath to "~/Pictures/autocamcapture/"
set outputImageName to do shell script "date +%Y%m%d-%H%M%S"
do shell script commandPath &amp; commandName &amp; " " &amp; outputImagePath &amp; outputImageName
</code></pre></li>
<li><p>Save this file as <code>/Applications/autocamcapture/autocamcapture.scpt</code></p></li>
<li><p>Open a terminal window, and run <code>crontab -e</code>.  Add the following cron job:</p>

<pre><code>*      *       *       *       *       osascript /Applications/autocamcapture/autocamcapture.scpt
</code></pre></li>
<li><p>Now, once a minute a cron job will be fired off and a picture will be taken and placed in your <code>~/Pictures/autocamcapture</code> directory.</p></li>
</ol>

<p>The obvious question to go with this is &#8220;but why would you do this?&#8221;.  Frankly, originally the answer was just &#8220;because I can&#8221;.  I carried on doing it though because in amongst all the dross that inevitably gets taken <a href="http://www.flickr.com/search/?q=automated&amp;w=36778932%40N00">some interesting photos do occur</a>.  Try it out yourself, you might snap something fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecodetrain.co.uk/2008/11/how-to-automatically-take-photos-using-your-macs-webcam/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

