<?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>drop.by &#187; bash</title>
	<atom:link href="http://drop.by/tag/bash/feed" rel="self" type="application/rss+xml" />
	<link>http://drop.by</link>
	<description>Just another weblog</description>
	<lastBuildDate>Tue, 10 Aug 2010 19:22:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Script that prepares photos for Facebook</title>
		<link>http://drop.by/photo-script</link>
		<comments>http://drop.by/photo-script#comments</comments>
		<pubDate>Tue, 04 May 2010 19:12:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://drop.by/?p=248</guid>
		<description><![CDATA[A script that lets you merge photo albums from different cameras while preserving chronological order, and optionally prepares them for e.g. Facebook by removing metadata, resizing, and renaming them.]]></description>
			<content:encoded><![CDATA[<p>This is a follow-up of an <a href="/preparing-photos-for-facebook">earlier post</a>. The topic remains the same; merging photo albums from different cameras while preserving chronological order, and removing potentially private metadata.</p>
<p>Like many others, I have noticed that Facebook increased its photo size <a href="http://blog.facebook.com/blog.php?post=337389082130">from 604 to 720 pixels</a>. At the same time, I noticed that the commands in my last post weren&#8217;t perfect. I have tried to write an improved script:</p>
<ul>
<li><a href="/files/facebook.sh.txt">facebook.sh</a></li>
</ul>
<p>Simply run it in your photos folder and it will make a &#8216;facebook&#8217; directory to which it copies your processed photos. By default, it only handles the photos in the current directory. To make it recursive (it will skip the &#8216;facebook&#8217; dir), just remove or edit &#8220;-maxdepth 1&#8243;.</p>
<p>As before, I can recommend <a href="http://www.imagemagick.org/">ImageMagick</a> and <a href="http://www.cygwin.com/">Cygwin</a> if you are a Windows user.</p>
<p>Shouldn&#8217;t have to mention it, but: Use at your own risk.</p>
]]></content:encoded>
			<wfw:commentRss>http://drop.by/photo-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preparing photos for Facebook upload</title>
		<link>http://drop.by/preparing-photos-for-facebook</link>
		<comments>http://drop.by/preparing-photos-for-facebook#comments</comments>
		<pubDate>Sat, 17 Oct 2009 15:23:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[exif]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[preprocessing]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://drop.by/blog/?p=73</guid>
		<description><![CDATA[A few tips for using Facebook and/or other services. Shows a way to correctly order photos from different sources (2 cameras -> 1 album) and how to remove potentially private data.]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><strong>Update:</strong> Improved version in a <a href="/photo-script">new post</a> of mine.</p>
<p style="text-align: left;">A few tips for using Facebook and/or other services. You will need <a title="Free software, most operating systems supported" href="http://www.imagemagick.org/">ImageMagick</a> and linux or <a title="Linux-like environment for Windows" href="http://www.cygwin.com/">Cygwin</a>.</p>
<p style="text-align: left;"><strong>Order images correctly</strong></p>
<p style="text-align: left;"><strong> </strong>Copying images to your computer, or rotating them, may ruin the files&#8217; time (of last modification). If your album contains images from several cameras, the file names can&#8217;t be used to sort the images either. The following command renames the files to the second they were taken (see <a title="Exchangeable image file format (metadata in jpg)" href="http://en.wikipedia.org/wiki/Exif">Exif</a>).</p>
<p style="text-align: left;"><code><span title="&quot;c&quot; ensures names are unique">c=0;for i in *.jpg;do t=`identify -verbose $i |egrep 'Exif:DateTime:'|sed 's/[^0-9]//g'`; mv $i "$t-$c.jpg";c=$[ $c + 1 ];echo $i;done</span></code></p>
<p style="text-align: left;"><strong>Remove excess information</strong></p>
<p style="text-align: left;">Be sure you don&#8217;t share <a title="Why you should remove metadata" href="http://netzreport.googlepages.com/hidden_data_in_jpeg_files.html">more than you mean to</a>! Also, saves you a couple of bytes to upload. (Copy files to a new folder first.)</p>
<p style="text-align: left;"><code>for i in *.jpg;do mogrify <span title="Removes Exif data">-strip</span> <span title="Aspect ratio is preserved, max width/height is 604">-resize 604x604</span> $i;echo $i;done</code></p>
<p style="text-align: left;">Of course, for some services, keeping the metadata could be useful.</p>
<p style="text-align: left;"><strong>Anonymize file names</strong></p>
<p style="text-align: left;">Finally, you may want to rename the album file names:</p>
<p style="text-align: left;"><code>c=0;for i in *.jpg;do f=`<span title="0000,0001,0002,...">printf "%04u" "$c"</span>`;mv $i $f.jpg;c=$[ $c + 1 ];done</code></p>
]]></content:encoded>
			<wfw:commentRss>http://drop.by/preparing-photos-for-facebook/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
