<?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>dirt</title>
	<atom:link href="http://www.dirtdon.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.dirtdon.com</link>
	<description></description>
	<lastBuildDate>Sun, 03 Mar 2013 17:29:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Twitter Archive Alfred 2 Workflow by David Ferguson</title>
		<link>http://www.dirtdon.com/?p=1538</link>
		<comments>http://www.dirtdon.com/?p=1538#comments</comments>
		<pubDate>Sun, 03 Mar 2013 17:29:13 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Alfred]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1538</guid>
		<description><![CDATA[&#160; I half-jokingly asked David on Twitter to make an Alfred 2 (Beta) workflow that could quickly search Twitter’s new downloadble tweet archive, but knowing he is a busy guy I didn’t really expect him to make it. However David came through and really delievered on another excellent add-on to Alfred. &#160; This Twitter Archive [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.dirtdon.com/?attachment_id=1539" rel="attachment wp-att-1539"><img class="aligncenter  wp-image-1539" title="twitter-archive-1" src="http://www.dirtdon.com/wp-content/uploads/2013/03/twitter-archive-1.png" alt="" width="564" height="230" /></a></p>
<p>&nbsp;</p>
<p>I half-jokingly asked David on Twitter to make an Alfred 2 (Beta) workflow that could quickly search Twitter’s new <a href="http://blog.twitter.com/2012/12/your-twitter-archive.html">downloadble tweet archive</a>, but knowing he is a busy guy I didn’t really expect him to make it. However David came through and really delievered on another excellent add-on to Alfred.</p>
<p>&nbsp;</p>
<p>This Twitter Archive workflow is easy to configure and simple to use. Just install the workflow and run the <strong>import</strong> command including the folder path to the csv data like in the example below.</p>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://www.dirtdon.com/?attachment_id=1540" rel="attachment wp-att-1540"><img class="aligncenter  wp-image-1540" title="twitter-archive-2" src="http://www.dirtdon.com/wp-content/uploads/2013/03/twitter-archive-2.png" alt="" width="574" height="204" /></a></p>
<p>&nbsp;</p>
<p>The workflow will generate its own SQLite database of your tweets, making search lightning fast. Selecting a tweet from the search results will open it in Twitter.com or you can hit CMD+C to copy the URL to your clipboard. It works flawlessly.</p>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://www.dirtdon.com/?attachment_id=1541" rel="attachment wp-att-1541"><img class="aligncenter  wp-image-1541" title="twitter-archive-3" src="http://www.dirtdon.com/wp-content/uploads/2013/03/twitter-archive-3.png" alt="" width="592" height="349" /></a></p>
<p>&nbsp;</p>
<p>Download the <a href="http://cloud.dferg.us/KDrX">Twitter Archive workflow</a></p>
<p>Also, be sure to check out his blog <a href="http://dferg.us">http://dferg.us</a> which is updated regularly with tons of Alfred goodies and follow him on Twitter <a href="https://twitter.com/jdfwarrior">@jdfwarrior</a>.</p>
<div id="tweetbutton1538" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1538&amp;via=binaryghost&amp;text=Twitter%20Archive%20Alfred%202%20Workflow%20by%20David%20Ferguson&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1538" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1538</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gitfred: An Alfred v2 (beta) Workflow for GitHub</title>
		<link>http://www.dirtdon.com/?p=1509</link>
		<comments>http://www.dirtdon.com/?p=1509#comments</comments>
		<pubDate>Sun, 13 Jan 2013 05:09:38 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Alfred]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1509</guid>
		<description><![CDATA[Alfred Mega Supporters are currently rejoicing the first beta release of Alfred v2. One of the long awaited features, teased by the developer, are the new workflows that enable users to develop comprehensive actions using many of Alfred’s powerful features wrapped up inside of neat little packages. David Ferguson has already whipped up some great examples [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://buy.alfredapp.com/upgrade">Alfred Mega Supporters</a> are currently rejoicing the first beta release of <a href="http://blog.alfredapp.com/2013/01/12/first-alfred-v2-beta-now-available-for-mega-supporters/">Alfred v2</a>. One of the long awaited features, teased by the developer, are the new workflows that enable users to develop comprehensive actions using many of Alfred’s powerful features wrapped up inside of neat little packages. <a href="http://jdfwarrior.tumblr.com/post/40354870777/a-few-alfred-2-workflows-to-get-you-started">David Ferguson</a> has already whipped up some great examples like his <a href="http://d.pr/f/7WJ5">Rdio</a> and <a href="http://d.pr/f/RrlV">Mail search</a> workflows. I thought I would share my first workflow I created for the beta Alfred v2 called <a href="http://cl.ly/M9v1"><strong>Gitfred</strong></a>. It is a workflow for interacting with your GitHub account, specifically for quickly launching repos, issues, and gists.</p>
<p style="text-align: center;"><a href="http://www.dirtdon.com/?attachment_id=1510" rel="attachment wp-att-1510"><img class="aligncenter  wp-image-1510" title="Screen Shot 2013-01-12 at 10.10.52 PM" src="http://www.dirtdon.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-12-at-10.10.52-PM.png" alt="" width="540" height="363" /></a></p>
<p>To use Gitfred, type one of these commands:</p>
<ul>
<li><strong>repos</strong> – list available repositories<br />
<a href="http://www.dirtdon.com/?attachment_id=1511" rel="attachment wp-att-1511"><img class="aligncenter  wp-image-1511" title="Screen Shot 2013-01-12 at 10.14.50 PM" src="http://www.dirtdon.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-12-at-10.14.50-PM.png" alt="" width="540" height="262" /></a></li>
<li><strong>issues</strong> – list open issues<br />
<a href="http://www.dirtdon.com/?attachment_id=1512" rel="attachment wp-att-1512"><img class="aligncenter  wp-image-1512" title="Screen Shot 2013-01-12 at 10.15.11 PM" src="http://www.dirtdon.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-12-at-10.15.11-PM.png" alt="" width="540" height="208" /></a></li>
<li><strong>gists</strong> – list view gists<br />
<a href="http://www.dirtdon.com/?attachment_id=1513" rel="attachment wp-att-1513"><img class="aligncenter  wp-image-1513" title="Screen Shot 2013-01-12 at 10.15.25 PM" src="http://www.dirtdon.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-12-at-10.15.25-PM.png" alt="" width="540" height="424" /></a></li>
</ul>
<p>*To use Gitfred, you must enter in your GitHub credentials. To do this, download and install the workflow, open the workflow folder and edit the <strong>gitfred.py</strong> file. Change the <strong>USERNAME</strong> and <strong>PASSWORD</strong> variables, then save the file and close it.</p>
<p style="text-align: center;"><a href="http://www.dirtdon.com/?attachment_id=1514" rel="attachment wp-att-1514"><img class="aligncenter  wp-image-1514" title="Screen Shot 2013-01-12 at 10.11.49 PM" src="http://www.dirtdon.com/wp-content/uploads/2013/01/Screen-Shot-2013-01-12-at-10.11.49-PM.png" alt="" width="540" height="295" /></a></p>
<p>&nbsp;</p>
<h3>Download: <a href="http://cl.ly/M9v1">Gitfred Alfred Workflow</a></h3>
<address><em>Gitfred is powered by the <a href="https://github.com/jacquev6/PyGithub">PyGithub</a> project</em></address>
<div id="tweetbutton1509" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1509&amp;via=binaryghost&amp;text=Gitfred%3A%20An%20Alfred%20v2%20%28beta%29%20Workflow%20for%20GitHub&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1509" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1509</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Regex Groups in Python</title>
		<link>http://www.dirtdon.com/?p=1484</link>
		<comments>http://www.dirtdon.com/?p=1484#comments</comments>
		<pubDate>Fri, 26 Oct 2012 13:36:41 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1484</guid>
		<description><![CDATA[Federico Viticci has me hooked on Pythonista. I am not sure what took me so long to buy it because the very premise of scripting on my phone sounds like the best idea ever. I bought it and can confirm it is (in my opinion) the best app ever. At the very least, it is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dirtdon.com/?attachment_id=1485" rel="attachment wp-att-1485"><img src="http://www.dirtdon.com/wp-content/uploads/2012/10/header.png" alt="" title="header" width="600" height="260" class="aligncenter size-full wp-image-1485" /></a></p>
<p><a href="http://www.macstories.net/tutorials/convert-twitter-com-urls-to-tweetbot-links/">Federico Viticci</a> has me hooked on <a href="http://omz-software.com/pythonista/">Pythonista</a>. I am not sure what took me so long to buy it because the very premise of scripting on my phone sounds like the best idea ever. I bought it and can confirm it is (in my opinion) the best app ever. At the very least, it is my favorite app right now.</p>
<p>This is not an app review, that may come later. No, this is more of a reminder for myself the next time I go to use regex groups in a Python script. I am extremely new to Python so when I learn how to do something I generally write my self a little text note or store the code snippet for future use, this time I am just going to share it in a blog post.</p>
<p>Groups are incredibly useful. You can use regular expressions to identify a portion of a string and assign it a group name that can be easily referenced when replacing values.</p>
<p>The syntax in Python for defining a regex group is:</p>
<pre><code>(?P&lt;foo&gt;some-regex)
</code></pre>
<p>The syntax to reference that group later is:</p>
<pre><code>\g&lt;foo&gt;
</code></pre>
<p>This is often better described with a real world example. So here is a link to a tweet on Twitter.com that I am going to break up in to multiple useful groups:</p>
<pre><code>https://twitter.com/binaryghost/statuses/261213781294718976
</code></pre>
<p>Using regex to identify the may portions of the URL (domain, user, status, and id) I can assign each chunk of the URL an identifiable name:</p>
<p><script src="https://gist.github.com/3958853.js?file=gistfile1.txt"></script></p>
<p>Now that I have my groups identified, I can call them in the substitution pattern to do something like convert the format of the link to one that is compatible with Tweetbot&#8217;s URI scheme:</p>
<pre><code>tweetbot://\g&lt;user&gt;/status/\g&lt;id&gt;
</code></pre>
<p>So when you put all this together in Python you basically get this little code snippet:</p>
<p><script src="https://gist.github.com/3958849.js?file=gistfile1.txt"></script></p>
<p>So disregarding the import statement, it is possible to identify only specific sub-strings and reuse or replace them at will with only 1 line of code. As you can see, I did not end up using &lt;domain&gt; or &lt;status&gt; and I could have probably left them out but I wanted them to be apart of the example. Every language has its own flavor of regex groups, this syntax however is specific to Python which I why I felt it best to document it with a useful example.</p>
<p>In addition here is a gist with the above code in a working example specifically written for Pythonista:</p>
<p><script src="https://gist.github.com/3958806.js?file=convert-twitter-link.py"></script></p>
<p></p>
<p>*Also check out Viticci&#8217;s <a href="http://www.macstories.net/tutorials/convert-twitter-com-urls-to-tweetbot-links/">version over at MacStories</a></p>
<div id="tweetbutton1484" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1484&amp;via=binaryghost&amp;text=Regex%20Groups%20in%20Python&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1484" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1484</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl Regex Removed From Grep in Mountain Lion</title>
		<link>http://www.dirtdon.com/?p=1452</link>
		<comments>http://www.dirtdon.com/?p=1452#comments</comments>
		<pubDate>Fri, 28 Sep 2012 23:11:10 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1452</guid>
		<description><![CDATA[I realized today that many of my shell scripts were no longer working since I upgraded to OS X 10.8. After digging in to it I found out that they were all bombing out on a common grep command I use for finding specific bits of text with Perl regular expressions. grep -Po '(?&#60;= ).*?(?= [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dirtdon.com/?attachment_id=1462" rel="attachment wp-att-1462"><img class="aligncenter size-full wp-image-1462" title="grep" src="http://www.dirtdon.com/wp-content/uploads/2012/09/grep1.jpg" alt="" width="550" height="283" /></a></p>
<p>I realized today that many of my shell scripts were no longer working since I upgraded to OS X 10.8. After digging in to it I found out that they were all bombing out on a common <strong>grep</strong> command I use for finding specific bits of text with Perl regular expressions.</p>
<pre><code>grep -Po '(?&lt;= ).*?(?= )'</code></pre>
<p>I pulled up the <strong>grep</strong> man page and couldn’t find the -P switch I had always used for Perl regex. It was definitely removed.</p>
<p>To be completely certain, I jumped on a machine running OS X 10.7.4 to see if it was in the last OS, and sure enough <a href="https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/grep.1.html">there it was</a>.</p>
<p><a href="http://www.dirtdon.com/wp-content/uploads/2012/09/perlregex.png" rel="lightbox[1452]"><img class="aligncenter size-full wp-image-1454" title="perlregex" src="http://www.dirtdon.com/wp-content/uploads/2012/09/perlregex.png" alt="" width="600" height="225" /></a></p>
<p>I am not sure why it was removed, but it was a great way to use powerful Perl regular expressions in a quick and convenient shell script. I really loved being able to whip up a quick shell script for something and use <a href="http://itunes.apple.com/us/app/patterns-the-regex-app/id429449079?mt=12">Patterns</a> for the Perl regex. I know egrep has &#8216;extended&#8217; regex but I like the Perl syntax. I guess it is time to leave my shell scripts behind and start writing in some more sophisticated scripting languages.</p>
<p>Maybe it wasn&#8217;t Apple and it was just apart of its open-source development, I don&#8217;t know, but it will be missed by me. </p>
<div id="tweetbutton1452" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1452&amp;via=binaryghost&amp;text=Perl%20Regex%20Removed%20From%20Grep%20in%20Mountain%20Lion&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1452" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1452</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Verizon vs. Sprint &#8211; iPhone 5 vs. iPhone 4S</title>
		<link>http://www.dirtdon.com/?p=1433</link>
		<comments>http://www.dirtdon.com/?p=1433#comments</comments>
		<pubDate>Fri, 21 Sep 2012 18:39:25 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1433</guid>
		<description><![CDATA[This is why I bought an iPhone 5 and switched to Verizon. Tweet]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/49928706" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p><strong>This is why I bought an iPhone 5 and switched to Verizon.</strong></p>
<div id="tweetbutton1433" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1433&amp;via=binaryghost&amp;text=Verizon%20vs.%20Sprint%20%26%238211%3B%20iPhone%205%20vs.%20iPhone%204S&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1433" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1433</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Implement Multi-File Actions in Alfred 1.3</title>
		<link>http://www.dirtdon.com/?p=1384</link>
		<comments>http://www.dirtdon.com/?p=1384#comments</comments>
		<pubDate>Tue, 17 Jul 2012 15:57:50 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Alfred]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1384</guid>
		<description><![CDATA[I wanted to write up a quick post on how I implement multi-file actions in Alfred 1.3 so you can get a better idea on how to use the new feature and hopefully use this to start making your own multi-file extensions. My language of choice, as usual, is bash; however the concept is the [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to write up a quick post on how I implement multi-file actions in Alfred 1.3 so you can get a better idea on how to use the new feature and hopefully use this to start making your own multi-file extensions.</p>
<p>My language of choice, as usual, is bash; however the concept is the same in any language. Alfred provides your extension with a tab delimited string of files that you parse and perform actions on.</p>
<p>Example:<br />
<script type="text/javascript" src="https://snipt.net/embed/9961dda1f55b2c8c7dc98f776c8b9b5f/"></script></p>
<hr />
<p>The code above is a <em>basic</em> implementation in bash that parses the input by tabs and puts each file in to an array. Then iterates through the array and does something with each file. The only line worth specifically noting is the line:</p>
<pre><code> IFS=$'\t' </code></pre>
<p>Even though tabs are already apart of the default IFS (input field separators) along with spaces and newlines – I have overwritten the IFS to consist of only tabs so that filenames with spaces don’t break up in to multiple items in the array.</p>
<p>Here is a full blown example implementation in an Alfred shell script extension that is designed to accept multiple files and batch rename the files based on a prefix supplied by the user. A download link for the extension is provided at the end of the post. <a id="fnref:1" class="footnote" title="see footnote" href="#fn:1">[1]</a></p>
<p><script type="text/javascript" src="https://snipt.net/embed/870ae99f0fb0ddf745ea2c7212e362c2/"></script></p>
<hr />
<p>*Note: In order for this extension to accept multiple files, it is required to check the new option in the extension&#8217;s settings: “Accept multiple files as argument”</p>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_1.3.png" rel="lightbox[1384]"><img class="aligncenter size-full" title="BLOG_1.3.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_1.3.png" alt="" width="434" height="302" /></a></p>
<p>To wrap this up, here is a video of the extension in action:</p>
<p><iframe src="http://player.vimeo.com/video/45760083" frameborder="0" width="500" height="281"></iframe></p>
<div class="footnotes">
<hr />
<ol>
<li id="fn:1">Alfred Extension Download Link: <a href="http://cl.ly/I57Y">Rename Multiple Files</a> <a class="reversefootnote" title="return to article" href="#fnref:1"> ↩</a></li>
</ol>
</div>
<div id="tweetbutton1384" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1384&amp;via=binaryghost&amp;text=How%20to%20Implement%20Multi-File%20Actions%20in%20Alfred%201.3&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1384" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1384</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>A Script For Scripting A Script</title>
		<link>http://www.dirtdon.com/?p=1365</link>
		<comments>http://www.dirtdon.com/?p=1365#comments</comments>
		<pubDate>Fri, 08 Jun 2012 20:09:41 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1365</guid>
		<description><![CDATA[I make a lot of scripts. I have scripts intended for long term management of tasks and files. I have made short term scripts, or single-use scripts to batch manipulate a directory of files in some custom manner. I have scripts that run at launch and other scripts to interact and automate the gathering of [...]]]></description>
			<content:encoded><![CDATA[<p>I make a lot of scripts. I have scripts intended for long term management of tasks and files. I have made short term scripts, or single-use scripts to batch manipulate a directory of files in some custom manner. I have scripts that run at launch and other scripts to interact and automate the gathering of information from web based services.</p>
<p>It occurred to me that I had never automated the process of making a script.</p>
<p>I know there is not much to starting a new script, but thats not really the point of automation. It is simply about reducing the amount of un-necessary repetition in your workflow. I realized that when I start a new script its almost always a shell script, almost always on the desktop, and there is almost always the same bit of text inside the script to get me started.</p>
<p>Here is an example of my own boiler-plate shell script:</p>
<p> <script type="text/javascript" src="https://snipt.net/embed/933544a9f5571ee1a58f9159c28d2486/"></script></p>
<p>Not much to it, but it is a great starting point. You are probably wondering why I have an empty main function even though it does not offer much in the way functionality. I find it beneficial to break up shell scripts in to functions for increased readability as well as code re-usability. A well written shell function can be copied and pasted in to any other future scripts without having to change much code.</p>
<p>Lets take a look at the code to generate this script:</p>
<p><script type="text/javascript" src="https://snipt.net/embed/0f7c6c9c6023828bfef9d13388821857/"></script></p>
<p>
You will probably want to update the NAME variable so that it reflects your own name. You don’t have to change the DIR variable unless you want your scripts to go some where other than your desktop. The script creates the file on the desktop, generates the boiler-plate content, sets executable permissions on the script, then opens it in your default text editor.</p>
<p>I should note that you do have the ability to set a filename when creating a new script. The IF/ELSE statement at the end of this code checks to see if you have sent it a filename, if it does not find one it simply names it <em>script.sh</em>. You do not need to type out the <em>.sh</em> extension because it is automatically added for you in the script. Also, don’t use spaces in your script filenames.</p>
<p>I use this script in conjunction with an Alfred extension for optimal productivity. I am attaching the extension below so feel free to download and try it out.</p>
<p>I simply launch Alfred and type either <strong>script</strong> or <strong>script someFilename</strong></p>
<p>If shell scripts aren&#8217;t your thing, this script could be easily adapted to whatever scripting language you prefer. If you need any help modifying it, just let me know and I will do my best to help you out. </p>
<p>Enjoy</p>
<p><strong>Download</strong><br />
<br />
<a href="http://cl.ly/HF6N"><img src="http://www.dirtdon.com/wp-content/uploads/2012/06/extensionicon.png" alt="" title="Extension" width="64" height="64" class="alignleft size-full wp-image-1370" /><br />
<h3> Start a new script extension</h3>
<p></a></p>
<div id="tweetbutton1365" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1365&amp;via=binaryghost&amp;text=A%20Script%20For%20Scripting%20A%20Script&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1365" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1365</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create a Simple Cork Texture in Pixelmator</title>
		<link>http://www.dirtdon.com/?p=1344</link>
		<comments>http://www.dirtdon.com/?p=1344#comments</comments>
		<pubDate>Tue, 17 Jan 2012 03:46:55 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1344</guid>
		<description><![CDATA[Fill with a brown color. I used #7f5024 Add noise. Filter &#62; Stylize &#62; Noise… Amount: 25 Monochrome checked Pixelate. Filter &#62; Stylize &#62; Pixellate… Scale: 1 Reduce noise. Filter &#62; Blur &#62; Noise Reduction… Noise level: 60 Sharpness: 0 Blur. Filter &#62; Blur &#62; Gaussian Blur… Radius: 4 Duplicate layer. Rotate top layer and [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><strong>Fill</strong> with a brown color. I used #7f5024</li>
</ul>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.21.52_PM.png" rel="lightbox[1344]"><img class="aligncenter size-full" title="BLOG_Screen_Shot_2012-01-16_at_8.21.52_PM.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.21.52_PM.png" alt="" width="440" height="458" /></a></p>
<ul>
<li><strong>Add noise</strong>. Filter &gt; Stylize &gt; Noise…</li>
<ul>
<li>Amount: 25</li>
<li>Monochrome checked</li>
</ul>
</ul>
<div><span id="more-1344"></span></div>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.22.10_PM.png" rel="lightbox[1344]"><img class="aligncenter size-full" title="BLOG_Screen_Shot_2012-01-16_at_8.22.10_PM.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.22.10_PM.png" alt="" width="440" height="418" /></a></p>
<ul>
<li><strong>Pixelate</strong>. Filter &gt; Stylize &gt; Pixellate…
<ul>
<li>Scale: 1</li>
</ul>
</li>
</ul>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.22.29_PM.png" rel="lightbox[1344]"><img class="aligncenter size-full" title="BLOG_Screen_Shot_2012-01-16_at_8.22.29_PM.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.22.29_PM.png" alt="" width="440" height="423" /></a></p>
<ul>
<li><strong>Reduce noise</strong>. Filter &gt; Blur &gt; Noise Reduction…
<ul>
<li>Noise level: 60</li>
<li>Sharpness: 0</li>
</ul>
</li>
</ul>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.23.19_PM.png" rel="lightbox[1344]"><img class="aligncenter size-full" title="BLOG_Screen_Shot_2012-01-16_at_8.23.19_PM.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.23.19_PM.png" alt="" width="440" height="410" /></a></p>
<ul>
<li><strong>Blur</strong>. Filter &gt; Blur &gt; Gaussian Blur…
<ul>
<li>Radius: 4</li>
</ul>
</li>
</ul>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.26.17_PM.png" rel="lightbox[1344]"><img class="aligncenter size-full" title="BLOG_Screen_Shot_2012-01-16_at_8.26.17_PM.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.26.17_PM.png" alt="" width="440" height="417" /></a></p>
<ul>
<li><strong>Duplicate</strong> layer.</li>
</ul>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.26.34_PM.png" rel="lightbox[1344]"><img class="aligncenter size-full" title="BLOG_Screen_Shot_2012-01-16_at_8.26.34_PM.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.26.34_PM.png" alt="" width="439" height="375" /></a></p>
<ul>
<li><strong>Rotate</strong> top layer and change <strong>Opacity</strong> to 70%</li>
</ul>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.26.50_PM.png" rel="lightbox[1344]"><img class="aligncenter size-full" title="BLOG_Screen_Shot_2012-01-16_at_8.26.50_PM.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.26.50_PM.png" alt="" width="432" height="336" /></a></p>
<ul>
<li><strong>Add</strong> random black spots with speckled brush for extra flavor</li>
</ul>
<p><a href="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.28.17_PM.png" rel="lightbox[1344]"><img class="aligncenter size-full" title="BLOG_Screen_Shot_2012-01-16_at_8.28.17_PM.png" src="https://s3.amazonaws.com/Blog_Photos/BLOG_Screen_Shot_2012-01-16_at_8.28.17_PM.png" alt="" width="437" height="449" /></a></p>
<h2 id="done">Done!</h2>
<div id="tweetbutton1344" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1344&amp;via=binaryghost&amp;text=Create%20a%20Simple%20Cork%20Texture%20in%20Pixelmator&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1344" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1344</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quickly Add Files to OmniFocus with Alfred</title>
		<link>http://www.dirtdon.com/?p=1323</link>
		<comments>http://www.dirtdon.com/?p=1323#comments</comments>
		<pubDate>Thu, 12 Jan 2012 23:09:20 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1323</guid>
		<description><![CDATA[Have you ever created a task in OmniFocus that needed a file attached? Sure you have and there are a million different ways to make that happen. But how do you track down the file that you need? I instinctively rely on Alfred because it is the path of least resistance. Alfred will find that file [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever created a task in OmniFocus that needed a file attached? Sure you have and there are a million different ways to make that happen. But how do you track down the file that you need? I instinctively rely on Alfred because it is the path of least resistance. Alfred will find that file in any directory as fast as I can type, so why not use Alfred to send that file to OmniFocus?</p>
<p>This Alfred extension is intended to be used as an <em>Action</em> and lets you send a file to whatever task is <strong>currently selected</strong> in OmniFocus. It will even ask you if want to embed the file or just create and alias to the file and add that to the task.</p>
<p>Download the extension here: <a href="http://cl.ly/DITm">Send File to OmniFocus</a></p>
<p><em>Only tested on Mac OS X Lion (current version) and OmniFocus on MAS (current version)</em></p>
<p>&nbsp;</p>
<p>Now enjoy some action shots!</p>
<p><a href="http://www.dirtdon.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-12-at-4.44.13-PM.png" rel="lightbox[1323]"><img class="aligncenter size-full wp-image-1325" title="Screen Shot 2012-01-12 at 4.44.13 PM" src="http://www.dirtdon.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-12-at-4.44.13-PM.png" alt="" width="400" height="267" /></a></p>
<p><br/></p>
<p>File embed choice:</p>
<p></p>
<p><a href="http://www.dirtdon.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-12-at-4.44.33-PM.png" rel="lightbox[1323]"><img src="http://www.dirtdon.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-12-at-4.44.33-PM.png" alt="" title="Screen Shot 2012-01-12 at 4.44.33 PM" width="400" height="270" class="aligncenter size-full wp-image-1329" /></a></p>
<p><br/></p>
<p>Result:</p>
<p></p>
<p><a href="http://www.dirtdon.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-12-at-4.44.48-PM.png" rel="lightbox[1323]"><img src="http://www.dirtdon.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-12-at-4.44.48-PM.png" alt="" title="Screen Shot 2012-01-12 at 4.44.48 PM" width="400" height="219" class="aligncenter size-full wp-image-1334" /></a></p>
<p><br/></p>
<p>Enjoy!</p>
<p></p>
<div id="tweetbutton1323" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1323&amp;via=binaryghost&amp;text=Quickly%20Add%20Files%20to%20OmniFocus%20with%20Alfred&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1323" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1323</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Authenticate for Alfred</title>
		<link>http://www.dirtdon.com/?p=1309</link>
		<comments>http://www.dirtdon.com/?p=1309#comments</comments>
		<pubDate>Mon, 05 Dec 2011 21:02:27 +0000</pubDate>
		<dc:creator>Don Southard</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.dirtdon.com/?p=1309</guid>
		<description><![CDATA[ It solves the problem of storing plaintext credentials inside Alfred extensions. Check out Authenticate Tweet]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dirtdon.com/wp-content/uploads/2011/12/lock.png" rel="lightbox[1309]"><br />
</a> It solves the problem of storing plaintext credentials inside Alfred extensions.</p>
<p>Check out <a href="http://cl.ly/CKfM">Authenticate</a></p>
<div id="tweetbutton1309" class="tw_button" style="float:right;margin-left:10px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1309&amp;via=binaryghost&amp;text=Authenticate%20for%20Alfred&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.dirtdon.com%2F%3Fp%3D1309" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.dirtdon.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.dirtdon.com/?feed=rss2&#038;p=1309</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
