<?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>zanshin.net &#187; photography</title>
	<atom:link href="http://zanshin.net/category/photography/feed/" rel="self" type="application/rss+xml" />
	<link>http://zanshin.net</link>
	<description>because not enough websites start with the letter "Z"</description>
	<lastBuildDate>Mon, 26 Jul 2010 13:34:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Flickr Upload Via Command Line</title>
		<link>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2009%2F04%2F17%2Fflickr-upload-via-command-line%2F&amp;seed_title=Flickr+Upload+Via+Command+Line</link>
		<comments>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2009%2F04%2F17%2Fflickr-upload-via-command-line%2F&amp;seed_title=Flickr+Upload+Via+Command+Line#comments</comments>
		<pubDate>Fri, 17 Apr 2009 16:12:03 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[nerdliness]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://zanshin.net/?p=1858</guid>
		<description><![CDATA[Recently one of my coworkers Twittered that he had uploaded some 11,000 pictures to his Flickr account. After getting over my initial shock at the sheer volume of images, I started thinking that I had a couple thousand images on my hard drive that I would like to have on Flickr too. Using the Flickr [...]]]></description>
			<content:encoded><![CDATA[<p>Recently one of my coworkers Twittered that he had uploaded some <a title="Josh Works on Twitter" href="https://twitter.com/worksology/status/1530154480">11,000 pictures</a> to his Flickr account. After getting over my initial shock at the sheer volume of images, I started thinking that I had a couple thousand images on my hard drive that I would like to have on Flickr too.</p>
<p>Using the <a title="Tools for Flickr" href="http://www.flickr.com/tools/">Flickr Uploadr</a> is problematic. First you have to select the pictures you wish to upload; a task exacerbated by the hierarchically nested directory structure that iPhoto uses to store your pictures. The Uploadr isn&#8217;t bright enough to traverse sub-directories looking for images, so you are forced to open each <em>year/month/day</em> combination to select images. An unenviable task with pictures spanning the last nine years on your hard drive.</p>
<p>A better approach would be to copy all the images you wanted to upload into one directory and then let Flickr Uploadr work against that collection. Fortunately the Unix under pinnings of Mac OS X make copying files from dozens of nested sub-directories to a single target directory simple. Using the find command with the -exec switch like so:</p>
<p><strong>find . -name &#8220;*.JPG&#8221; -exec cp &#8220;{}&#8221; /path/to/new/directory \;</strong></p>
<p>will search the current directory (and all of its sub-directories) for files matching the *.JPG string. And the -exec switch runs the copy (cp) command for each file found (the &#8220;{}&#8221; portion of the command). The /path/to/new/directory is delimited by the backslash-semi-colon at the end of the command.</p>
<p>After running this command I had a folder with over 4,600 images. Far more than I expected. The OS X operating system keeps metadata in files beginning with a dot, and my new images directory was filled with these dot-files, one for each image file. If there was an image file named 396.JPG, then there was a dot-file named .396.JPG.</p>
<p>Another find command, this time executing the rm (remove) command would take care of these dot-files for me:</p>
<p><strong>find . -name &#8220;.*.JPG&#8221; -exec rm &#8220;{}&#8221; \;</strong></p>
<p>As always when you are using rm, care should be taken to not delete more than you wish. Leaving the -exec portion of the command off, i.e., <strong>find . -name &#8220;.*.JPG&#8221;</strong> will list the file found by the find. Running that variation of the command first will help you to see what effect adding the -exec rm &#8220;{}&#8221; \; switch will have.</p>
<p>After removing the dot-files, I had approximately 2,300 images left, which seemed like the right amount. Starting Flickr Uploadr, I selected all the images in my new directory and waited. And waited. And waited. It took Flickr Uploadr a very long time to import all the images to its interface, before I could adjust the upload settings and start the upload process.</p>
<p>Once I had created a new set, and marked the images to be private, I started the upload. Within minutes Flickr Uploadr crashed. Subsequent re-starts also crashed. Finally I managed to click on the &#8220;remove all&#8221; button and empty the tool of images to be uploaded. I then tried uploading only smaller sets of images, say 500 at a time. This initially appeared to be working, but again the Uploadr crashed. Doggedly rerunning the utility I finally managed to upload all my images.</p>
<p>Signing into my Flickr account, and opening the new set I had created for these images I discovered that I had uploaded the thumbnail image size and not the full image size. 2,200 of them.</p>
<p>Some investigating in one of the iPhoto image directories revealed that there were two copies of each picture, one a thumbnail and one the full-sized image. The thumbnail has the file extension .jpg, while the full-sized image ends with .JPG. Unix based operating systems are cAse sEnsITive. .jpg and .JPG are not the same. I am used to using lowercase letters for file extensions, so when the find command above, using &#8220;*.jpg&#8221; for the search pattern return what appeared to be the right number of images, I didn&#8217;t realize that I had gotten the thumbnails only.</p>
<p>After deleting 2,279 images from Flickr, which takes a really long time, I wasn&#8217;t looking forward to struggling with the balky Flickr Uploadr utility again, especially since the full-size images would big considerably large (i.e. much slower loading) than the thumbnails. Through Google I discovered a Lifehacker article on a<a title="Use a command line utility to upload to Flickr" href="http://lifehacker.com/software/hack-attack/automatically-upload-a-folders-photos-to-flickr-262311.php"> command line utility to upload images to Flickr</a>. My hope was that by eliminating the extra layers of complexity, and the memory requirements, of the GUI Uploadr, I would have better luck.</p>
<p>In short the command line utility, a pair of Python scripts, worked like a champ. It uploaded 2,299 images with only 22 failures, for a total of 2,279 new pictures in my Flickr account. If I were to do this again, here are the steps I would follow from start to finish. These steps assume that you have read the Lifehacker article, and downloaded the necessary Python scripts.</p>
<p>First create a directory to temporarily hold the images you wish to upload:</p>
<p><strong>mkdir ~/images</strong></p>
<p>Next, switch to your iPhoto Library and copy all the full sized images to the new images directory:</p>
<p><strong>cd ~/Pictures/iPhoto\ Library/</strong></p>
<p><strong>find . -name &#8220;*.JPG&#8221; -exec cp &#8220;{}&#8221; ~/images \;</strong></p>
<p>Since this find command will also capture all the OS X meta files (dot files) run this command to remove them:</p>
<p><strong>cd ~/images</strong></p>
<p><strong>find . -name &#8220;.*.JPG&#8221; -exec rm &#8220;{}&#8221; \;</strong></p>
<p>Now you should have a directory filled with all the full sized images from your iPhoto library. The next step is to run the Python upload script. Make sure to follow the configuration instructions listed in the Lifehacker article. And be aware that on the first running of this script you will have to sign into your Flickr account and authorize the Python script so it can access your account. Since all the parameters are specified in the script itself the final command is rather simple. In my case I saved the utility to my bin folder:</p>
<p><strong>cd ~/bin</strong></p>
<p><strong>python uploadr.py</strong></p>
<p>The script will display a success (or problem) line for each file it operates against. Running the command as I&#8217;ve shown above will dump these messages to your console. If you wanted to save them for posterity you could run the command like this:</p>
<p><strong>python uploadr.py &gt; log.txt</strong></p>
<p>which would produce a text file with the output for you.</p>
<p>Now I have 2,279 images to tag, comment on, add titles to, et cetera. Unfortunately there isn&#8217;t a utility, command line or otherwise, to do that for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2009%2F04%2F17%2Fflickr-upload-via-command-line%2F&amp;seed_title=Flickr+Upload+Via+Command+Line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>111111</title>
		<link>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F12%2F26%2F111111%2F&amp;seed_title=111111</link>
		<comments>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F12%2F26%2F111111%2F&amp;seed_title=111111#comments</comments>
		<pubDate>Tue, 26 Dec 2006 20:21:44 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[nerdliness]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[palindrome]]></category>

		<guid isPermaLink="false">http://markhnichols.com/zanshin.net/?p=1124</guid>
		<description><![CDATA[111111 In the word of binary numbers, this would be known as &#8220;high values&#8221; i.e., the largest value this register could hold. Were that the case here, the next number would have been &#8220;low values&#8221; or all zeroes. Sadly, that event won&#8217;t happen for another 888,889 miles. While I most likely won&#8217;t see that happy [...]]]></description>
			<content:encoded><![CDATA[<p style="float: right; margin-left: 10px; margin-bottom: 10px"> <a href="http://www.flickr.com/photos/zanshin/334220121/" title="photo sharing"><img src="http://farm1.static.flickr.com/128/334220121_bd3f63e8eb_m.jpg" style="border: 2px solid #000000" /></a></p>
<p><span style="font-size: 0.7em; margin-top: 0px"><br />
<a href="http://www.flickr.com/photos/zanshin/334220121/">111111</a></span></p>
<p>In the word of binary numbers, this would be known as &#8220;high values&#8221; i.e., the largest value this register could hold. Were that the case here, the next number would have been &#8220;low values&#8221; or all zeroes. Sadly, that event won&#8217;t happen for another 888,889 miles.</p>
<p>While I most likely won&#8217;t see that happy event, at the rate I&#8217;m going I&#8217;ll see all 2s within the next three years.</p>
<p><br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F12%2F26%2F111111%2F&amp;seed_title=111111/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let It Snow</title>
		<link>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F12%2F02%2Flet-it-snow%2F&amp;seed_title=Let+It+Snow</link>
		<comments>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F12%2F02%2Flet-it-snow%2F&amp;seed_title=Let+It+Snow#comments</comments>
		<pubDate>Sat, 02 Dec 2006 17:54:56 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://markhnichols.com/zanshin.net/?p=1104</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin-left: 10px; margin-bottom: 10px;">
<a href="http://www.flickr.com/photos/zanshin/310704030/" title="photo sharing"><img src="http://static.flickr.com/101/310704030_3827ddfd16_m.jpg" alt="" style="border: solid 2px #000000;" /></a><br />
<br />
<span style="font-size: 0.6em; margin-top: 0px;"><br />
<a href="http://www.flickr.com/photos/zanshin/310704030/">Snow covered Holly bush</a><br />
</span>
</div>
<p>
Thursday we had the first snow storm of the year here in Kansas City. All day it threatened to snow and finally about 2:30 some little tiny flakes appeared in the air. An hour later it was snowing hard and before it tapered off in the night I got about six inches of the fluffy white stuff.</p>
<p>Friday the sun returned and most of the pavement melted clear, leaving a nice white blanket on the ground. Driving around today revealed that where I live was at the western edge of the storm, only thirty minutes travel was necessary to reach parts of town that looked as if no snow had fallen at all.<br />
<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F12%2F02%2Flet-it-snow%2F&amp;seed_title=Let+It+Snow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eat Here Get Worms</title>
		<link>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F03%2F13%2Feat-here-get-worms%2F&amp;seed_title=Eat+Here+Get+Worms</link>
		<comments>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F03%2F13%2Feat-here-get-worms%2F&amp;seed_title=Eat+Here+Get+Worms#comments</comments>
		<pubDate>Mon, 13 Mar 2006 17:56:56 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[worms]]></category>

		<guid isPermaLink="false">http://markhnichols.com/zanshin.net/?p=766</guid>
		<description><![CDATA[The shortest route between Overland Park and Decatur takes you along Route 54 in Missouri and Illinois. Shortly after crossing the Mississippi River heading east you come to a small cross roads called Atlas Illinois. At the four-way stop there is a general store with a sign out front. In a classic &#8220;eats, shoots and [...]]]></description>
			<content:encoded><![CDATA[<p>The shortest route between Overland Park and Decatur takes you along Route 54 in Missouri and Illinois. Shortly after crossing the Mississippi River heading east you come to a small cross roads called Atlas Illinois. At the four-way stop there is a general store with a sign out front. In a classic &#8220;eats, shoots and leaves&#8221; moment, the sign reads, &#8220;EAT HERE GET WORMS.&#8221;</p>
<p>I had to take <a href="http://www.flickr.com/photos/zanshin/111998085/" title="Eat Here Get Worms">a picture</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zanshin.net/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fzanshin.net%2F2006%2F03%2F13%2Feat-here-get-worms%2F&amp;seed_title=Eat+Here+Get+Worms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
