<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Brett Terpstra</title>
	
	<link>http://brettterpstra.com</link>
	<description>The digital shenanigans of coder and web developer Brett Terpstra, exploring OS X, Cocoa, Ruby, Bash, PHP, WordPress and more…</description>
	<lastBuildDate>Fri, 03 Feb 2012 03:11:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BrettTerpstra" /><feedburner:info uri="brettterpstra" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.0/</creativeCommons:license><feedburner:emailServiceId>BrettTerpstra</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Connecting nvALT and Address Book</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/mFCvCBxJ130/</link>
		<comments>http://brettterpstra.com/connecting-nvalt-and-address-book/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 03:11:46 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[nvalt]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3615</guid>
		<description><![CDATA[<p>Here’s a quick, simple AppleScript to help you hook Notational Velocity/nvALT into Address Book. I sometimes want to attach a note or list of links to an entry in my address book, but I don’t like using the notes field. I tend to keep all of my notes1 in nvALT, and I prefer not to scatter them too far. All&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/connecting-nvalt-and-address-book/">Connecting nvALT and Address Book</a></p>]]></description>
			<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2012/02/Johnny-Appleseed.jpg?9d7bd4" alt="" title="Johnny Appleseed" width="300" height="199" class="alignright size-full wp-image-3616 colorbox-3615" />Here’s a quick, simple AppleScript to help you hook <a href="http://notational.net/">Notational Velocity</a>/<a href="http://brettterpstra.com/project/nvalt/">nvALT</a> into Address Book. I sometimes want to attach a note or list of links to an entry in my address book, but I don’t like using the notes field. I tend to keep <em>all</em> of my notes<sup id="fnref:diff"><a href="#fn:diff" rel="footnote">1</a></sup> in nvALT, and I prefer not to scatter them too far. All I needed was a way to quickly create and link an nvALT note to each address…</p>

<p>As of recent versions, Notational Velocity and nvALT have a URL handler for nv:// (or nvalt://). Using the <code>/find/</code> parameter allows you to initiate a search in NV from a link, e.g. <code>nv://find/abnote%3AJohnny Appleseed</code>. If you use a unique prefix and full name, you can pinpoint a single note without having to create a file or locate the note’s ID. The first time you click the link, it will open a search in NV, and pressing Return will create the note and begin editing. Once the note is there, it will locate it instantly the next time you click the link.</p>

<p>I’m using the prefix “abnote:” on my notes. This AppleScript will create the URL entry automatically from the selected entries’ first and last names, and you can edit the prefix in the script to be anything you like. Just save it as “Add NV Note.scpt” in <code>~/Library/Scripts/Applications/Address Book</code> and it will show up in your script menu<sup id="fnref:menu"><a href="#fn:menu" rel="footnote">2</a></sup> when you’re in Address Book. You can run it on a bunch of entries (it’s not optimized to run on an entire large address book, though), or one at a time as you need it.</p>

<p>I wrote this on Lion. I honestly have no idea if it works on anything earlier. It might<sup id="fnref:might"><a href="#fn:might" rel="footnote">3</a></sup>.</p>

<h2>The script</h2>


<div class="wp_syntax"><div class="code"><pre class="applescript"><span class="kw3">tell</span> <span class="kw1">application</span> <span class="st0">&quot;Address Book&quot;</span>
	<span class="kw3">set</span> thePeople <span class="kw3">to</span> <span class="kw2">the</span> <span class="kw1">selection</span>
	<span class="kw3">repeat</span> <span class="kw3">with</span> thisPerson <span class="kw3">in</span> thePeople
		<span class="kw3">set</span> theName <span class="kw3">to</span> <span class="kw1">name</span> <span class="kw3">of</span> thisPerson <span class="kw2">as</span> <span class="kw1">string</span>
		<span class="kw1">make</span> <span class="kw1">new</span> url at <span class="kw3">end</span> <span class="kw3">of</span> urls <span class="kw3">of</span> thisPerson <span class="kw3">with</span> <span class="kw1">properties</span> <span class="br0">&#123;</span>label:<span class="st0">&quot;NV Note&quot;</span>, value:<span class="st0">&quot;nv://find/abnote%3A&quot;</span> <span class="sy0">&amp;</span> theName<span class="br0">&#125;</span>
	<span class="kw3">end</span> <span class="kw3">repeat</span>
	<span class="kw1">save</span>
<span class="kw3">end</span> <span class="kw3">tell</span></pre></div></div>


<div class="footnotes">
<hr />
<ol>

<li id="fn:diff">
<p>Notes, for me, are different from <a href="http://brettterpstra.com/logging-with-day-one-geek-style/">log entries</a>. I actually <em>like</em> keeping those separate most of the time. <a href="#fnref:diff" rev="footnote">↩</a></p>
</li>

<li id="fn:menu">
<p>Enabled in AppleScript Editor, Preferences-&gt;General-&gt;Show Script menu in menubar. Or better, use <a href="http://www.red-sweater.com/fastscripts/">FastScripts</a>. <a href="#fnref:menu" rev="footnote">↩</a></p>
</li>

<li id="fn:might">
<p>It might not. <a href="#fnref:might" rev="footnote">↩</a></p>
</li>

</ol>
</div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/address-book-search-and-skype-from-the-command-line/' rel='bookmark' title='Address Book search and Skype from the command line'>Address Book search and Skype from the command line</a></li>
<li><a href='http://brettterpstra.com/nvalt-2-1-in-the-wild/' rel='bookmark' title='nvALT 2.1 in the wild'>nvALT 2.1 in the wild</a></li>
<li><a href='http://brettterpstra.com/ios-app-review-reading-list/' rel='bookmark' title='iOS App Review: Reading List'>iOS App Review: Reading List</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/connecting-nvalt-and-address-book/">Connecting nvALT and Address Book</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=mFCvCBxJ130:Gza6M-QK5FI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=mFCvCBxJ130:Gza6M-QK5FI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=mFCvCBxJ130:Gza6M-QK5FI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=mFCvCBxJ130:Gza6M-QK5FI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=mFCvCBxJ130:Gza6M-QK5FI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=mFCvCBxJ130:Gza6M-QK5FI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=mFCvCBxJ130:Gza6M-QK5FI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=mFCvCBxJ130:Gza6M-QK5FI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=mFCvCBxJ130:Gza6M-QK5FI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=mFCvCBxJ130:Gza6M-QK5FI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/mFCvCBxJ130" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/connecting-nvalt-and-address-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/connecting-nvalt-and-address-book/</feedburner:origLink></item>
		<item>
		<title>ScrivWatcher, one more time</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/nHl4WlLgRvk/</link>
		<comments>http://brettterpstra.com/scrivwatcher-one-more-time/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 14:00:36 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3607</guid>
		<description><![CDATA[<p>I’ve updated ScrivWatcher (a utility for previewing compiled Scrivener documents live in Marked) to 1.5. This version has better error handling and a progress bar showing compile progress. It’s still a droplet, you just drop onto the progress bar window instead of a drop pad, or drop a ‘.scriv’ file directly onto the icon. For the command line savvy, the&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/scrivwatcher-one-more-time/">ScrivWatcher, one more time</a></p>]]></description>
			<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2012/01/ScrivWatcher-250.png?9d7bd4" alt="" title="ScrivWatcher-250" width="250" height="250" class="alignright size-full wp-image-3608 colorbox-3607" />I’ve updated ScrivWatcher (a utility for previewing compiled Scrivener documents live in Marked) to 1.5. This version has better error handling and a progress bar showing compile progress. It’s still a droplet, you just drop onto the progress bar window instead of a drop pad, or drop a ‘.scriv’ file directly onto the icon.</p>

<p>For the command line savvy, the <a href="https://gist.github.com/1676667">gist</a> has been updated as well. Run it with “-h” to see all of the options. There’s even a progress bar in the terminal (default setting).</p>

<p>The big news, though, is that I have this working within <a href="http://markedapp.com">Marked</a>. The next version will be able to accept dropped Scrivener projects and provide a compiled preview that updates with changes from Scrivener. No external application needed! That release should be ready relatively soon, I’m putting out a beta for testing this week.</p>

<p>For now, here’s the latest (and probably last) version of ScrivWatcher:</p>

<div class="download_desc"><p class="download-icon"><a href="http://brettterpstra.com/downloads/ScrivWatcher1.5.zip?9d7bd4" title="Download ScrivWatcher (174)"><img class="colorbox-3607"  src="http://cdn2.brettterpstra.com/wp-content/uploads/downloads/thumbnails/2012/01/ScrivWatcher-250.png?9d7bd4" alt="download image for ScrivWatcher" width="64" /></a><br /><a href="http://brettterpstra.com/downloads/ScrivWatcher1.5.zip?9d7bd4" title="Download ScrivWatcher (174)" class="download-button">Download</a></p><p class="desc"><a href="http://brettterpstra.com/downloads/ScrivWatcher1.5.zip?9d7bd4" title="Download ScrivWatcher (174)">ScrivWatcher</a> — Watch a Scrivener project and preview it in Marked by dragging the .scriv file to this droplet. <a href="http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/">More Info</a></p></div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/' rel='bookmark' title='ScrivWatcher droplet, an easier live Scrivener preview'>ScrivWatcher droplet, an easier live Scrivener preview</a></li>
<li><a href='http://brettterpstra.com/preview-a-full-scrivener-document-in-marked-live/' rel='bookmark' title='Preview a full Scrivener document in Marked, live'>Preview a full Scrivener document in Marked, live</a></li>
<li><a href='http://brettterpstra.com/the-second-marked-giveaway/' rel='bookmark' title='The second Marked giveaway!'>The second Marked giveaway!</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/scrivwatcher-one-more-time/">ScrivWatcher, one more time</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=nHl4WlLgRvk:_p22zvoRyKw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=nHl4WlLgRvk:_p22zvoRyKw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=nHl4WlLgRvk:_p22zvoRyKw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=nHl4WlLgRvk:_p22zvoRyKw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=nHl4WlLgRvk:_p22zvoRyKw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=nHl4WlLgRvk:_p22zvoRyKw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=nHl4WlLgRvk:_p22zvoRyKw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=nHl4WlLgRvk:_p22zvoRyKw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=nHl4WlLgRvk:_p22zvoRyKw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=nHl4WlLgRvk:_p22zvoRyKw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/nHl4WlLgRvk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/scrivwatcher-one-more-time/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/scrivwatcher-one-more-time/</feedburner:origLink></item>
		<item>
		<title>From my Macworld Diary</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/5ei9Dtz_Tc4/</link>
		<comments>http://brettterpstra.com/from-my-macworld-diary/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 02:12:15 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[macworld]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3598</guid>
		<description><![CDATA[<p>Dear Macworld Diary, My Tech Talk this morning, “40 Tips in 40 Minutes” with David Sparks and Merlin Mann went really well, I think. I had fun doing it, anyway. I put up some show notes at the soon-to-change 40tips.com, if you’re interested. I’m looking forward to seeing David and Merlin with Rob Corddry tomorrow. If you’re around Macworld, you&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/from-my-macworld-diary/">From my Macworld Diary</a></p>]]></description>
			<content:encoded><![CDATA[<p>Dear Macworld Diary,</p>

<p>My Tech Talk this morning, “40 Tips in 40 Minutes” with David Sparks and Merlin Mann went really well, I think. I had fun doing it, anyway. I put up some show notes at the soon-to-change <a href="http://40tips.com">40tips.com</a>, if you’re interested. I’m looking forward to seeing David and Merlin <a href="http://www.macworldiworld.com/techtalks/friday-overview/friday-agenda/#964">with Rob Corddry tomorrow</a>. If you’re around Macworld, you should probably get there early!</p>

<p>Lunch with <a href="http://shawnblanc.net/">Shawn Blanc</a>, <a href="http://512pixels.net/">Stephen Hackett</a>, <a href="http://nerdgap.com/">Brett Kelly</a>, <a href="http://brooksreview.net/">Ben Brooks</a>, and <a href="http://eggfreckles.net/">Thomas Brand</a> was awesome<sup id="fnref:nerds"><a href="#fn:nerds" rel="footnote">1</a></sup>. Great to meet so many cool people all at once.</p>

<p>I just got back from a clandestine meeting at the Samovar Tea Lounge (I love that place). I had tea. We had laughs. I was shown software. It was amazing. I will pimp the hell out of it when it comes out in the next couple of months. Until then, all I can say is just prepare to have core elements of your workflow change drastically, for the better. That’s the second game-changer I’ve been shown lately but can’t disclose yet. I will go insane if this keeps happening.</p>

<p>Also, if you <em>are</em> in San Francisco right now, swing down to Jillian’s tonight before 11pm and catch up with the TUAW crew. It’s going to be a good time. Low-key, good conversation, and probably drink tickets.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:nerds">
<p>Sorry, total nerd namedrop linkfest. Really fun bunch, though. <a href="#fnref:nerds" rev="footnote">↩</a></p>
</li>

</ol>
</div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/on-my-way-to-macworld-11/' rel='bookmark' title='On my way to Macworld ’11'>On my way to Macworld ’11</a></li>
<li><a href='http://brettterpstra.com/notational-velocity-alt-5-3/' rel='bookmark' title='Notational Velocity ALT 5.3'>Notational Velocity ALT 5.3</a></li>
<li><a href='http://brettterpstra.com/speaking-at-macworld/' rel='bookmark' title='Speaking at Macworld'>Speaking at Macworld</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/from-my-macworld-diary/">From my Macworld Diary</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=5ei9Dtz_Tc4:75ON6T-1IDA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=5ei9Dtz_Tc4:75ON6T-1IDA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=5ei9Dtz_Tc4:75ON6T-1IDA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=5ei9Dtz_Tc4:75ON6T-1IDA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=5ei9Dtz_Tc4:75ON6T-1IDA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=5ei9Dtz_Tc4:75ON6T-1IDA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=5ei9Dtz_Tc4:75ON6T-1IDA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=5ei9Dtz_Tc4:75ON6T-1IDA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=5ei9Dtz_Tc4:75ON6T-1IDA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=5ei9Dtz_Tc4:75ON6T-1IDA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/5ei9Dtz_Tc4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/from-my-macworld-diary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/from-my-macworld-diary/</feedburner:origLink></item>
		<item>
		<title>ScrivWatcher droplet, an easier live Scrivener preview</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/zbTbS8qvb6s/</link>
		<comments>http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:56:15 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3594</guid>
		<description><![CDATA[<p>I got the droplet for ScrivWatcher working, so you don’t need to run the script from the command line if you don’t want to. I made some further updates to the script1, and the version on GitHub will stay in sync with this application as it develops, so you can choose to go either way. Just unzip the download below&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/">ScrivWatcher droplet, an easier live Scrivener preview</a></p>]]></description>
			<content:encoded><![CDATA[<p>I got the droplet for <a href="http://brettterpstra.com/preview-a-full-scrivener-document-in-marked-live/">ScrivWatcher</a> working, so you don’t need to run the script from the command line if you don’t want to. I made some further updates to the script<sup id="fnref:changes"><a href="#fn:changes" rel="footnote">1</a></sup>, and the <a href="https://gist.github.com/1676667/">version on GitHub</a> will stay in sync with this application as it develops, so you can choose to go either way.</p>

<p>Just unzip the download below and put the app in your Applications folder (or wherever). Then drop a <a href="http://www.literatureandlatte.com/scrivener.php">Scrivener</a> project on it and it will open the compiled file as a <a href="http://markedapp.com">Marked</a> preview and start watching. You can also launch the application and you’ll get a droppable window that you can drag Scrivener projects to, or put it in your Dock for easy access.</p>

<p>Let me know how it works. If everything’s groovy, I’ll be adding this and some other updates to the Bonus Pack as soon as possible. I’ll probably try to get droplets for the MarsEdit, nvALT, etc. watchers working as well. I present at Macworld | iWorld at 10am today, so that’s going to have to wait while I rehearse!</p>

<div class="download_desc"><p class="download-icon"><a href="http://brettterpstra.com/downloads/ScrivWatcher1.5.zip?9d7bd4" title="Download ScrivWatcher (174)"><img class="colorbox-3594"  src="http://cdn2.brettterpstra.com/wp-content/uploads/downloads/thumbnails/2012/01/ScrivWatcher-250.png?9d7bd4" alt="download image for ScrivWatcher" width="64" /></a><br /><a href="http://brettterpstra.com/downloads/ScrivWatcher1.5.zip?9d7bd4" title="Download ScrivWatcher (174)" class="download-button">Download</a></p><p class="desc"><a href="http://brettterpstra.com/downloads/ScrivWatcher1.5.zip?9d7bd4" title="Download ScrivWatcher (174)">ScrivWatcher</a> — Watch a Scrivener project and preview it in Marked by dragging the .scriv file to this droplet. <a href="http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/">More Info</a></p></div>

<h3>Changelog</h3>

<h4>1.3</h4>

<ul>
<li>Script detects whether it’s running on the command line or in the droplet. If it’s on the command line, adds progress bar support for caching and concatenating.</li>
</ul>

<h4>1.2</h4>

<ul>
<li>Error catcher for some XML parsing issues on more complex document structures</li>
<li>Rewrote the whole system to cache <code>textutil</code> conversions and only update when the rtf version is newer than the text version. It can now handle files with many sections much, much faster.</li>
<li>Turned off headline generation from page titles by default. If you want it back, you can edit the script inside the app bundle and set titles_as_headers to true. I’ll try to build a more external configuration for it soon.</li>
</ul>

<h4>1.1</h4>

<ul>
<li>Watches project XML file so changes to sorting and order update the preview as well</li>
<li>Names preview files based on project name to avoid overwriting other open previews</li>
<li>Opens dragged document in Scrivener if it’s not already open</li>
</ul>

<div class="footnotes">
<hr />
<ol>

<li id="fn:changes">
<p>mostly just in error handling, but it also quits when Marked quits now. That’s handy if you’re running in the background. <a href="#fnref:changes" rev="footnote">↩</a></p>
</li>

</ol>
</div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/preview-a-full-scrivener-document-in-marked-live/' rel='bookmark' title='Preview a full Scrivener document in Marked, live'>Preview a full Scrivener document in Marked, live</a></li>
<li><a href='http://brettterpstra.com/scrivwatcher-one-more-time/' rel='bookmark' title='ScrivWatcher, one more time'>ScrivWatcher, one more time</a></li>
<li><a href='http://brettterpstra.com/marked-scripts-nvalt-evernote-marsedit-scrivener/' rel='bookmark' title='Marked scripts: nvALT, Evernote, MarsEdit, Scrivener'>Marked scripts: nvALT, Evernote, MarsEdit, Scrivener</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/">ScrivWatcher droplet, an easier live Scrivener preview</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=zbTbS8qvb6s:PXuUAWizmgA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=zbTbS8qvb6s:PXuUAWizmgA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=zbTbS8qvb6s:PXuUAWizmgA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=zbTbS8qvb6s:PXuUAWizmgA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=zbTbS8qvb6s:PXuUAWizmgA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=zbTbS8qvb6s:PXuUAWizmgA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=zbTbS8qvb6s:PXuUAWizmgA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=zbTbS8qvb6s:PXuUAWizmgA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=zbTbS8qvb6s:PXuUAWizmgA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=zbTbS8qvb6s:PXuUAWizmgA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/zbTbS8qvb6s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/</feedburner:origLink></item>
		<item>
		<title>Preview a full Scrivener document in Marked, live</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/IJrsWujVVys/</link>
		<comments>http://brettterpstra.com/preview-a-full-scrivener-document-in-marked-live/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 19:25:59 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3589</guid>
		<description><![CDATA[<p>BooneJS tweeted me a script yesterday that takes my original “scrivwatch” script and makes it handle full Scrivener documents. It scrapes the XML file to get the order of RTF files in the document, then used the original method to convert and concatenate all of it into a plain text file. If you write in Scrivener using Markdown, you get&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/preview-a-full-scrivener-document-in-marked-live/">Preview a full Scrivener document in Marked, live</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="https://twitter.com/#!/BooneJS">BooneJS</a> tweeted me a script yesterday that takes my original <a href="http://brettterpstra.com/marked-scripts-nvalt-evernote-marsedit-scrivener/">“scrivwatch”</a> script and makes it handle full Scrivener documents. It scrapes the XML file to get the order of RTF files in the document, then used the original method to convert and concatenate all of it into a plain text file. If you write in Scrivener using Markdown, you get a file that <a href="http://markedapp.com">Marked</a> can preview as a rendered document with any theme. It uses the original datestamp polling to watch for any change in any of the files in the project and update Marked within a second or two.</p>

<p>I took the script and ran with it this morning, switching it over to REXML parsing and adding in titles for sections and pages. The original script broke on a couple of my projects, but the recursive XML handler I set up fixes the issue.</p>

<p>To run it, you just need to save the script on your drive and make it executable (<code>chmod a+x /path/to/scrivwatcher.rb</code>). Then you can run <code>/path/to/scrivwatcher.rb /path/to/YourProject.scriv</code>. Marked will open automatically and changes will be reflected every time you save. To stop the script, you need to type Control-c in the terminal window you ran it from.</p>

<p>I’m going to try to wrap this into a droplet that you can just drop a Scrivener project on and launch both Scrivener and Marked with scrivwatcher syncing the two. Once I’ve determined whether that’s win or fail, I’ll update the <a href="http://support.markedapp.com/kb/how-to-tips-and-tricks/marked-bonus-pack-scripts-commands-and-bundles">Marked Bonus Pack</a> with it. Yes, I will eventually find time to build this functionality into Marked, along with the rest of the Bonus Pack scripts.</p>

<p>The script is currently a <a href="https://gist.github.com/1676667">gist on GitHub</a> if you want to play with it. I’ll be updating the gist as I have time to clean it up and make a few things (much) more elegant. If you want to fork and help me out, it’s always appreciated!</p>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/scrivwatcher-droplet-an-easier-live-scrivener-preview/' rel='bookmark' title='ScrivWatcher droplet, an easier live Scrivener preview'>ScrivWatcher droplet, an easier live Scrivener preview</a></li>
<li><a href='http://brettterpstra.com/scrivwatcher-one-more-time/' rel='bookmark' title='ScrivWatcher, one more time'>ScrivWatcher, one more time</a></li>
<li><a href='http://brettterpstra.com/marked-scripts-nvalt-evernote-marsedit-scrivener/' rel='bookmark' title='Marked scripts: nvALT, Evernote, MarsEdit, Scrivener'>Marked scripts: nvALT, Evernote, MarsEdit, Scrivener</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/preview-a-full-scrivener-document-in-marked-live/">Preview a full Scrivener document in Marked, live</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=IJrsWujVVys:kNC4OmaIRZg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=IJrsWujVVys:kNC4OmaIRZg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=IJrsWujVVys:kNC4OmaIRZg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=IJrsWujVVys:kNC4OmaIRZg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=IJrsWujVVys:kNC4OmaIRZg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=IJrsWujVVys:kNC4OmaIRZg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=IJrsWujVVys:kNC4OmaIRZg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=IJrsWujVVys:kNC4OmaIRZg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=IJrsWujVVys:kNC4OmaIRZg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=IJrsWujVVys:kNC4OmaIRZg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/IJrsWujVVys" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/preview-a-full-scrivener-document-in-marked-live/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/preview-a-full-scrivener-document-in-marked-live/</feedburner:origLink></item>
		<item>
		<title>Web excursions: January 20, 2012 — January 24, 2012</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/0AfKC60fl6Y/</link>
		<comments>http://brettterpstra.com/web-excursions-january-20-2012-january-24-2012/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 06:01:27 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[bookmarks]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3573</guid>
		<description><![CDATA[<p>Links of interest from January 20, 2012 through January 24, 2012: Magnus iPad standVia Justin Blanton, a new item for my wishlist. A better Photoshop grid for responsive web designElliot Jay Stocks gives us an awesome Photoshop template for a responsive web design layout. filmgirl/TextMate-ThemesChristina Warren’s TextMate theme compliation (they work with Sublime Text 2, as well). Some classics and&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/web-excursions-january-20-2012-january-24-2012/">Web excursions: January 20, 2012 — January 24, 2012</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Links of interest from <em>January 20, 2012 through January 24, 2012</em>:</strong></p>

<ul>
<li><strong><a href="http://www.tenonedesign.com/magnus.php">Magnus iPad stand</a></strong><br />Via <a href="http://hypertext.net/2012/01/magnus">Justin Blanton</a>, a new item for my wishlist.</li>
<li><strong><a href="http://elliotjaystocks.com/blog/a-better-photoshop-grid-for-responsive-web-design/">A better Photoshop grid for responsive web design</a></strong><br />Elliot Jay Stocks gives us an awesome Photoshop template for a responsive web design layout.</li>
<li><strong><a href="https://github.com/filmgirl/TextMate-Themes/">filmgirl/TextMate-Themes</a></strong><br />Christina Warren’s TextMate theme compliation (they work with Sublime Text 2, as well). Some classics and some greats. Some previews can be seen <a href="http://mashable.com/2010/07/07/textmate-themes-list/">here</a>.</li>
<li><strong><a href="http://nnutter.com/2012/01/git-todo/">Git Todo</a></strong><br />This is great. I plan to incorporate it with my prompt_command to work like <code>na</code>, but I love the simplicity.</li>
<li><strong><a href="http://codr.cc/">codr.cc</a></strong><br />Awesome little pastebin with live code editing/viewing capabilities. It uses CodeMirror extensions for various languages and provides public, read-only viewing urls. Cool stuff.</li>
</ul>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/new-safari-extensions-give-good-source/' rel='bookmark' title='New Safari Extensions give good source'>New Safari Extensions give good source</a></li>
<li><a href='http://brettterpstra.com/ios-inspired-popup-box-css/' rel='bookmark' title='iOS-inspired popup box CSS'>iOS-inspired popup box CSS</a></li>
<li><a href='http://brettterpstra.com/web-excursions-august-9-2011-august-12-2011/' rel='bookmark' title='Web excursions: August 9, 2011 — August 12, 2011'>Web excursions: August 9, 2011 — August 12, 2011</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/web-excursions-january-20-2012-january-24-2012/">Web excursions: January 20, 2012 — January 24, 2012</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=0AfKC60fl6Y:Xp5TeSD5C9I:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=0AfKC60fl6Y:Xp5TeSD5C9I:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=0AfKC60fl6Y:Xp5TeSD5C9I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=0AfKC60fl6Y:Xp5TeSD5C9I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=0AfKC60fl6Y:Xp5TeSD5C9I:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=0AfKC60fl6Y:Xp5TeSD5C9I:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=0AfKC60fl6Y:Xp5TeSD5C9I:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=0AfKC60fl6Y:Xp5TeSD5C9I:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=0AfKC60fl6Y:Xp5TeSD5C9I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=0AfKC60fl6Y:Xp5TeSD5C9I:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/0AfKC60fl6Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/web-excursions-january-20-2012-january-24-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/web-excursions-january-20-2012-january-24-2012/</feedburner:origLink></item>
		<item>
		<title>A Service for writing MultiMarkdown footnotes inline</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/6hkY8aU91ho/</link>
		<comments>http://brettterpstra.com/a-service-for-writing-multimarkdown-footnotes-inline/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 16:52:39 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[multimarkdown]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[service]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3576</guid>
		<description><![CDATA[<p>This post should have been titled “What happens to my mornings.” I get a lot of one-off requests for scripts and tips on how to handle tasks specific to people’s workflow or writing style. I generally keep myself pretty busy, so I usually reply with a quick idea or thought and leave it up to them to run with it.&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/a-service-for-writing-multimarkdown-footnotes-inline/">A Service for writing MultiMarkdown footnotes inline</a></p>]]></description>
			<content:encoded><![CDATA[<p>This post should have been titled “What happens to my mornings.”</p>

<p>I get a lot of one-off requests for scripts and tips on how to handle tasks specific to people’s workflow or writing style. I generally keep myself pretty busy, so I usually reply with a quick idea or thought and leave it up to them to run with it. <a href="http://havecamerawilltravel.com/">David Coleman</a> emailed me this morning, though, with a request that struck me as an interesting enough idea to whip up a script before work.</p>

<p>What David wanted to do was take the idea behind my “Inline Links to References” command in the <a href="http://brettterpstra.com/project/markdown-service-tools/">Markdown Service Tools</a> and do something similar for footnotes, allowing him to write footnotes inline in a paragraph and have them converted before processing with MultiMarkdown. It’s not such a chore to skip a few lines and drop in the footnote syntax that this should be part of the spec, but it <em>is</em> something I would find handy in several situations. So…</p>

<p><span id="more-3576"></span></p>

<p>The format I picked uses a syntax like this to denote a footnote:</p>

<pre><code>This is the regular text(*This is the footnote*), and you can drop the footnote in at any point.
</code></pre>

<p>The Service can handle footnotes inside of lines, at the end of lines, spanning multiple lines with breaks (creates paragraphs) and does fine with Markdown <em>within</em> the footnote. One nice thing about this syntax is that–if you’re previewing as you write–it italicizes the output to differentiate it until you’ve used the service to move it out of the main text.</p>

<p>Multi-line footnotes need to begin at the end of a line of text, and just use double-newlines to separate paragraphs within the footnote, e.g.:</p>

<pre><code>...the end of the paragraph. (*This is a footnote

which is going to span

more than one line*)
</code></pre>

<p>Here’s the script, also available as a Service download at the end of the post.</p>

<p><strong>Update:</strong> I just added a fix (in code below and the Service download) for making sure that footnote reference titles aren’t duplicated if you have existing MultiMarkdown-formatted footnotes in the document.</p>


<div class="wp_syntax"><div class="code"><pre class="ruby"><span class="co1">#!/usr/bin/env ruby</span>
&nbsp;
<span class="kw1">def</span> e_sh<span class="br0">&#40;</span>str<span class="br0">&#41;</span>
	str.<span class="me1">to_s</span>.<span class="kw3">gsub</span><span class="br0">&#40;</span><span class="sy0">/</span><span class="br0">&#40;</span>?=<span class="br0">&#91;</span>^a<span class="sy0">-</span>zA<span class="sy0">-</span>Z0<span class="sy0">-</span><span class="nu0">9</span>_.\<span class="sy0">/</span>\<span class="sy0">-</span>\x7F<span class="sy0">-</span>\xFF\n<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">/</span>n, <span class="st0">'<span class="es0">\\</span>'</span><span class="br0">&#41;</span>
<span class="kw1">end</span>
&nbsp;
input = STDIN.<span class="me1">read</span>
&nbsp;
footnotes = input.<span class="me1">scan</span><span class="br0">&#40;</span><span class="sy0">/</span>\<span class="br0">&#40;</span>\<span class="sy0">*</span><span class="br0">&#40;</span>.<span class="sy0">*</span>?<span class="br0">&#41;</span>\<span class="sy0">*</span>\<span class="br0">&#41;</span><span class="sy0">/</span>m<span class="br0">&#41;</span>
existing = input.<span class="me1">scan</span><span class="br0">&#40;</span><span class="sy0">/</span>^\<span class="br0">&#91;</span>\^fn<span class="br0">&#40;</span>\d<span class="sy0">+</span><span class="br0">&#41;</span>\<span class="br0">&#93;</span>: <span class="sy0">/</span>i<span class="br0">&#41;</span>
counter = existing.<span class="me1">empty</span>? ? <span class="nu0">1</span> : existing.<span class="me1">uniq</span>.<span class="me1">sort</span><span class="br0">&#91;</span><span class="sy0">-</span><span class="nu0">1</span><span class="br0">&#93;</span>.<span class="me1">join</span>.<span class="me1">to_i</span> <span class="sy0">+</span> <span class="nu0">1</span>
&nbsp;
output = <span class="br0">&#91;</span><span class="br0">&#93;</span>
footnotes.<span class="me1">each</span> <span class="br0">&#123;</span><span class="sy0">|</span>note<span class="sy0">|</span> 
	output <span class="sy0">&lt;&lt;</span> <span class="br0">&#123;</span><span class="st0">'orig'</span> <span class="sy0">=&gt;</span> note<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>, <span class="st0">'title'</span> <span class="sy0">=&gt;</span> <span class="st0">&quot;fn#{counter}&quot;</span>, <span class="st0">'footnote'</span> <span class="sy0">=&gt;</span> note<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span> <span class="br0">&#125;</span>
	counter <span class="sy0">+</span>= <span class="nu0">1</span>
<span class="br0">&#125;</span>
&nbsp;
o = <span class="br0">&#91;</span><span class="br0">&#93;</span>
output.<span class="me1">each_with_index</span> <span class="br0">&#123;</span> <span class="sy0">|</span>x,i<span class="sy0">|</span> 
	o.<span class="me1">push</span><span class="br0">&#40;</span><span class="st0">&quot;[^#{x['title']}]: #{x['footnote'].gsub(/<span class="es0">\n</span><span class="es0">\n</span>(<span class="es0">\s</span>*.)/,&quot;</span>\n\n\t\\<span class="nu0">1</span><span class="st0">&quot;)}&quot;</span><span class="br0">&#41;</span>
	input.<span class="kw3">gsub!</span><span class="br0">&#40;</span><span class="sy0">/</span>\<span class="br0">&#40;</span>\<span class="sy0">*</span><span class="co1">#{e_sh x['orig']}\*\)/m,&quot;[^#{x['title']}]&quot;)</span>
<span class="br0">&#125;</span>
<span class="kw3">puts</span> input.<span class="me1">strip</span> <span class="sy0">+</span> <span class="st0">&quot;<span class="es0">\n</span><span class="es0">\n</span>#{o.join(&quot;</span>\n\n<span class="st0">&quot;)}<span class="es0">\n</span>&quot;</span></pre></div></div>


<p>I’m in San Francisco for an AOL Tech code jam right now, so I don’t have a lot of time to thoroughly test this. Please let me know about any bugs that need fixing.</p>

<p>If you’re in San Francisco and like coffee or beer, hit me up <a href="http://twitter.com/ttscoff">on Twitter</a>. If you’re here for Macworld, then you’d better be at my <a href="http://www.macworldiworld.com/techtalks/thursday-overview/thursday-agenda/#903">“40 Tips in 40 Minutes”</a> talk with David Sparks and Merlin Mann on Thursday!</p>

<div class="download_desc"><p class="download-icon"><a href="http://brettterpstra.com/downloads/ConvertInlineFootnotesService1.21.zip?9d7bd4" title="Download Convert Inline Footnotes Service (61)"><img class="colorbox-3576"  src="http://brettterpstra.com/wp-content/plugins/download-monitor/page-addon/thumbnail.gif?9d7bd4" alt="download image for Convert Inline Footnotes Service" width="64" /></a><br /><a href="http://brettterpstra.com/downloads/ConvertInlineFootnotesService1.21.zip?9d7bd4" title="Download Convert Inline Footnotes Service (61)" class="download-button">Download</a></p><p class="desc"><a href="http://brettterpstra.com/downloads/ConvertInlineFootnotesService1.21.zip?9d7bd4" title="Download Convert Inline Footnotes Service (61)">Convert Inline Footnotes Service</a> — Convert inline footnotes in ‘(*Footnote to be created*)‘ format to MultiMarkdown footnotes. <a href="http://brettterpstra.com/a-service-for-writing-multimarkdown-footnotes-inline">More Info</a></p></div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/' rel='bookmark' title='A better System Service for Evernote clipping — with MultiMarkdown'>A better System Service for Evernote clipping — with MultiMarkdown</a></li>
<li><a href='http://brettterpstra.com/auto-convert-your-inline-markdown-links-to-references/' rel='bookmark' title='Auto-convert your inline Markdown links to references'>Auto-convert your inline Markdown links to references</a></li>
<li><a href='http://brettterpstra.com/a-system-service-for-to-url-shortening/' rel='bookmark' title='A System Service for to. url shortening'>A System Service for to. url shortening</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/a-service-for-writing-multimarkdown-footnotes-inline/">A Service for writing MultiMarkdown footnotes inline</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=6hkY8aU91ho:w6b1wqtRAhg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=6hkY8aU91ho:w6b1wqtRAhg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=6hkY8aU91ho:w6b1wqtRAhg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=6hkY8aU91ho:w6b1wqtRAhg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=6hkY8aU91ho:w6b1wqtRAhg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=6hkY8aU91ho:w6b1wqtRAhg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=6hkY8aU91ho:w6b1wqtRAhg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=6hkY8aU91ho:w6b1wqtRAhg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=6hkY8aU91ho:w6b1wqtRAhg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=6hkY8aU91ho:w6b1wqtRAhg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/6hkY8aU91ho" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/a-service-for-writing-multimarkdown-footnotes-inline/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/a-service-for-writing-multimarkdown-footnotes-inline/</feedburner:origLink></item>
		<item>
		<title>iOS-inspired popup box CSS</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/Ysh6guVT-GE/</link>
		<comments>http://brettterpstra.com/ios-inspired-popup-box-css/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 21:00:19 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3564</guid>
		<description><![CDATA[<p>I tweeted the other day that I had made some CSS buttons in a sleep-deprived haze that I really dug. The only reason I even remembered they were there was a command-line-generated entry in Day One that linked to the file. This is why I log. Anyway, I polished them up a little and threw up a GitHub page for&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/ios-inspired-popup-box-css/">iOS-inspired popup box CSS</a></p>]]></description>
			<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2012/01/popupcssscreenshot.jpg?9d7bd4" alt="Popup CSS Screenshot" title="Popup CSS" width="300" height="323" class="alignright size-full wp-image-3565 colorbox-3564" />I tweeted the other day that I had made some CSS buttons in a sleep-deprived haze that I really dug. The only reason I even remembered they were there was a <a href="http://brettterpstra.com/logging-with-day-one-geek-style/">command-line-generated entry in Day One</a> that linked to the file. This is why <a href="http://brettterpstra.com/a-solution-for-scatterbrains/">I log</a>.</p>

<p>Anyway, I polished them up a little and threw up a GitHub page for them. If you’re a web designer and you’re looking for an iOS-like popup style, they might be of use to you. You can see the demo, the markup and classes and download the CSS (and minified version) at <a href="http://ttscoff.github.com/popupsCSS/">http://ttscoff.github.com/popupsCSS/</a>.</p>

<p><strong>Late “I-forgot-to-mention” addendum:</strong> These styles were developed primarily with <a href="http://markedapp.com">Marked</a> in mind, meaning there are <del datetime="2012-01-20T21:38:59+00:00">no non-webkit vendor prefixes</del> <ins datetime="2012-01-20T21:38:59+00:00">I guess I put in prefixless and moz versions in my sleep again</ins> and they are not at all cross-browser tested. I’ll put up a more complete version when I get a chance. If you take matters into your own hands, please fork on github or send me your updates for inclusion!</p>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/title-track-something-precious/' rel='bookmark' title='Title track: Something Precious'>Title track: Something Precious</a></li>
<li><a href='http://brettterpstra.com/pinboard-redesign-experiment/' rel='bookmark' title='Pinboard redesign experiment'>Pinboard redesign experiment</a></li>
<li><a href='http://brettterpstra.com/textmate-drag-command-for-base64-encoding-images/' rel='bookmark' title='TextMate drag command for Base64 encoding images'>TextMate drag command for Base64 encoding images</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/ios-inspired-popup-box-css/">iOS-inspired popup box CSS</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=Ysh6guVT-GE:cWB9ewVibks:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=Ysh6guVT-GE:cWB9ewVibks:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=Ysh6guVT-GE:cWB9ewVibks:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=Ysh6guVT-GE:cWB9ewVibks:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=Ysh6guVT-GE:cWB9ewVibks:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=Ysh6guVT-GE:cWB9ewVibks:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=Ysh6guVT-GE:cWB9ewVibks:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=Ysh6guVT-GE:cWB9ewVibks:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=Ysh6guVT-GE:cWB9ewVibks:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=Ysh6guVT-GE:cWB9ewVibks:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/Ysh6guVT-GE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/ios-inspired-popup-box-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/ios-inspired-popup-box-css/</feedburner:origLink></item>
		<item>
		<title>System Service: Clip to Day One</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/EgdStKpCIj4/</link>
		<comments>http://brettterpstra.com/system-service-clip-to-day-one/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 22:53:25 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[service]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3555</guid>
		<description><![CDATA[<p>I’m enjoying logging with Day One right now, and getting geeky with it. To that end, I put this project together during the few breaks I’ve had over the last couple of days leading up to the new Engadget live blog launch today1. The result is a practical proof of concept in the form of a System Service for clipping&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/system-service-clip-to-day-one/">System Service: Clip to Day One</a></p>]]></description>
			<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2012/01/dayoneautomator.jpg?9d7bd4" alt="" title="dayoneautomator" width="250" height="243" class="alignright size-full wp-image-3556 colorbox-3555" />I’m enjoying logging with <a href="http://dayoneapp.com/">Day One</a> right now, and <a href="http://brettterpstra.com/logging-with-day-one-geek-style/">getting geeky with it</a>. To that end, I put this project together during the few breaks I’ve had over the last couple of days leading up to the new <a href="http://www.engadget.com/">Engadget</a> live blog launch today<sup id="fnref:lb"><a href="#fn:lb" rel="footnote">1</a></sup>. The result is a practical proof of concept in the form of a System Service for clipping any text to Day One. I figured that this could actually be really handy for more people than just me, so here it is.</p>

<p><span id="more-3555"></span></p>

<p>Dayone uses a very simple XML format in separate files to store your entries. It’s easy to replicate the structure using a script, allowing you to directly generating your own Day One entries from any part of your workflow. I’m bypassing the <code>dayone</code> CLI and dropping the updates in directly for added flexibility. Don’t get me wrong, I absolutely <em>love</em> that Day One comes with a CLI, I just wanted to experiment around it.</p>

<p>I’m using the new iCloud support for sync, and this Service is built to work with that folder structure by default. The version below (and in the download) looks in “~/Library/Mobile Documents/” (where iCloud stores documents) for a folder containing the word “dayoneapp.” I don’t know offhand what the bizarre names of the folders indicate, but they differ between accounts, so we have to grep out the matching folder. Assuming your Journal is called Journal_dayone (default) and you’re using iCloud, you shouldn’t have to edit anything. If it doesn’t work, run this in Terminal and copy the resulting path into the “dayonepath” variable:</p>

<pre><code>find ~/Library/Mobile\ Documents/ -name "Journal_dayone"
</code></pre>

<p>If you’re using Dropbox, you’ll just need to make a minor alteration to the “dayonepath” variable. Delete the line starting with “dayonedir” and hardcode the Unix (POSIX) path to the “entries” folder, located directly inside of the Journal.dayone bundle in your Dropbox root folder. It will most likely be <code>/Users/[yourusername]/Dropbox/Journal.dayone/entries/</code> if you haven’t changed any defaults in Dropbox or Day One.</p>

<p>The service itself is available for download at the end of the post, or you can take the script below and home-roll your own in Automator. It should work out of the box, no need for ruby gems or symlinked CLIs.</p>

<p>The only configuration you <em>may</em> want to edit is the “starred” variable. This defaults to off because Services aren’t interactive and you probably don’t want to star <em>every</em> entry you clip. If you <em>do</em>, though, just change “starred = false” to “starred = true” and it will make your calendar look like a planetarium.</p>

<p>The Service will use <code>/usr/bin/textutil</code> to strip out any rich text artifacts. I’m not certain this is necessary, but I found that when clipping rich text I would lose all of my line breaks and indents. This seems to solve it. The script also looks for text with hard breaks and handles them Github-style, preserving breaks using Markdown line break syntax.</p>

<p>If you have <a href="http://growl.info">Growl</a> running, you’ll get a notification. To be polite, it checks for Growl before attempting any notifications. The check can be slow sometimes, though, so you may want to either remove the check if you always have Growl running, or remove the whole Growl section at the end if you don’t.</p>

<h3>The script:</h3>

<p>Here’s the script. The same script can be found in the Service download at the end by opening the .workflow file in Automator. You can easily customize/edit from there, so this is posted just for reference.</p>


<div class="wp_syntax"><div class="code"><pre class="ruby">require 'time'
require 'erb'
&nbsp;
def e_sh(str)
	str.to_s.gsub(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF\n])/n, '\\').gsub(/\n/, &quot;'\n'&quot;).sub(/^$/, &quot;''&quot;)
end
&nbsp;
input = STDIN.read
entrytext = %x{echo #{e_sh input}|textutil -stdin -convert txt -stdout}
entrytext.gsub!(/\n([^\n])/,&quot;    \n\\1&quot;)
uuid = %x{uuidgen}.gsub(/-/,'').strip
datestamp = Time.now.utc.iso8601
starred = false
&nbsp;
dayonedir = %x{ls ~/Library/Mobile\\ Documents/|grep dayoneapp}.strip
dayonepath = &quot;~/Library/Mobile\ Documents/#{dayonedir}/Documents/Journal_dayone/entries/&quot;
&nbsp;
template = ERB.new &lt;&lt;-XMLTEMPLATE
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
	&lt;key&gt;Creation Date&lt;/key&gt;
	&lt;date&gt;<span class="sy0">&lt;%</span>= datestamp <span class="sy0">%&gt;</span>&lt;/date&gt;
	&lt;key&gt;Entry Text&lt;/key&gt;
	&lt;string&gt;&lt;![CDATA[<span class="sy0">&lt;%</span>= entrytext <span class="sy0">%&gt;</span>]]&gt;&lt;/string&gt;
	&lt;key&gt;Starred&lt;/key&gt;
	&lt;<span class="sy0">&lt;%</span>= starred <span class="sy0">%&gt;</span>/&gt;
	&lt;key&gt;UUID&lt;/key&gt;
	&lt;string&gt;<span class="sy0">&lt;%</span>= uuid <span class="sy0">%&gt;</span>&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;
XMLTEMPLATE
&nbsp;
fh = File.new(File.expand_path(dayonepath+uuid+&quot;.doentry&quot;),'w+')
fh.puts template.result(binding)
fh.close
&nbsp;
growl_running = %x{osascript -e 'tell application &quot;system events&quot; to return (count of (every process whose bundle identifier is &quot;com.Growl.GrowlHelperApp&quot;)) &gt; 0'}
&nbsp;
if growl_running
  %x{osascript -e 'tell application id &quot;com.Growl.GrowlHelperApp&quot; to register as application &quot;Clip to Day One&quot; all notifications {&quot;Clip Complete&quot;} default notifications {&quot;Clip Complete&quot;} icon of application &quot;Day One&quot;'}
  %x{osascript -e 'tell application id &quot;com.Growl.GrowlHelperApp&quot; to notify with name &quot;Clip Complete&quot; title &quot;Log to Day One&quot; description &quot;Clipped to Day One&quot; application name &quot;Clip to Day One&quot;'}
end</pre></div></div>


<p><strong>Side note:</strong> I mentioned to <a href="https://twitter.com/#!/brianstucki">@brianstucki</a> that this Service might contain the necessary ingredients for an Evernote-to-Day-One solution, but I’ve realized it’s really only the last part of the equation. What you’d probably want to do with most RTF/text notes is export HTML, extract the “created on” meta and parse it into the correct date format, then pipe the rest of the contents through markdownify_cli.php, passing the result to <code>dayone new</code>. Then you’ll have nice, Markdown versions of your notes from Evernote, preserving much of the formatting. I tested this, and it works pretty flawlessly for text notes.</p>

<h3>Download</h3>

<p>For complete instructions on installing the service (and adding a keyboard shortcut for it), see the how-to <a href="http://brettterpstra.com/howtos/install-an-os-x-system-service/">posted here</a>.</p>

<div class="download_desc"><p class="download-icon"><a href="http://brettterpstra.com/downloads/ClipToDayOne.service.zip?9d7bd4" title="Download Clip to Day One Service (124)"><img class="colorbox-3555"  src="http://cdn2.brettterpstra.com/wp-content/uploads/downloads/thumbnails/2012/01/dayoneautomator.jpg?9d7bd4" alt="download image for Clip to Day One Service" width="64" /></a><br /><a href="http://brettterpstra.com/downloads/ClipToDayOne.service.zip?9d7bd4" title="Download Clip to Day One Service (124)" class="download-button">Download</a></p><p class="desc"><a href="http://brettterpstra.com/downloads/ClipToDayOne.service.zip?9d7bd4" title="Download Clip to Day One Service (124)">Clip to Day One Service</a> — A System Service to clip any text to a Day One journal entry. <a href="http://brettterpstra.com/system-service-clip-to-day-one/">More Info</a></p></div>

<div class="footnotes">
<hr />
<ol>

<li id="fn:lb">
<p>If you missed it, you missed out, but it’s going to get even better. You’ll have a ton of opportunities in the next couple of months  to check out what is almost certainly–and it’s not just me saying this–the best tool available for live blogging events. <em>I’m so excited, I just can’t hide it…</em> <a href="#fnref:lb" rev="footnote">↩</a></p>
</li>

</ol>
</div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/quick-tip-quickly-clear-stuck-growl-notifications/' rel='bookmark' title='Quick Tip: Quickly clear stuck Growl notifications'>Quick Tip: Quickly clear stuck Growl notifications</a></li>
<li><a href='http://brettterpstra.com/a-system-service-for-to-url-shortening/' rel='bookmark' title='A System Service for to. url shortening'>A System Service for to. url shortening</a></li>
<li><a href='http://brettterpstra.com/updated-songza-lucky-link-service/' rel='bookmark' title='Updated: Songza Lucky Link Service'>Updated: Songza Lucky Link Service</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/system-service-clip-to-day-one/">System Service: Clip to Day One</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=EgdStKpCIj4:UT3ZD1UyTHI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=EgdStKpCIj4:UT3ZD1UyTHI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=EgdStKpCIj4:UT3ZD1UyTHI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=EgdStKpCIj4:UT3ZD1UyTHI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=EgdStKpCIj4:UT3ZD1UyTHI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=EgdStKpCIj4:UT3ZD1UyTHI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=EgdStKpCIj4:UT3ZD1UyTHI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=EgdStKpCIj4:UT3ZD1UyTHI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=EgdStKpCIj4:UT3ZD1UyTHI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=EgdStKpCIj4:UT3ZD1UyTHI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/EgdStKpCIj4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/system-service-clip-to-day-one/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/system-service-clip-to-day-one/</feedburner:origLink></item>
		<item>
		<title>Logging with Day One, geek style</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/qYC835DtpTc/</link>
		<comments>http://brettterpstra.com/logging-with-day-one-geek-style/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 01:17:45 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3543</guid>
		<description><![CDATA[<p>I have long kept a journal–more precisely, a log–using VoodooPad with the Scratchpad scripts by Ian Beck. It’s been a great system, but after years of usage it’s started to become a bit cumbersome. VoodooPad can handle the load, but running the custom scripts is inconvenient on a document with thousands of pages. In the interest of trying new things&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/logging-with-day-one-geek-style/">Logging with Day One, geek style</a></p>]]></description>
			<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2012/01/Day-One_icon.jpg?9d7bd4" alt="" title="Day One_icon" width="250" height="250" class="alignright size-full wp-image-3545 colorbox-3543" />I have long kept a journal–more precisely, a log–using VoodooPad with the <a href="http://tagamac.com/2009/09/scratchpad_part2/">Scratchpad scripts</a> by Ian Beck. It’s been a great system, but after years of usage it’s started to become a bit cumbersome. VoodooPad can handle the load, but running the custom scripts is inconvenient on a document with thousands of pages. In the interest of trying new things (and fiddling away some time this evening), I decided to try switching the system over to Day One.</p>

<p><a href="http://dayoneapp.com/">Day One</a> is a gorgeous app for keeping a personal journal. I discovered it, if I recall correctly, <a href="http://www.macsparky.com/blog/2011/12/21/journaling-with-day-one.html">via David Sparks</a>. It has iOS companion apps and iCloud syncing. It also has excellent search capabilities, likes MultiMarkdown and can export my entries to plain text at any time. I like it because it’s good-looking and concise; just what I need, with no feature bloat. Plus, it’s specifically designed to do exactly what I want: keep a timestamped journal of what I’m working on, have accomplished or have just discovered in my digital travels.</p>

<p>Day One already has a quick entry palette in the menubar. It also has a command line interface (<code>/usr/local/bin/dayone</code>)<sup id="fnref:cli"><a href="#fn:cli" rel="footnote">1</a></sup> which provides some geeky options (try <code>dayone</code> in Terminal) and the flexibility needed to replace my current logging system. You can create entries quickly with either method, but I wanted just a little bit more out of it. I built a quick script which allows a basic syntax for starring entries and defining dates (using natural language) inline in the entry itself. It can be used from the command line, from LaunchBar (or similar) and can be incorporated into just about any scriptable workflow.</p>

<p>The natural language portion of the script is built on the “Chronic” Ruby gem, so running this script as is requires that you have that installed. If you don’t have it available, just run <code>gem install chronic</code> to add the gem. If you run into errors doing that, try <code>sudo gem install chronic</code> and provide your system password. Here’s the script, complete with some explanation in the comments.</p>


<div class="wp_syntax"><div class="code"><pre class="ruby"><span class="co1">#!/usr/bin/ruby</span>
&nbsp;
<span class="co1"># logtodayone.rb</span>
<span class="co1"># Brett Terpstra (http://brettterpstra.com)</span>
<span class="co1"># Use and modify freely, attribution appreciated</span>
<span class="co1"># </span>
<span class="co1"># This script works with the Day One[1] command line utility</span>
<span class="co1"># It parses an input string for an exclamation point prefix to mark starred</span>
<span class="co1"># and/or a [date string] at the beginning to parse natural language dates</span>
<span class="co1"># </span>
<span class="co1"># Requirements:</span>
<span class="co1"># Chronic ruby gem</span>
<span class="co1">#</span>
<span class="co1"># Example usage:</span>
<span class="co1"># logtodayone.rb &quot;! This is a starred entry.&quot;</span>
<span class="co1"># logtodayone.rb &quot;[yesterday 3pm] Something I did yesterday at 3:00PM&quot;</span>
<span class="co1"># logtodayone.rb &quot;! [-2 1:30am] A starred entry about something I did two days ago&quot;</span>
&nbsp;
<span class="kw3">require</span> <span class="st0">'rubygems'</span>
<span class="kw3">require</span> <span class="st0">'chronic'</span> <span class="co1"># (`gem install chronic`)</span>
&nbsp;
<span class="kw1">if</span> ARGV.<span class="me1">length</span> <span class="sy0">&gt;</span> <span class="nu0">0</span>
  input = ARGV.<span class="me1">join</span><span class="br0">&#40;</span><span class="st0">&quot; &quot;</span><span class="br0">&#41;</span>.<span class="me1">strip</span>
<span class="kw1">else</span>
  <span class="kw3">print</span> <span class="st0">&quot;Log entry: &quot;</span>
  input = <span class="kw3">gets</span>.<span class="me1">strip</span>
<span class="kw1">end</span>
&nbsp;
<span class="co1"># If the input starts with an exclamation point, make it starred</span>
starred = input =~ <span class="sy0">/</span>^!<span class="sy0">/</span> ? <span class="st0">&quot;true&quot;</span> : <span class="st0">&quot;false&quot;</span>
<span class="co1"># remove the bang from the input string</span>
input = input.<span class="kw3">gsub</span><span class="br0">&#40;</span><span class="sy0">/</span>^!\s<span class="sy0">*/</span>,<span class="st0">''</span><span class="br0">&#41;</span>
&nbsp;
<span class="co1"># if there's a [date] specified, parse it</span>
<span class="kw1">if</span> input =~ <span class="sy0">/</span>^\<span class="br0">&#91;</span><span class="br0">&#40;</span>.<span class="sy0">*</span>?<span class="br0">&#41;</span>\<span class="br0">&#93;</span><span class="sy0">/</span>
  datestring = $1
  <span class="co1"># if the date starts with -X, assume it means X days ago</span>
  <span class="kw1">if</span> datestring =~ <span class="sy0">/</span>^\<span class="sy0">-</span><span class="br0">&#40;</span>\d<span class="sy0">+</span><span class="br0">&#41;</span><span class="sy0">/</span>
    datestring.<span class="kw3">sub!</span><span class="br0">&#40;</span><span class="sy0">/</span>\<span class="sy0">-</span><span class="br0">&#40;</span>\d<span class="sy0">+</span><span class="br0">&#41;</span><span class="sy0">/</span>,<span class="st0">&quot;<span class="es0">\\</span>1 days ago &quot;</span><span class="br0">&#41;</span>
  <span class="kw1">end</span>
  <span class="co1"># Replace a single 'y' within the date brackets with &quot;Yesterday&quot; for parsing</span>
  datestring.<span class="kw3">sub!</span><span class="br0">&#40;</span><span class="sy0">/</span>\by\b<span class="sy0">/</span>,<span class="st0">'yesterday'</span><span class="br0">&#41;</span>
  <span class="co1"># Parse the resulting date string with Chronic</span>
  d = Chronic.<span class="me1">parse</span><span class="br0">&#40;</span>datestring, <span class="br0">&#123;</span>:context <span class="sy0">=&gt;</span> <span class="re3">:past</span>, <span class="re3">:ambiguous_time_range</span> <span class="sy0">=&gt;</span> <span class="nu0">8</span><span class="br0">&#125;</span><span class="br0">&#41;</span>
  d = <span class="kw4">DateTime</span>.<span class="me1">now</span> <span class="kw1">if</span> d.<span class="kw2">nil</span>?
<span class="kw1">else</span>
  <span class="co1"># if no [date] specified, make it right now</span>
  d = <span class="kw4">DateTime</span>.<span class="me1">now</span>
<span class="kw1">end</span>
date = d.<span class="me1">strftime</span><span class="br0">&#40;</span><span class="st0">&quot;%m/%d/%Y %l:%M%p&quot;</span><span class="br0">&#41;</span> <span class="co1"># dayone formatted</span>
input = input.<span class="kw3">gsub</span><span class="br0">&#40;</span><span class="sy0">/</span>^\<span class="br0">&#91;</span>.<span class="sy0">*</span>?\<span class="br0">&#93;</span>\s<span class="sy0">*/</span>,<span class="st0">''</span><span class="br0">&#41;</span> <span class="co1"># remove [date] from input</span>
&nbsp;
<span class="sy0">%</span>x<span class="br0">&#123;</span>echo <span class="st0">&quot;#{input}&quot;</span><span class="sy0">|/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>bin<span class="sy0">/</span>dayone <span class="sy0">-</span>d=<span class="st0">&quot;#{date}&quot;</span> <span class="sy0">-</span>s=<span class="co1">#{starred} new}</span></pre></div></div>


<h3>Some usage tips</h3>

<p>You can star an entry by beginning it with an exclamation point. I’m not sure how I’ll use stars yet, but I figured the option was there, so I’d add a syntax for it.</p>

<p>I often end up logging things after the fact but before I <a href="http://brettterpstra.com/a-solution-for-scatterbrains/">forget what I was doing</a>, so it’s important for me to be able to enter an approximate date and time for the sake of organization. Date strings are entered in square brackets at the beginning (or after an exclamation point) of the entry. The natural language accepts basic strings such as “yesterday 3pm” or “noon” and converts them to Day One-compatible dates. It also accepts “-X” operators to specify a number of days ago (I’m assuming I won’t be logging entries in the future). “y” by itself will be converted to “yesterday.” A typical entry for me would look like “[y 11:45pm] working on silly scripts for logging to Day One.” An entry with no exclamation point and no date brackets is just read as a normal entry at the current time.</p>

<p>I’m using generic @tags–a habit carried over from my VoodooPad scratchpad–to make my entries easily searchable by topic or project. Beyond that, I’m just relying on Day One’s built-in chronological organization and full-text search.</p>

<p>The script is all fine and good, but it’s not much use if it’s not convenient to access. Here are a few of the ways I’m making it universally accessible in my workflow.</p>

<h4>Bash alias</h4>

<p>First things first, lets make it really easy to log entries from the command line. A simple alias in your <code>~/.bash_profile</code> shortens things up:</p>

<pre><code>alias log="~/scripts/logtodayone.rb"
</code></pre>

<p>Now you can make an entry with <code>log "the thing I was just doing"</code>.</p>

<h4>LaunchBar Action</h4>

<p>Given that few of us are <em>always</em> on the command line, it would be nice to access the script easily from other utility apps. I personally use LaunchBar, but you can create similar scripts for Alfred, Quicksilver, etc. If you use LaunchBar, you can just save the three-line script below as <code>Log to Day One.scpt</code> in <code>~/Library/Application Support/LaunchBar/Actions</code>:</p>

<pre><code>on handle_string(message)
  do shell script "/Users/ttscoff/scripts/logtodayone.rb \"" &amp; message &amp; "\""
end handle_string
</code></pre>

<p>Now, just pop up LaunchBar and type <code>ldo</code> or similar to select the action, then type space to get a text field where you can type your log entry. The script syntax applies in full, so start with an exclamation point to star the entry, and use natural language date syntax between square brackets to specify a date, if needed.</p>

<h4>Git commit wrapper</h4>

<p>I do something similar to this with an nvALT note, so I thought I’d try it with Day One for a while. It’s a basic bash function to copy a note from a git commit into my daily log. It just wraps <code>git -am</code> (commit all, message), so more complex commit commands won’t work. It covers 90% of the commits I’d actually want in my journal, though.</p>

<pre><code>function cdo(){
  msg=$*
  path=$(pwd)
  ~/scripts/logtodayone.rb "@${path##*/} $msg"
  git commit -am "$msg"
}
</code></pre>

<p><strong>Update:</strong> I made the git wrapper significantly smarter, thanks to a little assist from <a href="http://nnutter.com/2012/01/git-todo/">@nnutter</a>. It basically parses up your git tree for the actual repo name instead of using the directory name you’re currently in.</p>

<pre><code># experimental wrapper for git to log commits to Day One
# lots of credit to http://nnutter.com/2012/01/git-todo/
function cdo(){
  msg=$*
  GIT_DIR=$(git rev-parse --git-dir)
  if ! (( $? )); then
      GIT_DIR=$(echo "$GIT_DIR" | awk -F/ '{nlast = NF -1;print $nlast}')
      if [ -z "$GIT_DIR" ]; then
                path=$(pwd)
                GIT_DIR=${path##*/}
      fi
            ~/scripts/logtodayone.rb "@$GIT_DIR $msg"
  fi

  git commit -am "$msg"
}
</code></pre>

<p>So that’s my fiddling for the evening. Back to doing something more useful (like preparing for my <a href="http://www.macworldiworld.com/techtalks/thursday-overview/thursday-agenda/#903">Macworld | iWorld talk with Merlin Mann and David Sparks</a>).</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:cli">
<p>I forgot this originally, but you need to symlink the dayone CLI from the app bundle to your /usr/local/bin directory. As <a href="http://brettterpstra.com/logging-with-day-one-geek-style/#comment-31321">mentioned in the comments</a>, more information can be found in the <a href="http://dayoneapp.com/faq/">faq</a>.<span id="more-3543"></span>### The script <a href="#fnref:cli" rev="footnote">↩</a></p>
</li>

</ol>
</div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/system-service-clip-to-day-one/' rel='bookmark' title='System Service: Clip to Day One'>System Service: Clip to Day One</a></li>
<li><a href='http://brettterpstra.com/voodoopad-log-navigation-plugins/' rel='bookmark' title='VoodooPad log navigation plugins'>VoodooPad log navigation plugins</a></li>
<li><a href='http://brettterpstra.com/scatterbrains-2-the-geekening/' rel='bookmark' title='Scatterbrains 2: The geekening'>Scatterbrains 2: The geekening</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/logging-with-day-one-geek-style/">Logging with Day One, geek style</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=qYC835DtpTc:OuuPpm7sU7M:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=qYC835DtpTc:OuuPpm7sU7M:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=qYC835DtpTc:OuuPpm7sU7M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=qYC835DtpTc:OuuPpm7sU7M:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=qYC835DtpTc:OuuPpm7sU7M:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=qYC835DtpTc:OuuPpm7sU7M:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=qYC835DtpTc:OuuPpm7sU7M:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=qYC835DtpTc:OuuPpm7sU7M:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=qYC835DtpTc:OuuPpm7sU7M:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=qYC835DtpTc:OuuPpm7sU7M:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/qYC835DtpTc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/logging-with-day-one-geek-style/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/logging-with-day-one-geek-style/</feedburner:origLink></item>
		<item>
		<title>Web excursions: January 4, 2012 — January 15, 2012</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/xbzuBrKJPvc/</link>
		<comments>http://brettterpstra.com/web-excursions-january-4-2012-january-15-2012/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 16:43:38 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[bookmarks]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3523</guid>
		<description><![CDATA[<p>Links of interest from January 4, 2012 through January 15, 2012: Profiling CSS for fun and profit. Optimization notes.Some interesting results from testing and profiling browser performance with CSS3 properties and transforms. Getting away from CES 2012A few of my favorite moments not on the CES show floor in Vegas. Twitter Bootstrap Generator“Kick-start your Twitter Bootstrap project the way you&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/web-excursions-january-4-2012-january-15-2012/">Web excursions: January 4, 2012 — January 15, 2012</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Links of interest from <em>January 4, 2012 through January 15, 2012</em>:</strong></p>

<ul>
<li><strong><a href="http://perfectionkills.com/profiling-css-for-fun-and-profit-optimization-notes/#comment-113812">Profiling CSS for fun and profit. Optimization notes.</a></strong><br />Some interesting results from testing and profiling browser performance with CSS3 properties and transforms.</li>
<li><strong><a href="http://www.flickr.com/photos/circlesixdesign/sets/72157628841424195/with/6697585407/">Getting away from CES 2012</a></strong><br />A few of my favorite moments <em>not</em> on the CES show floor in Vegas.</li>
<li><strong><a href="http://www.martinbean.co.uk/bootstrap-generator/">Twitter Bootstrap Generator</a></strong><br />“Kick-start your Twitter Bootstrap project the way you want.”</li>
<li><strong><a href="http://davidwalsh.name/webkit-css">Interesting –webkit CSS Properties</a></strong><br />Wow, I knew there were some great properties in webkit, but these could prove to be spectacularly useful, especially in mobile applications</li>
<li><strong><a href="http://mashajs.com/index_eng.html">MASHA</a></strong><br />A rather nifty script you can run on your site which lets you mark points of interest on a page and receive a link you can send. When someone follows that link, your selected text is highlighted and scrolled to.</li>
</ul>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/auto-link-text-service-updated/' rel='bookmark' title='Auto-link text service updated'>Auto-link text service updated</a></li>
<li><a href='http://brettterpstra.com/my-weather-report-seriously/' rel='bookmark' title='My weather report. Seriously.'>My weather report. Seriously.</a></li>
<li><a href='http://brettterpstra.com/catching-markdown-mistakes/' rel='bookmark' title='Catching Markdown mistakes'>Catching Markdown mistakes</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/web-excursions-january-4-2012-january-15-2012/">Web excursions: January 4, 2012 — January 15, 2012</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=xbzuBrKJPvc:xq9AIkA9rTs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=xbzuBrKJPvc:xq9AIkA9rTs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=xbzuBrKJPvc:xq9AIkA9rTs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=xbzuBrKJPvc:xq9AIkA9rTs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=xbzuBrKJPvc:xq9AIkA9rTs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=xbzuBrKJPvc:xq9AIkA9rTs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=xbzuBrKJPvc:xq9AIkA9rTs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=xbzuBrKJPvc:xq9AIkA9rTs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=xbzuBrKJPvc:xq9AIkA9rTs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=xbzuBrKJPvc:xq9AIkA9rTs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/xbzuBrKJPvc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/web-excursions-january-4-2012-january-15-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/web-excursions-january-4-2012-january-15-2012/</feedburner:origLink></item>
		<item>
		<title>Scripting Readability and Markdownify for clipping web pages</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/m4dRfmCkxnA/</link>
		<comments>http://brettterpstra.com/scripting-readability-markdownify-for-clipping-web-pages/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 15:07:28 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3524</guid>
		<description><![CDATA[<p>I wanted to share a handy tool that I realized I use daily but rarely talk about. I call it Read2Text, but it’s really just a Frankenstein script which combines Python Readability (license) with html2text (license). The combination allows you to grab web pages, process them with a port of Arc90’s Readability and convert the HTML to Markdown, ready for&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/scripting-readability-markdownify-for-clipping-web-pages/">Scripting Readability and Markdownify for clipping web pages</a></p>]]></description>
			<content:encoded><![CDATA[<p><img style=' display: block; margin-right: auto; margin-left: auto;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2012/01/read2textheader.jpg?9d7bd4" alt="read2text header image" title="read2text header" width="650" height="165" class="aligncenter size-full wp-image-3526 colorbox-3524" /></p>

<p>I wanted to share a handy tool that I realized I use daily but rarely talk about. I call it Read2Text, but it’s really just a Frankenstein script which combines <a href="https://github.com/gfxmonk/python-readability/blob/master/README">Python Readability</a> (<a href="http://www.apache.org/licenses/LICENSE-2.0">license</a>) with <a href="http://www.aaronsw.com/2002/html2text/">html2text</a> (<a href="https://github.com/aaronsw/html2text/blob/master/COPYING">license</a>). The combination allows you to grab web pages, process them with a port of <a href="http://lab.arc90.com/2009/03/02/readability/">Arc90’s Readability</a> and convert the HTML to Markdown, ready for pasting or piping to a text file.</p>

<p><a href="http://brettterpstra.com/project/nvalt/">nvALT</a> has this built in, but it’s been a little crashy lately. I find it more reliable to just do this from the command line. If you install it in your path (both the <code>read2text</code> script and the “readability” folder), you can run <code>read2text http://brettterpstra.com/keybinding-madness/ | pbcopy</code>.</p>

<p>You’ll get a Markdown-ified version of the page, with links, image links, headers, code blocks and text intact, but no comments, sidebars, ads, etc. It’s not perfect, but it does a solid job and cleanup only takes me a minute, even on huge sites. I use this most of the time instead of clipping to Evernote these days.</p>

<p>I alias it in my .bash_profile to <code>rtt</code>, and often redirect the output straight to a text file in my nvALT folder: <code>rtt http://grml.org/zsh/zsh-lovers.html &gt; ~/Dropbox/Notes/nvALT2.1/zsh\ lovers.md</code></p>

<p>Now I have a new note that automatically shows up in nvALT with the text of the zsh-lovers page (yeah, I tried switching to zsh this morning. I’ll have to come back to that). Anyway, I thought others might find this hack of use, so I’m making the download available below.</p>

<div class="download_desc"><p class="download-icon"><a href="http://brettterpstra.com/downloads/Read2Text1.zip?9d7bd4" title="Download Read2Text (276)"><img class="colorbox-3524"  src="http://cdn2.brettterpstra.com/wp-content/uploads/downloads/thumbnails/2012/01/read2texticon.png?9d7bd4" alt="download image for Read2Text" width="64" /></a><br /><a href="http://brettterpstra.com/downloads/Read2Text1.zip?9d7bd4" title="Download Read2Text (276)" class="download-button">Download</a></p><p class="desc"><a href="http://brettterpstra.com/downloads/Read2Text1.zip?9d7bd4" title="Download Read2Text (276)">Read2Text</a> — A Frankenstinian combination of html2text and Python Readability. This command line tool makes clipping web pages into Markdown text without ads and comments simple. <a href="http://brettterpstra.com/scripting-readability-markdownify-for-clipping-web-pages">More Info</a></p></div>

<p>By the way, I also have <a href="http://markdownrules.com/">a web service</a> for this. You can get <a href="http://fuckyeahmarkdown.com/go/?u=http%3A%2F%2Fbrettterpstra.com%2Fscripting-readability-markdownify-for-clipping-web-pages%2F&amp;read=1">raw markdown</a> or a <a href="http://fuckyeahmarkdown.com/go/?read=1&amp;showframe=1&amp;u=http%3A%2F%2Fbrettterpstra.com%2Fscripting-readability-markdownify-for-clipping-web-pages%2F">nice interface</a> for previewing and copying. There’s also an API and bookmarklets for integration into your favorite browser. Have fun!</p>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/meet-marky-the-markdownifier/' rel='bookmark' title='Meet Marky, the Markdownifier'>Meet Marky, the Markdownifier</a></li>
<li><a href='http://brettterpstra.com/nvalt-1-0-8-progress/' rel='bookmark' title='nvALT 1.0.8 progress'>nvALT 1.0.8 progress</a></li>
<li><a href='http://brettterpstra.com/clippable/' rel='bookmark' title='Clippable'>Clippable</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/scripting-readability-markdownify-for-clipping-web-pages/">Scripting Readability and Markdownify for clipping web pages</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=m4dRfmCkxnA:AqgYG00fZEk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=m4dRfmCkxnA:AqgYG00fZEk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=m4dRfmCkxnA:AqgYG00fZEk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=m4dRfmCkxnA:AqgYG00fZEk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=m4dRfmCkxnA:AqgYG00fZEk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=m4dRfmCkxnA:AqgYG00fZEk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=m4dRfmCkxnA:AqgYG00fZEk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=m4dRfmCkxnA:AqgYG00fZEk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=m4dRfmCkxnA:AqgYG00fZEk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=m4dRfmCkxnA:AqgYG00fZEk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/m4dRfmCkxnA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/scripting-readability-markdownify-for-clipping-web-pages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/scripting-readability-markdownify-for-clipping-web-pages/</feedburner:origLink></item>
		<item>
		<title>Web excursions: December 27, 2011 — January 3, 2012</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/DzBrShBZjCo/</link>
		<comments>http://brettterpstra.com/web-excursions-december-27-2011-january-3-2012/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 06:05:16 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[bookmarks]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3476</guid>
		<description><![CDATA[<p>Links of interest from December 27, 2011 through January 3, 2012: skratchdot/github-code-search.user.jsA very handy userscript that adds a per-repo search box to GitHub pages. Also led me to discover NinjaKit. Fullscreen Background Image Slideshow with CSS3Pretty sweet. Code Highlighting and Marked Preview Styles in nvALTThis works really, really well. Thanks Chris! impress.js &#124; presentation tool based on the power of&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/web-excursions-december-27-2011-january-3-2012/">Web excursions: December 27, 2011 — January 3, 2012</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Links of interest from <em>December 27, 2011 through January 3, 2012</em>:</strong></p>

<ul>
<li><strong><a href="https://github.com/skratchdot/github-code-search.user.js">skratchdot/github-code-search.user.js</a></strong><br />A very handy userscript that adds a per-repo search box to GitHub pages. Also led me to discover <a href="http://d.hatena.ne.jp/os0x/20100612/1276330696">NinjaKit</a>.</li>
<li><strong><a href="http://tympanus.net/codrops/2012/01/02/fullscreen-background-image-slideshow-with-css3/">Fullscreen Background Image Slideshow with CSS3</a></strong><br />Pretty sweet.</li>
<li><strong><a href="http://chris-schmitz.com/code-highlighting-and-marked-preview-styles-in-nvalt/">Code Highlighting and Marked Preview Styles in nvALT</a></strong><br />This works really, really well. Thanks Chris!</li>
<li><strong><a href="http://bartaz.github.com/impress.js/">impress.js | presentation tool based on the power of CSS3 transforms and transitions in modern browsers | by Bartek Szopka @bartaz</a></strong><br />Via Mr. <a href="https://twitter.com/jxpx777">jxpx777</a>, the coolest CSS3/JavaScript presentation I’ve ever seen.</li>
<li><strong><a href="https://github.com/robbyrussell/oh-my-zsh">robbyrussell/oh-my-zsh</a></strong><br />Via <a href="https://twitter.com/#!/ryur">@ryur</a>, an intriguing framework for zsh configuration management. Now I just have to make the switch to zsh.</li>
<li><strong><a href="http://www.colourlovers.com/themeleon/twitter">themeleon :: Twitter Profile Designer</a></strong><br />This is among the most dangerous tools on the Internet.</li>
</ul>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/web-excursions-august-9-2011-august-12-2011/' rel='bookmark' title='Web excursions: August 9, 2011 — August 12, 2011'>Web excursions: August 9, 2011 — August 12, 2011</a></li>
<li><a href='http://brettterpstra.com/speaking-at-macworld/' rel='bookmark' title='Speaking at Macworld'>Speaking at Macworld</a></li>
<li><a href='http://brettterpstra.com/prefixr-service/' rel='bookmark' title='Prefixr OS X Service'>Prefixr OS X Service</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/web-excursions-december-27-2011-january-3-2012/">Web excursions: December 27, 2011 — January 3, 2012</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=DzBrShBZjCo:_gVUCWCGgAs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=DzBrShBZjCo:_gVUCWCGgAs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=DzBrShBZjCo:_gVUCWCGgAs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=DzBrShBZjCo:_gVUCWCGgAs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=DzBrShBZjCo:_gVUCWCGgAs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=DzBrShBZjCo:_gVUCWCGgAs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=DzBrShBZjCo:_gVUCWCGgAs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=DzBrShBZjCo:_gVUCWCGgAs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=DzBrShBZjCo:_gVUCWCGgAs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=DzBrShBZjCo:_gVUCWCGgAs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/DzBrShBZjCo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/web-excursions-december-27-2011-january-3-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/web-excursions-december-27-2011-january-3-2012/</feedburner:origLink></item>
		<item>
		<title>Some of my favorite Mac apps in 2011</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/f-ekVBXvrMQ/</link>
		<comments>http://brettterpstra.com/some-of-my-favorite-mac-apps-in-2011/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 21:47:08 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[roundup]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3508</guid>
		<description><![CDATA[<p>I’ve compiled a list of some of my favorite apps from 2011. I wrote a TextMate command to link all of these1 (60+ links in four minutes!), so if you spot any misfire links that I missed, let me know in the comments. This isn’t an all-inclusive list (despite its length), but it’s a good chance to highlight some gems&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/some-of-my-favorite-mac-apps-in-2011/">Some of my favorite Mac apps in 2011</a></p>]]></description>
			<content:encoded><![CDATA[<p><img class="colorbox-3508"  src="http://cdn2.brettterpstra.com/wp-content/uploads/2011/12/a_few_of_my_favorite_apps.jpg?9d7bd4" alt="A few of my favorite apps" /></p>

<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2011/12/Applications-icon.jpg?9d7bd4" alt="Applications icon" title="Applications icon" width="256" height="223" class="alignright size-full wp-image-3511 colorbox-3508" />I’ve compiled a list of some of my favorite apps from 2011. I wrote a TextMate command to link all of these<sup id="fnref:another"><a href="#fn:another" rel="footnote">1</a></sup> (60+ links in four minutes!), so if you spot any misfire links that I missed, let me know in the comments. This isn’t an all-inclusive list (despite its length), but it’s a good chance to highlight some gems that may have passed under the radar of the big sites.</p>

<p>No fancy awards here, just a grateful mention of apps that make my life better. Glaring ommisions (like the unbeatable <a href="https://agilebits.com/onepassword">1Password</a>) are only because I assume you’ve already heard of them. Absolutely no slight intended to anyone not on this list. Well, except for a few. You know who you are.</p>

<h3>Graphics/Design</h3>

<ul>
<li><a href="http://skitch.com/" title="Skitch - Annotate, edit and share your screenshots and images...fast.">Skitch</a> — My favorite way to quickly communicate screen-based information with annotations.</li>
<li><a href="http://itunes.apple.com/us/app/flickery/id403111073?mt=12" title="Mac App Store - flickery - Apple">flickery</a> — The best Flickr experience I’ve found.</li>
<li><a href="http://flyingmeat.com/acorn/" title="Acorn, a great Mac image editor, built for humans.">Acorn</a> — I rarely open Photoshop these days. Acorn suits my needs beautifully and is super-fast.</li>
<li><a href="http://itunes.apple.com/us/app/appcontrols/id402508203?mt=12" title="Mac App Store - AppControls - Apple">AppControls</a> — Great little GUI for creating CSS3 buttons.</li>
<li><a href="http://itunes.apple.com/us/app/carousel/id437548184?mt=12" title="Mac App Store - Carousel - Apple">Carousel</a> — Instagram when you’re not on your phone.</li>
<li><a href="http://itunes.apple.com/us/app/colorschemer-studio/id417896628?mt=12" title="Mac App Store - ColorSchemer Studio - Apple">ColorSchemer Studio 2</a> — I <a href="http://www.tuaw.com/2011/03/21/colorschemer-studio-in-the-mac-app-store-and-tuaw-has-free-lice/">love this app</a>.</li>
<li><a href="http://itunes.apple.com/be/app/gradient/id481981128?mt=12" title="Mac App Store - Gradient">Gradient</a> — This new app <a href="http://brettterpstra.com/app-review-gradient/">is awesome</a>, and is only going to get better.</li>
<li><a href="http://itunes.apple.com/us/app/icon-slate/id439697913?mt=12" title="Mac App Store - Icon Slate">Icon Slate</a> — The best way I’ve found to quickly create ICNS files for Mac apps.</li>
<li><a href="http://fuelcollective.com/pochade" title="Pochade - Fuel Collective LLC">Pochade</a> — A great toolbar color picker for when you need a color fast. HSB, RGB(A), NSColor, UIColor and more at the click of a button.</li>
</ul>

<h3>Developer</h3>

<ul>
<li><a href="http://www.damabia.com/appstar.php" title="Download AppStar for Mac - Analyze iOS application sales ...">AppStar</a> — Selling anything on the App Store? This is an amazing tool for tracking sales, rankings, ratings and more.</li>
<li><a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X">TextMate</a> — With v2 running now, I can safely say it’s doubtful I’m switching away any time soon.</li>
<li><a href="http://macrabbit.com/espresso/" title="MacRabbit - Espresso - The Web Editor">Espresso</a> — Espresso fulfills a different need than TextMate for me: HTML editing with a more robust live preview, CSS X-Ray and prettier remote project handling.</li>
<li><a href="http://itunes.apple.com/us/app/coderunner/id433335799?mt=12" title="Mac App Store - CodeRunner - Apple">CodeRunner</a> — <a href="http://brettterpstra.com/app-review-coderunner/">Great app</a> for developers in almost any language.</li>
<li><a href="http://itunes.apple.com/us/app/http-client/id418138339?mt=12" title="Mac App Store - HTTP Client - Apple">HTTP Client</a> — Todd Ditchendorf’s tool for working with REST APIs. Simple, effective and very handy.</li>
<li><a href="http://www.kaleidoscopeapp.com/" title="Kaleidoscope — File comparison for Mac">Kaleidoscope</a> — One of the prettiest diff tools I’ve ever seen. Missing built-in merge, but it <em>does</em> do image diffs.</li>
<li><a href="http://iterm.sourceforge.net/" title="iTerm">iTerm</a> — Makes me love my terminal even more. Split screens, tabs, awesome keyboard-based text selection and tons more.</li>
<li><a href="http://www.mactechnologies.com/index.php?page=downloads" title="MacTechnologies Consulting (212) 201-1465">RegExRX</a> — I love <a href="http://itunes.apple.com/us/app/patterns-the-regex-app/id429449079?mt=12" title="Mac App Store - Patterns - The Regex App - Apple">Patterns</a>, but when I need submatches and more extensive highlighting, I go here. Hopefully Patterns will catch up on that front soon.</li>
</ul>

<h3>Utilities</h3>

<ul>
<li><a href="http://www.indev.ca/MailTags.html">MailTags</a> — Yes, I still use Mail.app. This–and <a href="http://www.indev.ca/MailActOn.html">Mail Act-on</a>–are why.</li>
<li><a href="http://code2k.net/products/mailpluginfix/" title="CODE2K:LABS - Products">MailPluginFix</a> — When Apple updates Mail, everything goes to hell. Easily fixed from the Terminal, but even easier with MailPluginFix.</li>
<li><a href="http://itunes.apple.com/us/app/apptivate/id412442297?mt=12" title="Mac App Store - Apptivate - Apple">Apptivate</a> — I started using this in 2011 and am completely in love with it. It’s not just a hotkey launcher, it handles key sequences as well. Infinite combinations.</li>
<li><a href="http://www.haystacksoftware.com/arq/" title="Online Backup for Mac | Arq | Haystack Software">Arq</a> — My offsite backup system of choice. It uses S3 and has the best recovery capabilities I’ve seen.</li>
<li><a href="http://www.macupdate.com/app/mac/32953/bettertouchtool" title="Download BetterTouchTool for Mac - Customize gestures on your ...">BetterTouchTool</a> — I keep trying to get along without this (to free up resources and reduce conflicts), but I can’t. I can’t quit you, BetterTouchTool.</li>
<li><a href="http://www.maintain.se/cocktail/index.php" title="Maintain – Cocktail">Cocktail</a> — My favorite system maintenance tool. Solid and regularly updated.</li>
<li><a href="http://www.delibarapp.com/" title="Delibar, Delicious Mac client">Delibar</a> — I love Pinboard, and I loved it before Delibar. I love it even more now.</li>
<li><a href="http://droplr.com/" title="Droplr">Droplr</a> — Droplr released version 2.0 of their Mac client this year, with plugins and great preview features. Handles Markdown notes, too, with Syntax highlighting in the notes panel.</li>
<li><a href="http://aptonic.com/" title="Aptonic Software - Dropzone">Dropzone</a> — I may have <a href="http://brettterpstra.com/app-review-dropzone/">professed my love</a> of this utility recently.</li>
<li><a href="http://fluidapp.com" title="Fluid">Fluid</a> — As I invest more and more heavily in the cloud, Fluid keeps me sane. Separate cookies, Userscripts and Userstyles, in addition to a ton of Todd’s mad science. It’s awesome.</li>
<li><a href="http://stereopsis.com/flux/" title="F.lux: software to make your life better - stereopsis : michael ...">f.lux</a> — It adjusts your screen color based on the time of day. Sounds silly, but run it for a while. You’ll miss it dearly when you turn it off.</li>
<li><a href="http://itunes.apple.com/us/app/growl/id467939042?mt=12" title="Mac App Store - Growl">Growl</a> — Seriously. One of the most indispensable Mac utilities got even better this year.</li>
<li><a href="http://www.macupdate.com/app/mac/37011/growlvoice" title="Download GrowlVoice for Mac - Google Voice in your menu bar ...">GrowlVoice</a> — After a long-awaited update, this is now by far my favorite interface to Google Voice.</li>
<li><a href="http://www.obdev.at/products/launchbar/" title="LaunchBar 5 - Objective Development">LaunchBar</a> — You may dig Alfred, or even have snuck back to QuickSilver, but nothing has tempted me away from LaunchBar since I first gave it an honest try.</li>
<li><a href="http://itunes.apple.com/us/app/id352226779?mt=8" title="App Store - myPhoneDesktop – Call, send SMS, open URL, save Text ...">myPhoneDesktop</a> — It’s not the prettiest, but it’s an excellent and full-featured way to get information between your Mac and your iOS devices. URLs, pictures, text and more.</li>
<li><a href="http://itunes.apple.com/us/app/yoink/id457622435?mt=12" title="Mac App Store - Yoink">Yoink</a> — Path Finder Drop stack for the Finder. Love it.</li>
<li><a href="http://totalfinder.binaryage.com/" title="Download TotalFinder for Mac - Adds tabs, hotkeys, and other ...">TotalFinder</a> — Tabs, dual-pane windows and a few extra features. Finder should be like this by default.</li>
<li><a href="http://itunes.apple.com/us/app/textexpander-for-mac/id405274824?mt=12" title="Mac App Store - TextExpander for Mac - Apple">TextExpander</a> — I can’t leave this off of any list. Unbelievably useful in <em>everything</em> I do on my computer (or iPhone/iPad).</li>
</ul>

<h3>Writing</h3>

<ul>
<li><a href="http://itunes.apple.com/pt/app/multimarkdown-composer/id473566589?mt=12" title="Mac App Store - MultiMarkdown Composer">MultiMarkdown Composer</a> — This year saw the release of Fletcher Penney’s (father of MultiMarkdown) editing app. It’s packed with power-tools for long-form MultiMarkdown editing.</li>
<li><a href="http://bywordapp.com/" title="Byword • A Simple Text Editor for Mac">Byword</a> — Serving a slightly different audience, Byword has become my favorite setting for getting writing done. It inspires me to start, and makes it easy to finish. Full Markdown feature set.</li>
<li><a href="http://www.bluemangolearning.com/clarify/" title="Clarify - Download">Clarify</a> — This new app from BlueMango is a highly-focused version of <a href="http://www.bluemangolearning.com/screensteps/" title="Turn Screen Captures into Tutorials and Software Documentation">ScreenSteps</a> (my favorite tool for building documentation). If you write screen-based documentation of any sort, check this out.</li>
<li><a href="http://www.literatureandlatte.com/scrivener.html" title="Literature and Latte - Scrivener">Scrivener</a> — Big update to Scrivener this year, and it’s an amazing writing tool (was before, better now). On the edge of feature bloat, but not there yet.</li>
<li><a href="http://itunes.apple.com/us/app/mindnode-pro/id402398561?mt%3D12" title="Mac App Store - MindNode Pro - Apple">MindNode Pro</a> — I admit that I use <a href="http://www.mindjet.com/mindmanager-mac?lang=en">Mindjet MindManager</a> and <a href="http://www.mindmeister.com/">MindMeister</a> just as much as I use MindNode, but it’s still always impressed me as an elegant and affordable mind-mapping solution. Definitely worth mentioning.</li>
</ul>

<h3>Music</h3>

<ul>
<li><a href="http://itunes.apple.com/us/app/simplify/id448003584?mt=12" title="Mac App Store - Simplify">Simplify</a> — An awesome addon for the Spotify app. Desktop artwork, hotkey control… I even made <a href="http://brettterpstra.com/stained-simplify-jacket/">a skin for it</a>.</li>
<li><a href="http://musicmachinery.com/2010/02/16/lasthistory-visualizing-last-fm-listening-histories/" title="LastHistory – Visualizing Last.fm Listening Histories « Music ...">LastHistory</a> — Not new, and I don’t think it’s been updated for a while, but if you Scrobble to Last.fm, check this out.</li>
<li><a href="http://itunes.apple.com/us/app/musicality-grooveshark-last.fm/id425359488?mt=12" title="Mac App Store - Musicality - Grooveshark, Last.fm and more!">Musicality</a> — Wrapper for Last.fm, Pandora and Grooveshark. I use it less now that I’m into Spotify, but it’s still a great app. Keyboard shortcuts, Growl track notifications, and cross-service scrobbling.</li>
</ul>

<h3>Video</h3>

<ul>
<li><a href="http://itunes.apple.com/us/app/permute/id416702770?mt=12" title="Mac App Store - Permute">Permute</a> — This is one of the best GUIs I’ve found for video conversion. Simple, fast and high-quality output.</li>
<li><a href="http://itunes.apple.com/us/app/istopmotion-pro/id409359163?mt=12" title="Mac App Store - iStopMotion Pro - Apple">iStopMotion</a> — So much fun.</li>
<li><a href="http://itunes.apple.com/us/app/screenflow/id422025166?mt=12" title="Mac App Store - ScreenFlow - Apple">ScreenFlow</a> — The winner in the screencasting arena, at least for me.</li>
<li><a href="http://itunes.apple.com/us/app/fotomagico-pro/id414479152?mt=12" title="Mac App Store - FotoMagico Pro - Apple">FotoMagico</a> — This is another really cool app from Boinx. I don’t make a lot of slideshows, but when I do, this makes them awesome.</li>
</ul>

<h3>Productivity</h3>

<ul>
<li><a href="http://raven.io/index.html" title="Browser with web app integration (beta).">Raven</a> — I haven’t actually gotten very far into this app yet, but I’ve played with it enough to know that it’s a highly-polished way to bring together a plethora of Single Site Browsers and keep everything in one place. It won’t kill Fluid, not for me, but it’s tasty.</li>
<li><a href="http://itunes.apple.com/us/app/id354540092?mt=8" title="App Store - TaskPaper — Simple to-do lists">TaskPaper</a> — Not my go-to task manager (even after a concerted effort), but I still use it daily for personal web/coding projects, and I love the plain-text approach to task management.</li>
<li><a href="http://flexibits.com/fantastical" title="Flexibits | Fantastical | Meet your Mac&rsquo;s new calendar.">Fantastical</a> and <a href="http://itunes.apple.com/us/app/quickcal/id416581096?mt=12" title="Mac App Store - QuickCal - Apple">QuickCal</a>. It doesn’t matter which you choose, calendar entry has never been so easy. I’m hoping to have time to write up in-depth reviews of both soon.</li>
<li><a href="http://reederapp.com/" title="Reeder">Reeder</a> — It’s how I do RSS on my Mac. It’s gorgeous and–for the most part–very stable and fast. A couple quirks, and it seems to hate Flash, but I haven’t been tempted by anything else since I started using it.</li>
<li><a href="http://www.caseapps.com/tags/" title="Tags - Simply Organized - CASEapps for Mac, iPhone &amp; iPad">Tags</a> — I <a href="http://brettterpstra.com/?s=tags">talk about Tags</a> all the time. It’s not under heavy development, but it’s never failed me.</li>
</ul>

<h3>Honorable Mentions</h3>

<ul>
<li><a href="http://itunes.apple.com/us/app/spout/id438001695?mt=12" title="Mac App Store - Spout">Spout</a> — Really cool way to view your Twitter stream. Highly distracting and resource-heavy, but pretty brilliant in its execution.</li>
<li><a href="http://tunesque.afkstudio.com/" title="Tunesque: A Better Search for the iTunes Store">Tunesque</a> — An awesome way to search iTunes for any kind of media. I’ve <a href="http://brettterpstra.com/app-review-tunesque/">mentioned it before</a>.</li>
</ul>

<p>Happy New Year! I’m excited to see what the Mac dev community comes up with in 2012!</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:another">
<p>As well as a couple specifically for searching iTunes using Apple’s API. It’s fast and deadly accurate. They’ll all show up in the Blogsmith bundle soon… <a href="#fnref:another" rev="footnote">↩</a></p>
</li>

</ol>
</div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/app-giveaway-dropzone/' rel='bookmark' title='Mac App Giveaway: Dropzone'>Mac App Giveaway: Dropzone</a></li>
<li><a href='http://brettterpstra.com/mac-app-giveaway-byword/' rel='bookmark' title='Mac App Giveaway: Byword'>Mac App Giveaway: Byword</a></li>
<li><a href='http://brettterpstra.com/mac-app-giveaway-pdfpen/' rel='bookmark' title='Mac App Giveaway: PDFpen'>Mac App Giveaway: PDFpen</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/some-of-my-favorite-mac-apps-in-2011/">Some of my favorite Mac apps in 2011</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=f-ekVBXvrMQ:KMnxMtyz0DA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=f-ekVBXvrMQ:KMnxMtyz0DA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=f-ekVBXvrMQ:KMnxMtyz0DA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=f-ekVBXvrMQ:KMnxMtyz0DA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=f-ekVBXvrMQ:KMnxMtyz0DA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=f-ekVBXvrMQ:KMnxMtyz0DA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=f-ekVBXvrMQ:KMnxMtyz0DA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=f-ekVBXvrMQ:KMnxMtyz0DA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=f-ekVBXvrMQ:KMnxMtyz0DA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=f-ekVBXvrMQ:KMnxMtyz0DA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/f-ekVBXvrMQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/some-of-my-favorite-mac-apps-in-2011/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/some-of-my-favorite-mac-apps-in-2011/</feedburner:origLink></item>
		<item>
		<title>Desktop Quotes Geeklet</title>
		<link>http://feedproxy.google.com/~r/BrettTerpstra/~3/wQdOz9g8Ve4/</link>
		<comments>http://brettterpstra.com/desktop-quotes-geeklet/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 14:30:43 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[geeklet]]></category>
		<category><![CDATA[geektool]]></category>
		<category><![CDATA[nerdtool]]></category>

		<guid isPermaLink="false">http://brettterpstra.com/?p=3494</guid>
		<description><![CDATA[<p>Well, here it is: my last Geeklet post of 2011. I think it’s the simplest Geeklet I have, but it’s kind of fun. It uses the I ♥ Quotes API to put a random quote on your desktop. There’s a variety of quote categories to choose from, ranging from geeky to humorous, religious to sci-fi. See the API page for&#8230;</p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/desktop-quotes-geeklet/">Desktop Quotes Geeklet</a></p>]]></description>
			<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2011/12/marktwainquote.jpg?9d7bd4" alt="mark twain quote header image" title="mark twain quote" width="650" height="116" class="alignright size-full wp-image-3501 colorbox-3494" /></p>

<p>Well, here it is: my last Geeklet post of 2011. I think it’s the simplest Geeklet I have, but it’s kind of fun. It uses the <a href="http://iheartquotes.com/api">I ♥ Quotes</a> API to put a random quote on your desktop.</p>

<p><a href="http://cdn2.brettterpstra.com/wp-content/uploads/2011/12/simpsonschalkboard.jpg?9d7bd4"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="http://cdn2.brettterpstra.com/wp-content/uploads/2011/12/simpsonschalkboard-150x150.jpg?9d7bd4" alt="Simpsons Chalkboard" title="Simpsons Chalkboard" width="150" height="150" class="alignright shadow size-thumbnail wp-image-3499 colorbox-3494" /></a>There’s a variety of quote categories to choose from, ranging from geeky to humorous, religious to sci-fi. See the <a href="http://iheartquotes.com/api">API page</a> for a list and replace “literature” in the url with whatever you like. You can pull from multiple categories by separating them with a “+” in the url. There’s even a <code>simpsons_chalkboard</code> category to play with.</p>

<p>Here’s the one-line command that you can stick right into the Geeklet/Nerdlet without worrying about a shell script <ins datetime="2012-01-01T15:55:15+00:00">(<strong>Updated:</strong> <em>I added some more <code>awk</code> fun to the end to rewrap the output while preserving the break before a “– Author” attribution</em>)</ins>:</p>

<pre><code>curl -s 'http://www.iheartquotes.com/api/v1/random?max_lines=5&amp;source=literature+macintosh'| \
grep -v "http://iheartquotes"| \
sed -e 's/\&amp;amp;/\&amp;/g'|sed -e 's/&amp;quot;//g'| \
awk '{printf "%s ",$0} END {print ""}'|awk -F"--" -v OFS="\n\n—" ' $1=$1'
</code></pre>

<p>You should remove the “\” and newline at the end of each line (putting it all on one single line).</p>

<p>The first part (before the first pipe) just uses <code>curl</code> to grab a random quote from the “literature” section of the Quotes site (the <code>-s</code> makes it operate “silently” with no additional feedback). The url query parameters limit the quotes to a maximum of <del datetime="2012-01-01T16:08:46+00:00">two</del> five<sup id="fnref:five"><a href="#fn:five" rel="footnote">1</a></sup> lines, just to maintain a somewhat consistent length and make it easier to set up fonts and styles. The result of the API call is sent to <code>grep -v</code> to remove the credit line at the end of the response, and then on to <code>sed</code> for a little typographic cleanup (replace quote entities and convert double hyphens to an em dash). The two <code>awk</code> statements at the end will first remove any line breaks, and then, if there’s a double-hyphen (which <em>almost</em> always means an attribution line in these API responses), it adds a double newline and converts that to an em dash<sup id="fnref:emdash"><a href="#fn:emdash" rel="footnote">2</a></sup>.</p>

<p>Have fun with it, and have a Happy New Year!</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:five">
<p>I upped this from two to five because, with the new rewrapping I’m doing, I could fit a lot more text into a wider geeklet. <a href="#fnref:five" rev="footnote">↩</a></p>
</li>

<li id="fn:emdash">
<p>The only time this causes problems is when there’s a double-hyphen actually <em>used</em> as an em dash in the quote, which I’ve only had happen once so far. <a href="#fnref:emdash" rev="footnote">↩</a></p>
</li>

</ol>
</div>
<p>Related posts:<ol>
<li><a href='http://brettterpstra.com/geeklet-1-minute-average-cpu-load/' rel='bookmark' title='Geeklet: 1-minute average CPU load'>Geeklet: 1-minute average CPU load</a></li>
<li><a href='http://brettterpstra.com/geeklet-top-ram-processes/' rel='bookmark' title='Geeklet: Top RAM Processes'>Geeklet: Top RAM Processes</a></li>
<li><a href='http://brettterpstra.com/geeklet-top-cpu-processes/' rel='bookmark' title='Geeklet: Top CPU processes'>Geeklet: Top CPU processes</a></li>
</ol></p><p>Originally posted on <a href="http://brettterpstra.com" title="BrettTerpstra.com">BrettTerpstra.com</a> at <a href="http://brettterpstra.com/desktop-quotes-geeklet/">Desktop Quotes Geeklet</a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=wQdOz9g8Ve4:ykBk_oysrl8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=wQdOz9g8Ve4:ykBk_oysrl8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=wQdOz9g8Ve4:ykBk_oysrl8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=wQdOz9g8Ve4:ykBk_oysrl8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=wQdOz9g8Ve4:ykBk_oysrl8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=wQdOz9g8Ve4:ykBk_oysrl8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=wQdOz9g8Ve4:ykBk_oysrl8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=wQdOz9g8Ve4:ykBk_oysrl8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BrettTerpstra?a=wQdOz9g8Ve4:ykBk_oysrl8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BrettTerpstra?i=wQdOz9g8Ve4:ykBk_oysrl8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BrettTerpstra/~4/wQdOz9g8Ve4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettterpstra.com/desktop-quotes-geeklet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://brettterpstra.com/desktop-quotes-geeklet/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: enhanced
Database Caching 52/158 queries in 0.482 seconds using xcache
Object Caching 4301/4428 objects using xcache
Content Delivery Network via cdn2.brettterpstra.com

Served from: brettterpstra.com @ 2012-02-02 21:11:59 -->

