<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>hi, it&#39;s mike</title>
    <link>https://mike.puddingtime.org/tags/attention/</link>
    <description>Recent content on hi, it&#39;s mike</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>mike@puddingtime.org (mike)</managingEditor>
    <webMaster>mike@puddingtime.org (mike)</webMaster>
    <copyright>© 2026, mike</copyright>
    <lastBuildDate>Tue, 29 May 2012 23:05:06 +0000</lastBuildDate>
    <atom:link href="https://mike.puddingtime.org/tags/attention/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>3&#39; x 4&#39; brain with a very expensive dongle</title>
      <link>https://mike.puddingtime.org/posts/2012-05-29-3-x-4-brain-with-a-very-expensive-dongle/</link>
      <pubDate>Tue, 29 May 2012 23:05:06 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2012-05-29-3-x-4-brain-with-a-very-expensive-dongle/</guid>
      
      <description>![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2012/05/whiteboard1.jpg)
I bought a new 3&#39;x4&#39; whiteboard several weeks ago and installed it next to my desk. It addresses some issues:
Electronic todos are a problem for me because they too quickly melt into …</description>
      <content:encoded><![CDATA[<p>![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2012/05/whiteboard1.jpg)</p>
<p>I bought a new 3'x4' whiteboard several weeks ago and installed it next to my desk. It addresses some issues:</p>
<ul>
<li>Electronic todos are a problem for me because they too quickly melt into the background of the many electronic things I have going on.</li>
<li>Pieces of paper are a problem for me because they get shuffled around and lost. I also don't like dealing with them when I'm done with them. It's hard to know when to toss them out, or whether I even should.</li>
<li>Anything that can be out of sight will quickly be out of mind.</li>
</ul>
<p>So that brings us to the whiteboard. </p>
<div style="text-align: left; margin: 1em;">I use it like a big legal pad. During normal times, there's a section for incoming todos, a section for longer term things, and there are a number of quick, ad hoc check lists: All ten sites need something done? I scribble each one down with a box next to it so I know where I left off if I get interrupted (which happens a lot). </div>
<p>![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2012/05/evernote_attributes.jpg)</p>
<div style="text-align: left; margin: 1em;">The hole in the system, such as it is, is where the information goes if I need space or need to clear the whiteboard for a complex task or series of steps. I briefly considered just typing the contents up before erasing, but that takes too much time. Instead, I spent $0.99 on <a href="http://itunes.apple.com/us/app/fastever-snap-camera-app-for/id386955086?mt=8">Fast Ever Snap</a> for my iPhone. The app's sole purpose is to quickly create photo notes in Evernote: It opens the camera very quickly, has provisions for setting a default tag, and it queues up any photos you add for sync in the background. I've set it to use "whiteboard" as the default tag. So when I get to a point where the whiteboard needs to be wiped, I snap a picture of it in Fast Ever Snap and move on. All my whiteboard snapshots are available with a quick tag search.</div>
<div style="text-align: left; margin: 1em;">One thing I haven't yet done with any consistency but probably ought to is add an end-of-day review of my snapshots. One of Evernote's neater little capabilities is that you can drop a checkbox into a note and then search on all notes with unchecked checkboxes. So for snapshots that have unfinished items, taking 15 minutes at the end of the day to mark a snapshot with its incomplete todos will make it available for the morning board restart the next day.</div>
<div style="text-align: left; margin: 1em;">The main point, I guess, is that the whiteboard never really leaves my sight. It's a big 3' x 4' reminder of itself. If I have any regret, it's that I didn't spring for a larger one, and I may yet. Neighbor Mic tells me it's not hard to find 8' wide and larger at assorted auctions and giveaways.</div>
<div style="text-align: left; margin: 1em;"> </div>
<p>#attention #whiteboard</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%203%27%20x%204%27%20brain%20with%20a%20very%20expensive%20dongle">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Two Fixes</title>
      <link>https://mike.puddingtime.org/posts/2010-08-26-two-fixes/</link>
      <pubDate>Thu, 26 Aug 2010 00:14:55 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2010-08-26-two-fixes/</guid>
      
      <description>Boy did I get sick of having to set this every time I ran Panopticon:
look_back = 3.days Some days it was “2.days,” some days it was “1.day,” some days it was 3.days. So:
tsf = &#34;/Users/mike/.panopticon_stamp&#34; timestamp = File.stat(tsf).mtime look_back = Time.now - timestamp then when all is done: …</description>
      <content:encoded><![CDATA[<p>Boy did I get sick of having to set this every time I ran Panopticon:</p>
<pre><code>	look_back = 3.days
</code></pre>
<p>Some days it was &ldquo;2.days,&rdquo; some days it was &ldquo;1.day,&rdquo; some days it was 3.days. So:</p>
<pre><code>	tsf  = &quot;/Users/mike/.panopticon_stamp&quot;

	timestamp = File.stat(tsf).mtime

	look_back = Time.now - timestamp
</code></pre>
<p>then when all is done:</p>
<pre><code>	\`touch {tsf}\`
</code></pre>
<p>It wouldn&rsquo;t have even been a problem if I&rsquo;d just checked some items as &ldquo;done,&rdquo; but when I accidentally create an item, or decide an item doesn’t need to be read or processed or whatever, I just want it gone and I don&rsquo;t want it sitting in a log claiming to be a thing I <em>did</em> or <em>read</em>. Because I <em>didn&rsquo;t.</em>  But when you delete an item, it&rsquo;s gone and Panopticon can&rsquo;t find it anywhere and will recreate it, which meant I was being haunted by zombie tasks that I most pointedly did not want to deal with anymore. Now I won&rsquo;t be.</p>
<p>But all that put the next thing in mind: It&rsquo;d be pretty nice to have things I mark as &ldquo;done&rdquo; in Panopticon get unmarked/unflagged/unstarred or whatever in their native app. So a starred item in Google Reader stops being starred, a flagged message gets unflagged, a bookmark in delicious gets tagged as &ldquo;read,&rdquo; etc.</p>
<p>Fixing Sampled Reporting</p>
<p>Probably no time for that this week. I spent a lot of time fiddling around with some problems introduced by <a href="http://code.google.com/apis/analytics/docs/concepts/gaConceptsSampling.html">sampling in Google Analytics</a>.</p>
<p>The brief version: If you make queries against the Analytics API that involve more than 500k events, you start getting sampled data. The article specifically mentions pulling reports for long periods of time.I&rsquo;ve been pulling reports for a number of sites that do well north of 500k visits per month, so when I started pulling queries for periods of 60 or 90 days long I was most certainly getting back sampled data.</p>
<p>When I started trying to do really simple reporting about how page views changed month-over-month, I started seeing articles that somehow had fewer total page views when they were 60 days old than when they were 30 days old.  Changing my approach to gathering page views from &ldquo;single long period&rdquo; to &ldquo;consecutive shorter periods&rdquo; cleared the problem up. Rather than pulling queries for a period like &ldquo;from the date of publication to 60 days after the date of publication,&rdquo; you&rsquo;re a lot better off pulling a pair of queries: &ldquo;from the date of publication to 30 days after the date of publication,&rdquo; and &ldquo;from 60 days after the date of publication to 29 days before that date&rdquo; then adding them up. Unless the site is doing more than 500k visits a month, sampling is less likely to get you.</p>
<p>#adhd #attention #panopticon #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Two%20Fixes">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Panopticon 0.1</title>
      <link>https://mike.puddingtime.org/posts/2010-06-30-panopticon-0-1/</link>
      <pubDate>Wed, 30 Jun 2010 03:15:02 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2010-06-30-panopticon-0-1/</guid>
      
      <description>So, panopticon 0.1 is very simple and it handles:
recently flagged e-mail in several accounts recently flagged/starred items in my RSS reader (NetNewsWire, in sync with Google Reader) recently created notes in my Evernote account recently added Instapaper items It executes in a few seconds and adds …</description>
      <content:encoded><![CDATA[<p>So, panopticon 0.1 is very simple and it handles:</p>
<ul>
<li>recently flagged e-mail in several accounts</li>
<li>recently flagged/starred items in my RSS reader (NetNewsWire, in sync with Google Reader)</li>
<li>recently created notes in my Evernote account</li>
<li>recently added Instapaper items</li>
</ul>
<p>It executes in a few seconds and adds everything it finds from each of those inboxes to my &ldquo;Today&rdquo; list, tagged with &ldquo;panopticon&rdquo; and the name of the source, with a due date of 5 p.m.</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-gdscript3" data-lang="gdscript3"><span class="line"><span class="cl"><span class="o">&lt;</span><span class="n">div</span> <span class="n">style</span><span class="o">=</span><span class="s2">&#34;text\-align:center;margin:1em;&#34;</span><span class="o">&gt;!</span><span class="p">[](</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">media</span><span class="o">.</span><span class="n">puddingtime</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">archive</span><span class="o">/</span><span class="n">mph</span><span class="o">.</span><span class="n">puddingbowl</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">wordpress</span><span class="o">/</span><span class="n">wp</span><span class="o">-</span><span class="n">content</span><span class="o">/</span><span class="n">uploads</span><span class="o">/</span><span class="mi">2010</span><span class="o">/</span><span class="mi">06</span><span class="o">/</span><span class="n">things_list_s</span><span class="o">.</span><span class="n">jpg</span><span class="p">)</span><span class="o">&lt;/</span><span class="n">div</span><span class="o">&gt;</span></span></span></code></pre></div>
<p>I described the point <a href="http://mph.puddingbowl.org/2010/06/feedback-loop/">yesterday</a>. Restated:</p>
<p>If you&rsquo;re one of those people who needs to stop at the end of the day and turn out your pockets, making sure you put your keys in the key place, and your change in a little bowl, and loose receipts wherever you put those, that&rsquo;s what panopticon is doing for me: Helping me put everything I&rsquo;ve accumulated from the &rsquo;net over the past day in a little glass bowl. That way it won&rsquo;t get run through the wash or carelessly emptied into the trash.</p>
<p>It&rsquo;s really not done at all, but I&rsquo;ve learned that it&rsquo;s best for me to do the bare minimum to make a thing work before I lose interest in a project. I can always fiddle with it later. So some things I&rsquo;ve left out for now:</p>
<ul>
<li>passing e-mail and RSS items through the summarize service (<a href="http://mph.puddingbowl.org/2009/02/inbox-glue/">described here last February</a>) to populate the to-do body</li>
<li>Things adding the ability to create live links to web pages and messages using the <code>message://</code> URL handler built into OS X in to-do bodies, but that&rsquo;s on them.</li>
<li>Checking the Things Logbook list to make sure there&rsquo;s not a recent item of the same title and source that&rsquo;s been completed and so is not on the list.</li>
<li>exception handling. I mean, why not create a to-do out of &ldquo;something&rsquo;s going wrong with this script&rdquo; when something goes wrong with the script?</li>
</ul>
<p>To change:</p>
<ul>
<li>The whole &ldquo;what&rsquo;s been seen, what&rsquo;s been completed?&rdquo; thing is due for some more thought, really.</li>
<li>Figuring out how I can do more of this outside of rb-appscript. The big advantage of using appscript instead of consuming a bunch of services and feeds is that you don&rsquo;t have to go around either finding gems that talk to assorted APIs or parsing the JSON, etc. that they send back on their own, ask for API keys, etc. You just talk to the apps you use to consume those services. The problem with that approach is that it only works on a Mac.  If the giant Mac-eating space robots turn up and enslave us all, ushering in an era where no computer more robust than an Ubuntu netbook is permitted to function on the surface of the planet, I&rsquo;m screwed.</li>
</ul>
<p>I&rsquo;d file it under &ldquo;secret software,&rdquo; but it&rsquo;s not because it&rsquo;s posted here. But it&rsquo;s at about that level: Won&rsquo;t blow anything up, even when it doesn&rsquo;t work it will help me a lot more than if it weren&rsquo;t running at all.</p>
<p>What continues to be awesome to me about it all: 81 lines of code. The magic is all in the eight &lsquo;require&rsquo; lines at the top, where much more talented people provide me with the tools I need to say things in such a simple, forgiving way.  I mean ...</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">notes = @evernote\.notebooks\[&#34;Inbox&#34;\]\.notes\[its\.creation\_date\.gt\(Time\.now \- 2\.days\)\]\.get</span></span></code></pre></div>
<p>That&rsquo;s just neat.</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;div id=&#34;snipplr\_embed\_36663&#34; class=&#34;snipplr\_embed&#34;&gt;&lt;a href=&#34;http://snipplr\.com/view/36663/panopticon/&#34;&gt;Code snippet \- Panopticon&lt;/a&gt; on Snipplr&lt;/div&gt;&lt;script type=&#34;text/javascript&#34; src=&#34;http://snipplr\.com/js/embed\.js&#34;&gt;&lt;/script&gt;&lt;script type=&#34;text/javascript&#34; src=&#34;http://snipplr\.com/json/36663&#34;&gt;&lt;/script&gt;</span></span></code></pre></div>
<p>#adhd #appscript #attention #panopticon #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Panopticon%200.1">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Feedback Loop</title>
      <link>https://mike.puddingtime.org/posts/2010-06-29-feedback-loop/</link>
      <pubDate>Tue, 29 Jun 2010 05:53:39 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2010-06-29-feedback-loop/</guid>
      
      <description>&lt;div style=&#34;text\-align:center;margin:1em;&#34;&gt;![](https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2010/06/panopticon.jpg)&lt;/div&gt; I remember an article from eleven or so years ago that explained how to use Perl to spider the Web and collect links to new pages from …</description>
      <content:encoded><![CDATA[





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-gdscript3" data-lang="gdscript3"><span class="line"><span class="cl"><span class="o">&lt;</span><span class="n">div</span> <span class="n">style</span><span class="o">=</span><span class="s2">&#34;text\-align:center;margin:1em;&#34;</span><span class="o">&gt;!</span><span class="p">[](</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">media</span><span class="o">.</span><span class="n">puddingtime</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">archive</span><span class="o">/</span><span class="n">mph</span><span class="o">.</span><span class="n">puddingbowl</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">wordpress</span><span class="o">/</span><span class="n">wp</span><span class="o">-</span><span class="n">content</span><span class="o">/</span><span class="n">uploads</span><span class="o">/</span><span class="mi">2010</span><span class="o">/</span><span class="mi">06</span><span class="o">/</span><span class="n">panopticon</span><span class="o">.</span><span class="n">jpg</span><span class="p">)</span><span class="o">&lt;/</span><span class="n">div</span><span class="o">&gt;</span></span></span></code></pre></div>
<p>I remember an article from eleven or so years ago that explained how to use Perl to spider the Web and collect links to new pages from my favorite sites. I don&rsquo;t remember all the details, except that it was written from a perspective that seems very alien now, because there are just so many ways to have things delivered now. I&rsquo;m sure some folks still find some benefit automating the retrieval of some things in that fashion, but for general-purpose &ldquo;keeping up with daily stuff,&rdquo; you can get an awful lot done with a custom section on your favorite news site and a healthy collection of RSS feeds to the right aggregator sites.</p>
<p>I&rsquo;m thinking about the problems that lump of Perl solved right now because it&rsquo;s become so easy to have so much just arrive on my computer&rsquo;s doorstep that the volume of information I might receive and want or need to deal with over the Web or wider &rsquo;net is beginning to feel like a deluge in its own right.</p>
<p>Here&rsquo;s a list of electronic inboxes I put things in each day:</p>
<ul>
<li>flagged/starred items in my mail</li>
<li>delicious bookmarks</li>
<li>Evernote notes</li>
<li>flagged/starred RSS articles</li>
<li>Instapaper items</li>
<li>Things todos</li>
</ul>
<p>A list of collection points:</p>
<ul>
<li>iPhone</li>
<li>iPad</li>
<li>Mac</li>
<li>MacBook (targeted for removal from the inventory, but still here for now, even if it isn&rsquo;t seeing a lot of use)</li>
</ul>
<p>I gather a lot of information in a lot of apps or services, and I usually pick the apps or services based on how frictionless it is to capture something into it along with how portable it is.  I love Evernote&rsquo;s Web clipper, for instance, because it&rsquo;s just sitting there waiting to be used and it takes very little effort to clip a new note and go on with what I&rsquo;m doing, and I can then get at that note from anywhere I&rsquo;m connected to the &rsquo;net. In fact, the collection process is so frictionless with a lot of these tools that the real challenge is keeping track of all the things that I come across and can&rsquo;t do something with ​<em>right now</em>​.</p>
<p>When I think about what I&rsquo;m doing with each of those tools I use to gather collections of things, I&rsquo;ve made the mistake of thinking of those things very narrowly: &ldquo;This is a bookmark,&rdquo; &ldquo;this is an interesting article,&rdquo; &ldquo;this is an e-mail message with an article I need to edit.&rdquo;  But that&rsquo;s way too narrow, because what they all really are is things I need to do, whether the &ldquo;doing&rdquo; is reading them, passing them along to someone else.</p>
<p>While I&rsquo;ve got a nice todo program that runs on every computer or device I own (<a href="http://culturedcode.com/">Things</a>), it&rsquo;s not easy or practical to turn all those things I gather into todos at the time they&rsquo;re created—that&rsquo;s a second step— and it&rsquo;s not really easy to circle back and sweep all those things up because they live a bunch of places. Even though Things runs on everything I own, it&rsquo;s sort of uneven in terms of what it can capture where. On an iPhone or iPad, for instance, Things requires a whole context switch to get something saved to it. It&rsquo;s more fluid and adaptable on my desktop or laptop.</p>
<p>Because the central point of my computing life is my desktop computer (an iMac), and because all the apps I use to deal with all these inboxes offer an AppleScript dictionary of some kind, the act of gathering up all the stuff in each of those inboxes  can be automated based on finding items based on their creation date (the last couple of days) and their uniqueness (don&rsquo;t already have a to-do with identical title, comments and source service).</p>
<p>Some sample gathering queries from two that I knocked off this morning, just to show how easy it is to find stuff using [rb language=&quot;-appscript&quot;]<a href="http://appscript.sourceforge.net/rb-appscript/index.html">/rb</a>:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">en = app\(&#34;Evernote&#34;\)</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">notes = en\.notebooks\[&#34;Inbox&#34;\]\.notes\[its\.creation\_date\.gt\(Time\.now \- 2\.days\)\]\.get</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">nnw = app\(&#34;NetNewsWire&#34;\)</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">flagged\_rss = nnw\.subscriptions\[its\.display\_name\.eq\(&#39;Flagged Items&#39;\)\]\.first\.get</span></span></code></pre></div>
<p>And all the code you need to make a new todo in Things:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">things = app\(&#34;Things&#34;\)</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">task = things\.make\(:at =&gt; app\.lists\[&#34;Today&#34;\]\.beginning,</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>
<pre><code>```
</code></pre>
<p>:new =&gt; :to_do,</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl"> </span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">    ```
</span></span><span class="line"><span class="cl">:with\_properties =&gt; \{:name =&gt; my\_title,</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>
<pre><code>```
</code></pre>
<p>:tag_names =&gt; &ldquo;panopticon&rdquo;, :notes =&gt; my_note,</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl"> </span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">    ```
</span></span><span class="line"><span class="cl">:due\_date =&gt; Time\.now \+ 8\.hours</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">\}\)</span></span></code></pre></div>
<p>I&rsquo;ve got a skeleton of something I&rsquo;m tagging as &ldquo;panopticon&rdquo;  that uses those two basic ideas as a script I can run now and then (though always first thing in the morning) to sweep up all those inboxes into the one inbox best equipped to get me to act on them: Things&rsquo; &ldquo;Today&rdquo; list.</p>
<p>Once everything is gathered up  and turned into todos, Things provides a nice interface for going down through them and either adding them to a project, doing something with them on the spot, deferring action on them, remembering to refile them, or deciding they weren&rsquo;t that important after all.  It&rsquo;s only one thing to remember (&ldquo;look in Things each morning&rdquo;), and I don&rsquo;t have to go visit each service each day to make sure there&rsquo;s not something in there I need to be doing.</p>
<p>I also get to keep using each service for what it&rsquo;s good for. I&rsquo;m not so much transmuting a bit of information into a bundle of potential action as I am cloning it into a bundle of potential action while the original runs around wherever it&rsquo;s happiest, in a format where it&rsquo;s most useful as a form of long-term recall.</p>
<p>#adhd #appscript #attention #information overload #panopticon #ruby #todos</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Feedback%20Loop">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Inbox Glue</title>
      <link>https://mike.puddingtime.org/posts/2009-02-19-inbox-glue/</link>
      <pubDate>Thu, 19 Feb 2009 23:24:39 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2009-02-19-inbox-glue/</guid>
      
      <description>MailTags is handy because it lets you assign due-dates (“tickle dates”) to incoming messages. One problem I’ve got with anything like that, though, is that I’ve already got an inbox for e-stuff in the form of Evernote. It’s possible to forward messages to Evernote for clipping, but I like having a …</description>
      <content:encoded><![CDATA[<p><a href="http://www.indev.ca/MailTags.html">MailTags</a> is handy because it lets you assign due-dates (&ldquo;tickle dates&rdquo;) to incoming messages. One problem I&rsquo;ve got with anything like that, though, is that I&rsquo;ve already got an inbox for e-stuff in the form of Evernote.  It&rsquo;s possible to forward messages to Evernote for clipping, but I like having a list of actionable messages for a given day in one place, hence the script below.</p>
<p>It goes through my &rsquo;tickler&rsquo; mail folder and pulls anything with a tickle date of the current day or earlier, finds Evernote notes tagged with today&rsquo;s date (I haven&rsquo;t gotten around to parsing the tags so I can grab earlier notes), and compiles them into a single Evernote note item.  I write other to-dos on a printed copy, which gives me a one-stop place to find everything.</p>
<p>One beef:  Evernote&rsquo;s HTML interpreter is sub-par.  It doesn&rsquo;t understand Apple&rsquo;s <code>message://</code> URIs, so it&rsquo;s not possible to dump an Evernote item with hyperlinks to messages as they appear in Mail.app.  I&rsquo;m guessing the way around that might involve importing an HTML file (instead of building a note object and storing HTML in it), but I haven&rsquo;t bothered testing yet.  I just dump plain text into the note for now.</p>
<p>One semi-neat thing is its use of the Mac &lsquo;Summarize&rsquo; feature in Applescript.  It lets you take something like <a href="http://www.google.com/hostednews/ap/article/ALeqM5iWxiu65iLP4CvDJ7BEsBOx-u_vdwD96DK3HO0">this article from the AP</a> and render it into a summary:</p>
<blockquote>
<p>&ldquo;President Barack Obama approved adding some 17,000 U.S. troops for the flagging war in Afghanistan, his first significant move to change the course of a conflict that his closest military advisers have warned the United States is not winning.&rdquo;</p>
</blockquote>
<p>The AppleScript syntax for that is just:</p>
<pre><code>summarize &quot;some text&quot; in 1
</code></pre>
<p>where &ldquo;1&rdquo; is the number of paragraphs you want back.</p>
<p>In Ruby/appscript, it&rsquo;s:</p>
<pre><code>osax.summarize(&quot;some text&quot;)
</code></pre>
<p>So when the script goes through the day&rsquo;s e-mail messages, it passes the message text through the summarizer, which has a better chance of getting me a useful nut than a simple <code>string.slice[0,200]</code> approach (though sometimes it misses in a way that at least provokes some stimulating head-scratching).</p>
<p>One other curiosity in this script.  Sometimes native Applescript has to use the &lsquo;using terms from&rsquo; convention.  MailTags is one such case. It tells Applescript that you&rsquo;re &rsquo;tell&rsquo;-ing Mail something, but you need the supplemental dictionary provided by the MailTags add-on.  rb-appscript doesn&rsquo;t allow for that, quite, so you&rsquo;ve got to do <a href="http://rubyforge.org/pipermail/rb-appscript-discuss/2008-October/000184.html">a little dancing around</a>.</p>
<pre><code>[sourcecode language=&quot;ruby&quot;]

!/usr/bin/env ruby

require 'rubygems'

require 'appscript'

require 'Date'

include Appscript

require 'osax'

include OSAX

require '/Users/mph/lib/ruby/mailtags.rb'

require 'erb'

today = Date.today.strftime(&quot;%Y-%m-%d&quot;)

title = &quot;Tickler File for {Date.today.strftime(&quot;%A, %B %d&quot;)}&quot;

mail = app(&quot;Mail&quot;, MailTags)

en = app(&quot;EverNote&quot;)

nb = en.notebooks[&quot;tickler&quot;]

ical = app(&quot;ical&quot;)

note = &quot;&quot;

messages = mail.accounts[&quot;Gmail&quot;].mailboxes[&quot;tickler&quot;].messages.get

notes = nb.notes.get

todays_notes = []

todays_messages = []

notes.each do |n|

  n.tags.get.each do |t|

    if t.to_s =~ /{today}/

      todays_notes &lt;&lt; n

    end

  end

end

messages.each do |m|

  due_date = m.due_date.get.strftime(&quot;%Y-%m-%d&quot;)

  if due_date &gt;= today

    todays_messages &lt;&lt; m

  end

end

template = &lt;&lt;END

Tickler File for &lt;%= Date.today.strftime(&quot;%A, %B %d&quot;) %&gt;



Today's Messages

=================================================

&lt;% todays_messages.each do |m| %&gt;

  [  ] &lt;%= m.subject.get %&gt; (due &lt;%= m.due_date.get.strftime(&quot;%m/%d&quot;) %&gt;)

  from &lt;%= m.sender.get %&gt; on &lt;%= m.date_sent.get.strftime(&quot;%A, %B %d&quot;) %&gt;

  &quot;&lt;%= osax.summarize(m.content.get).strip %&gt;&quot;







--------------------------------------------------------------------------------------------------

&lt;% end %&gt;

Today's Notes

=================================================

&lt;% todays_notes.each do |n| %&gt;

[  ] &lt;%= n.title.get %&gt;

&lt;%end %&gt;

END

tickle_text = ERB.new(template).result

tickle_note = en.create_note(:title =&gt; title, :notebook =&gt; &quot;Inbox&quot;, :with_text =&gt; tickle_text)

[/sourcecode]
</code></pre>
<p>#appscript #attention #evernote #mail #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Inbox%20Glue">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Pick an Inbox, Any Inbox (Updated)
I just did…</title>
      <link>https://mike.puddingtime.org/posts/2009-01-30-pick-an-inbox-any-inbox-updated-i-just-did-an/</link>
      <pubDate>Fri, 30 Jan 2009 02:19:06 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2009-01-30-pick-an-inbox-any-inbox-updated-i-just-did-an/</guid>
      
      <description>Pick an Inbox, Any Inbox (Updated)
I just did an inventory of all the things I have licenses for, accounts on or access to that I could use as an inbox/organizer:
Remember the Milk
Backpack
Remind
Unix calendar
Redmine
OmniFocus
OmniOutliner
Emacs org mode
Mail.app todo/notes
gMail todos
Google …</description>
      <content:encoded><![CDATA[<p>Pick an Inbox, Any Inbox (Updated)</p>
<p>I just did an inventory of all the things I have licenses for, accounts on or access to that I could use as an inbox/organizer:</p>
<p><a href="https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2009/01/memento.jpg" class="glightbox" data-gallery="post-aa4bd479ad94aa7b521c0d8f65f44ed7"><img src="https://media.puddingtime.org/archive/mph.puddingbowl.org/wordpress/wp-content/uploads/2009/01/memento.jpg" alt="" loading="lazy"></a></p>
<ul>
<li>
<p>Remember the Milk</p>
</li>
<li>
<p>Backpack</p>
</li>
<li>
<p>Remind</p>
</li>
<li>
<p>Unix calendar</p>
</li>
<li>
<p>Redmine</p>
</li>
<li>
<p>OmniFocus</p>
</li>
<li>
<p>OmniOutliner</p>
</li>
<li>
<p>Emacs org mode</p>
</li>
<li>
<p>Mail.app todo/notes</p>
</li>
<li>
<p>gMail todos</p>
</li>
<li>
<p>Google Pages</p>
</li>
<li>
<p>iCal</p>
</li>
<li>
<p>plain-old-textfiles</p>
</li>
<li>
<p>plain-old-paper</p>
<ul>
<li>
<p>post-its</p>
</li>
<li>
<p>notebooks</p>
<ul>
<li>
<p>small, medium, large Moleskines in soft or hard cover</p>
</li>
<li>
<p>assorted hard cover journals</p>
</li>
<li>
<p>a large format calendar/planner</p>
</li>
</ul>
</li>
<li>
<p>ring binder</p>
</li>
<li>
<p>graph paper</p>
</li>
</ul>
</li>
<li>
<p>VoodooPad</p>
</li>
<li>
<p>Entourage</p>
</li>
<li>
<p>iPhone</p>
<p>* Evernote</p>
<ul>
<li>
<p>Appigo Todo</p>
</li>
<li>
<p>reQall</p>
</li>
</ul>
</li>
<li>
<p>Yojimbo</p>
</li>
</ul>
<p>Integration</p>
<p>I grouped them into three general lumps based on how well they can be tied to other tools I use with minimal fuss.</p>
<ul>
<li>
<p>very integrated - OmniFocus, OmniOutliner, Yojimbo</p>
</li>
<li>
<p>somewhat integrated - VoodooPad, iCal, iPhone</p>
</li>
<li>
<p>not integrated - Web-based todo lists, Emacs, paper-based stuff, text files</p>
</li>
</ul>
<p>A well integrated app has hooks into other apps &ndash; iCal, Mail, my browser and my feed reader &ndash; so I can get stuff out of those apps and into my inbox.  Something like OmniFocus or OmniOutliner, both of which have extensive support for the services menu, count as &ldquo;very integrated.&rdquo;</p>
<p>Apps that have a scripting dictionary I can use to set up imports count as &ldquo;somewhat integrated.&rdquo;</p>
<p>Apps that either don&rsquo;t provide scripting hooks to move stuff around or cannot be reached from other apps go in the &ldquo;not integrated&rdquo; category.  Things that require a mastery of lisp, btw, go under &ldquo;not integrated.&rdquo;</p>
<p>Integration is an important axis to consider because I need a sweet spot:  Too little integration, and it becomes tedious to get stuff out of various inputs; too much integration and it becomes easy to lose a certain deliberative pace that helps when processing stuff.  That makes it easier to just whip through a list of inputs without thinking about each of them and giving them a chance to register somewhere besides a nested list somewhere.</p>
<p>Context</p>
<p>I also grouped based on the context in which a given tool can be used:</p>
<ul>
<li>
<p>computer (local app)</p>
</li>
<li>
<p>computer (hosted app)</p>
</li>
<li>
<p>phone</p>
</li>
<li>
<p>paper</p>
</li>
</ul>
<p>Complexity</p>
<p>I don&rsquo;t think I need to track states beyond &ldquo;is it done?&rdquo;, &ldquo;is it not done?&rdquo; and &ldquo;when is it due?&rdquo; I don&rsquo;t need to categorize much beyond &ldquo;personal,&rdquo; &ldquo;work&rdquo; and &ldquo;freelance work.&rdquo; More than that and things rapidly get too fiddly.</p>
<p>Portability</p>
<p>Some day a giant space bird is going to come down and eat all the Macs, leaving us nothing but what we had the foresight to stuff in a Subversion repository.  The same space bird will probably also convince Google to kill our Gmail accounts and drive Remember the Milk into bankruptcy (or sell it to Yahoo, in which case we&rsquo;ll know its days as a useful, ad-free resource that cares about keeping users are numbered).</p>
<p>&ldquo;Portability&rdquo; is a measure of how well&ndash;given nothing but a Linux box accessed via a serial console, the first CD of the latest Debian release and no X11&ndash;the stuff stored in a given inbox/organizer would survive. If we measured portability on a three point scale:</p>
<ul>
<li>
<p>The highest scoring tools will use plain text in a human-readable format (markup like Taskpaper, Markdown or org-mode, YAML, plain paper)</p>
</li>
<li>
<p>The middle scorers will use plain text or a format that can be parsed with minimal effort (HTML/XML, sqlite/MySQL with a simple schema, OPML, RSS/Atom, iCalendar) and can be backed up/exported with minimal effort via cron/launchd, etc.</p>
</li>
<li>
<p>Low scorers offer no easy export or access to information outside the context of the app itself; or they export data in formats that would take a lot of effort to transform into something useful elsewhere.</p>
</li>
</ul>
<p>Define &ldquo;Easy&rdquo;</p>
<p>If I look at setting some element of the inbox up as a great opportunity to hack, it&rsquo;s not &ldquo;easy.&rdquo;</p>
<p>Why, Mike, Why?</p>
<p>Because if I don&rsquo;t sit down and figure all this out in advance, I&rsquo;ll have what I&rsquo;ve got now:  A documents folder that has half-processed data from a solid 75% of the apps listed above, an overflowing paper inbox, a stack of Moleskines with three pages filled, and accounts on every organizer/list service I know of.</p>
<p>But You&rsquo;ve, You Know, Been Screwing Around With This for, Like, YEARS!</p>
<p>That&rsquo;s why I don&rsquo;t point and laugh when <em>you</em> do stupid shit.</p>
<p>Tabular</p>
<p>I made a spreadsheet to help me think it through:</p>
<iframe src="https://spreadsheets.google.com/pub?key=prwcU06DKj6tl0eBwHYVfAQ&output=html" width=500 style="height:30em;">
<p><a href="https://spreadsheets.google.com/pub?key=prwcU06DKj6tl0eBwHYVfAQ&output=html">The spreadsheet</a></p>
</iframe>
<p>#attention #organization</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Pick%20an%20Inbox%2C%20Any%20Inbox%20%28Updated%29%0AI%20just%20did%E2%80%A6">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Giving RescueTime a Shot</title>
      <link>https://mike.puddingtime.org/posts/2009-01-16-giving-rescuetime-a-shot/</link>
      <pubDate>Fri, 16 Jan 2009 01:48:52 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2009-01-16-giving-rescuetime-a-shot/</guid>
      
      <description>I’m giving RescueTime a look for the next 30 days. It’s a Web service driven by a small client-side data collector that gathers information on the current active application and visited sites. The information is uploaded and compiled into a series of reports. Users can categorize applications and …</description>
      <content:encoded><![CDATA[<p>I&rsquo;m giving <a href="http://www.rescuetime.com/dashboard" title="RescueTime">RescueTime</a> a look  for the next 30 days.  It&rsquo;s a Web service driven by a small client-side data collector that gathers information on the current active application and visited sites.  The information is uploaded and compiled into a series of reports.  Users can categorize applications and sites, add tags for further organization, and weight categories by their &ldquo;productivity.&rdquo;</p>
<p>I&rsquo;m not fond of the product&rsquo;s dependence on terms like &ldquo;efficiency&rdquo; and &ldquo;productivity&rdquo; to describe the weight users can assign to categories and tags, but I&rsquo;m also not in the business demographic, which is where RescueTime hopes to make its real money.</p>
<p>In fact, if I worked somewhere where RescueTime was used to &ldquo;surface the idea of time management in an interesting and engaging way,&rdquo; I&rsquo;d find it a bit creepy and would have to consider having some fun with the client-side monitor&rsquo;s eminently parseable YAML logs:</p>
<pre><code>- os_username: kindjal\mph

  app_name: TextMate

  window_title: 'Hi, boss ... busy busy busy!'

  start_time: 2009-01-15 06:23:47

  end_time: 2009-01-15 06:24:33
</code></pre>
<p>In fact, it&rsquo;s those logs that keep me interested in it at all.  Even if RescueTime turned out to be a really poor service, or just plain folded,  the monitor app is just a lump of AppleScript with a preferences interface. I say &ldquo;just a lump,&rdquo; but it does show how to do a lot of stuff I&rsquo;d rather not have to reinvent myself.  It would be trivial to build something out of the exposed script and write my own parsers/interpreters. It&rsquo;s even possible to extend it now.  Here, for instance, is the bit of the script that deals with Firefox logging:</p>
<pre><code>if theApplication starts with &quot;aFirefox&quot; then

		try

			tell application &quot;Finder&quot; to set appName to \ 

				name of application file id &quot;org.mozilla.firefox&quot;

			tell application appName to set fullURL to \

				«class curl» of window 1

			if debugLog is true then log fullURL

			set extendedInfo to extractDomain(fullURL)

			return extendedInfo

		on error error_message number error_number

			log_error(&quot;Error: &quot; &amp; error_number &amp; &quot;. &quot; &amp; error_message, &quot;1140&quot;, 4)

			set extendedInfo to &quot;empty&quot;

		end try

	end if
</code></pre>
<p>For an app like NetNewsWire, which gets a lot of my attention but doesn&rsquo;t receive very good coverage from RescueTime, that provides a decent template for pulling the current active article in NNW, e.g.:</p>
<pre><code>tell application appName

	set fullURL to the URL of the selectedHeadline

end tell
</code></pre>
<p>The logs are all stored locally once they&rsquo;re uploaded, too, so I can use them for my own applications.</p>
<p>I&rsquo;ve tried RescueTime in the past, but I didn&rsquo;t have any real goal for using it.  Now I can see how it could fit into a broader campaign to be mindful of where my attention is going, and it lets me concentrate on the parts of my attention tracking app that are more about identifying priorities and creating a useful feedback loop.</p>
<p>#attention #rescuetime</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Giving%20RescueTime%20a%20Shot">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Wrapping Up NNW Attention Tracking With Ruby</title>
      <link>https://mike.puddingtime.org/posts/2009-01-11-wrapping-up-nnw-attention-tracking-with-ruby/</link>
      <pubDate>Sun, 11 Jan 2009 16:05:09 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2009-01-11-wrapping-up-nnw-attention-tracking-with-ruby/</guid>
      
      <description>Well, it’s not the prettiest, but I wanted to finish the basics of my NNW feed attention tracking so I could feel free to drop it in a cron job and forget about doing much more with it.
This includes a hash for weighting some feeds that require a look to see what an entry is about vs. being able to …</description>
      <content:encoded><![CDATA[<p>Well, it&rsquo;s not the prettiest, but I wanted to finish the basics of my NNW feed attention tracking so I could feel free to drop it in a cron job and forget about doing much more with it.</p>
<p>This includes a hash for weighting some feeds that require a look to see what an entry is about vs. being able to tell from just the headline.  I used erb to spit out a Web page I can drop onto lighttpd running on my MacBook:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-gdscript3" data-lang="gdscript3"><span class="line"><span class="cl"><span class="o">&lt;</span><span class="n">div</span> <span class="n">style</span><span class="o">=</span><span class="s2">&#34;text\-align:center;&#34;</span><span class="o">&gt;!</span><span class="p">[](</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">media</span><span class="o">.</span><span class="n">puddingtime</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">archive</span><span class="o">/</span><span class="n">mph</span><span class="o">.</span><span class="n">puddingbowl</span><span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">wordpress</span><span class="o">/</span><span class="n">wp</span><span class="o">-</span><span class="n">content</span><span class="o">/</span><span class="n">uploads</span><span class="o">/</span><span class="mi">2009</span><span class="o">/</span><span class="mi">01</span><span class="o">/</span><span class="n">attention</span><span class="o">-</span><span class="n">charts</span><span class="o">.</span><span class="n">png</span><span class="p">)</span><span class="o">&lt;/</span><span class="n">div</span><span class="o">&gt;</span></span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;p&gt;</span></span></code></pre></div>
<p>[sourcecode language=&lsquo;ruby&rsquo;]</p>
<p>!/usr/bin/ruby</p>
<p>require &lsquo;rubygems&rsquo;</p>
<p>require &lsquo;appscript&rsquo;</p>
<p>require &lsquo;google_chart&rsquo;</p>
<p>require &rsquo;erb&rsquo;</p>
<p>include Appscript</p>
<p>nnw = app(&ldquo;NetNewsWire&rdquo;)</p>
<p>Lose NNW synthetic groups, feeds that serve some utility purpose, feeds I don&rsquo;t care to track</p>
<p>unwanted_groups = [&ldquo;Clippings&rdquo;, &ldquo;Mobile&rdquo;, &ldquo;Flagged Items&rdquo;, &ldquo;Latest News&rdquo;, &ldquo;monitors&rdquo;, &ldquo;miscfeeds&rdquo;, &ldquo;mma&rdquo;, &ldquo;people_blogs&rdquo;]</p>
<p>some feeds have opaque headlines that require a look before deciding whether to read</p>
<p>this creates false &ldquo;attention,&rdquo; so these adjustments are subtracted when the chart is generated:</p>
<p>sub_adjustments = {&ldquo;MetaFilter&rdquo; =&gt; 50, &ldquo;Daring Fireball&rdquo; =&gt; 20}</p>
<p>feeds = nnw.subscriptions[its.is_group.eq(false)].get</p>
<p>feeds.sort!{ |a,b| b.calculated_attention_score.get &lt;=&gt; a.calculated_attention_score.get}</p>
<p>groups = nnw.subscriptions[its.is_group.eq(true)].get</p>
<p>groups.reject!{|g| unwanted_groups.include?(g.display_name.get) }</p>
<p>groupnames = []</p>
<p>groups.each {|g| groupnames &laquo; g.display_name.get}</p>
<p>graphs = [groups, feeds]</p>
<p>graph_names = [&ldquo;groups&rdquo;, &ldquo;top feeds&rdquo;]</p>
<p>groupnames.each do |g|</p>
<p>feeds = nnw.subscriptions[its.group.display_name.eq(g)].get</p>
<p>feeds.reject!{|f| f.calculated_attention_score.get &lt; 1 }</p>
<p>graphs &laquo; feeds</p>
<p>graph_names &laquo; g</p>
<p>end</p>
<p>markup = []</p>
<p>graphs.each do |g|</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">graph\_name = graph\_names\.shift</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">pc = GoogleChart::PieChart\.new\(&#39;500x200&#39;, graph\_name, false\)</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">g\[0\.\.9\]\.each do |s|</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">name = s\.display\_name\.get</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>
<pre><code>  ```
</code></pre>
<p>if sub_adjustments.has_key?(name)</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">  </span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">      ```
</span></span><span class="line"><span class="cl">score = s\.calculated\_attention\_score\.get \- sub\_adjustments\[name\]</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>
<pre><code>```
</code></pre>
<p>else</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">      ```
</span></span><span class="line"><span class="cl">score = s\.calculated\_attention\_score\.get</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>
<pre><code>```
</code></pre>
<p>end</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">    ```
</span></span><span class="line"><span class="cl">@feedname = s\.display\_name\.get\.gsub\(/\(\\&#34;|\\&#39;\)/, &#34;&#34;\)</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>
<pre><code>```
</code></pre>
<p>pc.data &ldquo;{@feedname} ({score})&rdquo;, score</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">end
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">markup &lt;&lt; %Q@ `![]({pc.to_url})` @
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">end
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">@page = &lt;&lt;END\_OF\_PAGE</span></span></code></pre></div>
<p>&lt;!DOCTYPE html PUBLIC &ldquo;-//W3C//DTD XHTML 1.0 Transitional//EN&rdquo;</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    ```
</span></span><span class="line"><span class="cl">&#34;http://www\.w3\.org/TR/xhtml1/DTD/xhtml1\-transitional\.dtd&#34;&gt;</span></span></code></pre></div>
<p>​<code>&lt;html xmlns=&quot;</code>​​<code>http://www\.w3\.org/1999/xhtml</code>​​<code>&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;</code>​</p>
<p><code>&lt;head&gt;</code></p>
<p><code>&lt;meta http\-equiv=&quot;content\-type&quot; content=&quot;text/html; charset=utf\-8&quot; /&gt;</code></p>
<p><code>&lt;title&gt;</code> NetNewsWire Attention Charts <code>&lt;/title&gt;</code></p>
<p><code>&lt;/head&gt;</code></p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;body&gt;</span></span></code></pre></div>
<p>&lt;% markup.each do |m|%&gt;</p>
<p>&lt;%= m %&gt;</p>
<p>&lt;% end %&gt;</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;/body&gt;</span></span></code></pre></div>
<p><code>&lt;/html&gt;</code></p>
<p>END_OF_PAGE</p>
<p>File.open(&quot;/Users/mph/Sites/attention/index.html&quot;, &lsquo;w&rsquo;) {|f| f.write(ERB.new(@page).result) }</p>
<p>[/sourcecode]</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;/p&gt;</span></span></code></pre></div>
<p>#attention #netnewswire #rb-appscript #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Wrapping%20Up%20NNW%20Attention%20Tracking%20With%20Ruby">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>More Feed Graphing With NNW and Ruby, The Distant Rumble of ActiveRecord</title>
      <link>https://mike.puddingtime.org/posts/2009-01-09-more-feed-graphing-with-nnw-and-ruby-the-distant/</link>
      <pubDate>Fri, 09 Jan 2009 01:31:45 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2009-01-09-more-feed-graphing-with-nnw-and-ruby-the-distant/</guid>
      
      <description>I did a little more fiddling with NNW &amp; Ruby this morning. I’m working toward putting together a little attentional dashboard that gives me the attention scores for my most read feeds, then breaks things down into charts for each feed group.
Right now I’ve got eight groups:
mma -- mixed martial arts …</description>
      <content:encoded><![CDATA[<p>I did a little more fiddling with NNW &amp; Ruby this morning. I&rsquo;m working toward putting together a little attentional dashboard that gives me the attention scores for my most read feeds, then breaks things down into charts for each feed group.</p>
<p>Right now I&rsquo;ve got eight groups:</p>
<ul>
<li>mma -- mixed martial arts news</li>
<li>mac -- mac stuff</li>
<li>blogs -- blogs that aren&rsquo;t written by people I know</li>
<li>politics -- blogs that are primarily political</li>
<li>miscfeeds -- a collection of monitors for things like new Netflix releases, client sites I watch, Dreamhost updates, etc.</li>
<li>web -- stuff to do with Web development</li>
<li>news -- institutional news sources (the Oregonian, NYT, etc.)</li>
<li>people_blogs -- blogs that are written by people I know</li>
</ul>
<p>NetNewsWire has three groups it chunks in as well:</p>
<ul>
<li>Latest News: everything that&rsquo;s unread in all feeds</li>
<li>Flagged Items: everything I&rsquo;ve flagged</li>
<li>Clippings: stuff saved from the NNW iPhone client</li>
</ul>
<p>For purposes of NNW&rsquo;s scripting dictionary, anything that&rsquo;s not a feed you pull down from someone&rsquo;s server somewhere is &ldquo;synthetic.&rdquo;  So to break things down into groups and leave out NNW&rsquo;s groups, I just put all the undesired groups and synthetic feeds into an array.</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-gdscript3" data-lang="gdscript3"><span class="line"><span class="cl">\<span class="o">!</span>\<span class="p">[</span><span class="n">nnw</span>\<span class="n">_groups</span>\<span class="n">_attention</span>\<span class="o">.</span><span class="n">png</span>\<span class="p">]</span>\<span class="p">(</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">mph</span>\<span class="o">.</span><span class="n">puddingbowl</span>\<span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">wordpress</span><span class="o">/</span><span class="n">wp</span>\<span class="o">-</span><span class="n">content</span><span class="o">/</span><span class="n">uploads</span><span class="o">/</span><span class="mi">2009</span><span class="o">/</span><span class="mi">01</span><span class="o">/</span><span class="n">nnw</span>\<span class="o">-</span><span class="n">groups</span>\<span class="o">-</span><span class="n">attention</span>\<span class="o">.</span><span class="n">png</span>\<span class="p">)</span></span></span></code></pre></div>
<p>This morning&rsquo;s efforts didn&rsquo;t get me very far, but now it&rsquo;s generating two graphs: one for most read feeds and one for my groups.</p>
<p>The people_blogs group you can see in the chart shows a low attention score, which should not be interpreted to mean I don&rsquo;t read blogs by people I know much.  They&rsquo;re actually at the top of my list of things to read each day, but I also tend to keep moribund and likely extinct blogs in that list around indefinitely against the day the author quits dribbling precious creative fluids into Twitter.  Consequently, when I get around to adding a <code>case</code> block to weight all the groups with NNW&rsquo;s <code>scripted attention score</code> , the people_blogs group will get its due.</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;p&gt;</span></span></code></pre></div>
<p>[sourcecode language=&lsquo;ruby&rsquo;]</p>
<p>!/usr/bin/ruby</p>
<p>require &lsquo;rubygems&rsquo;</p>
<p>require &lsquo;appscript&rsquo;</p>
<p>require &lsquo;scruffy&rsquo;</p>
<p>include Appscript</p>
<p>nnw = app(&ldquo;NetNewsWire&rdquo;)</p>
<p>nnw doesn&rsquo;t differentiate between differing kinds of synthetic items</p>
<p>unwanted_groups = [&ldquo;Clippings&rdquo;, &ldquo;Mobile&rdquo;, &ldquo;Flagged Items&rdquo;, &ldquo;Latest News&rdquo;, &ldquo;monitors&rdquo;, &ldquo;miscfeeds&rdquo;]</p>
<p>biglist = nnw.subscriptions.get</p>
<p>feeds = biglist.reject{|s| s.is_group.get != false}  get rid of folders</p>
<p>feeds.sort!{ |a,b| b.calculated_attention_score.get &lt;=&gt; a.calculated_attention_score.get}</p>
<p>groups = biglist.reject{|s| s.is_group.get == false}  get rid of non-folders</p>
<p>groups.reject!{|g| unwanted_groups.include?(g.display_name.get) }</p>
<p>graphs = [groups, feeds[0,9]]</p>
<p>graph_names = [&ldquo;Groups&rdquo;, &ldquo;Feeds&rdquo;]</p>
<p>graphs.each do |g|</p>
<p>scores = {}</p>
<p>graph_name = graph_names.shift</p>
<p>graph = Scruffy::Graph.new</p>
<p>graph.title = &ldquo;NNW Attention Scores by &quot; + graph_name</p>
<p>graph.renderer = Scruffy::Renderers::Pie.new</p>
<p>g.each do |s|</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">unless unwanted\_groups\.include?\(s\.display\_name\.get\)</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>
<pre><code>```
</code></pre>
<p>name = s.display_name.get</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">    ```
</span></span><span class="line"><span class="cl">score = s\.calculated\_attention\_score\.get</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>
<pre><code>```
</code></pre>
<p>title = name + &quot; ({score})&rdquo;  get the attention score into the graph legend</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">    ```
</span></span><span class="line"><span class="cl">scores\[title\] = score</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">end</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">end</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">graph\.add :pie, &#39;&#39;, scores</span></span></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"></code></pre></div>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">graph\.render  :to =&gt; &#34;/Users/mph/Desktop/graphs/nnw\_\{graph\_name\.downcase\}\_attention\.png&#34;,:as =&gt; &#39;png&#39;</span></span></code></pre></div>
<p>end</p>
<p>[/sourcecode]</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;/p&gt;</span></span></code></pre></div>
<p>Deeper History</p>
<p>The other thought that occurred to me is that I&rsquo;m getting close to calling in ActiveRecord and sqlite so I can start tracking history over a longer period of time than the 90 days or so of Web history I&rsquo;ve got Safari retaining. Some experimenting with Safari&rsquo;s history yesterday netted me a chart with overlapping &ldquo;total pages viewed by day&rdquo; lines for the past month and the month previous:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-gdscript3" data-lang="gdscript3"><span class="line"><span class="cl">\<span class="o">!</span>\<span class="p">[</span><span class="n">safari</span>\<span class="n">_views</span>\<span class="o">.</span><span class="n">png</span>\<span class="p">]</span>\<span class="p">(</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">mph</span>\<span class="o">.</span><span class="n">puddingbowl</span>\<span class="o">.</span><span class="n">org</span><span class="o">/</span><span class="n">wordpress</span><span class="o">/</span><span class="n">wp</span>\<span class="o">-</span><span class="n">content</span><span class="o">/</span><span class="n">uploads</span><span class="o">/</span><span class="mi">2009</span><span class="o">/</span><span class="mi">01</span><span class="o">/</span><span class="n">safari</span>\<span class="o">-</span><span class="n">views</span>\<span class="o">.</span><span class="n">png</span>\<span class="p">)</span></span></span></code></pre></div>
<p>The numbers aren&rsquo;t very good because I was using Firefox a lot up until starting vacation, when I started using Safari more, mostly because <a href="http://8-p.info/greasekit/">Greasekit</a> and <a href="http://blog.macromates.com/2006/textmate-tricks/">Edit in Textmate</a> cover most of the reason I&rsquo;d bother keeping Firefox around (Greasemonkey and <a href="https://addons.mozilla.org/firefox/addon/4125">It&rsquo;s All Text</a>).</p>
<p>Firefox is making some improvements in AppleScript (hence Ruby via rb-appscript) support, but it&rsquo;s still way off: Its broken AppleScript from FF 2.x was further broken for FF 3.x, it still doesn&rsquo;t support the <a href="http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/SysServices/SysServices.html">services menu</a>, and it looks like, to judge the bugs I&rsquo;m following, the services menu support is going to be held up for a while longer.</p>
<p>It&rsquo;d be nice to store everything somewhere I could use a better querying language.</p>
<p>Anyhow ... that&rsquo;s what there&rsquo;s time for today.  Part of my overall &ldquo;get right&rdquo; efforts lately involve a fixed, relatively early bedtime and a fixed, relatively early wakeup time. So my extracurricular scripting is something I do over morning coffee, once I&rsquo;ve got Ben ready for the day and before it&rsquo;s time to announce myself to the job buy signing in on IM.</p>
<p>#attention #netnewswire #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20More%20Feed%20Graphing%20With%20NNW%20and%20Ruby%2C%20The%20Distant%20Rumble%20of%20ActiveRecord">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Dumping Your Safari History With Ruby (Apple&#39;s Curious…</title>
      <link>https://mike.puddingtime.org/posts/2009-01-08-dumping-your-safari-history-with-ruby-apple-s/</link>
      <pubDate>Thu, 08 Jan 2009 02:40:10 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2009-01-08-dumping-your-safari-history-with-ruby-apple-s/</guid>
      
      <description>Dumping Your Safari History With Ruby (Apple&#39;s Curious Epoch)
This is sort of weird, but it turned out o.k. in the end:
Safari stores its history in ~/Library/Safari/History.plist. It keeps the lastVisitedDate of each entry in Apple’s CFAbsoluteTime format, which is a float, and which represents, …</description>
      <content:encoded><![CDATA[<p>Dumping Your Safari History With Ruby (Apple's Curious Epoch)</p>
<p>This is sort of weird, but it turned out o.k. in the end:</p>
<p>Safari stores its history in <code>~/Library/Safari/History.plist</code>. It keeps the lastVisitedDate of each entry in Apple&rsquo;s CFAbsoluteTime format, which is a float, and which represents, according to a message on carbon-dev, a count of seconds since midnight on January 1, 2001.</p>
<p>I don&rsquo;t know what the significance is of that date, and I don&rsquo;t know near enough about the traditional Unix epoch to know why it might or might not serve (insert tentative mumbling about the y2k38 problem from the guy who barely made it out of Algebra I in high school &hellip; Ed?  You always have something to say about this stuff) but at least it was easy to deal with once I knew what CFAbsoluteTime started counting at:</p>
<p>
<p>[sourcecode language=&lsquo;ruby&rsquo;]</p>
<p>!/usr/bin/ruby</p>
<p>require &ldquo;rubygems&rdquo;</p>
<p>require &ldquo;osx/plist&rdquo;</p>
<p>MacEpoch = Time.utc(2001,&ldquo;jan&rdquo;,1,0,0,0)</p>
<p>plist = &ldquo;/Users/mph/Library/Safari/History.plist&rdquo;</p>
<p>history = OSX::PropertyList.load(File.read(plist), format=&ldquo;false&rdquo;)</p>
<p>history[0][&ldquo;WebHistoryDates&rdquo;].each do |h|</p>
<pre><code> date =  MacEpoch + h[&quot;lastVisitedDate&quot;].to_f 

 puts &quot;{h[&quot;title&quot;]} --  {date}&quot;
</code></pre>
<p>end</p>
<p>[/sourcecode]</p>
</p>
<p>Another weird thing:  Using titles is o.k., but I&rsquo;d rather parse URLs so I can track the attention a domain is getting.  When <a href="http://github.com/kballard/osx-plist/tree/master">osx/plist</a> coughs up the hash with all the history stuff in it, the first key&ndash;the one with the url&ndash;is a null value.  I can get at it with h[&quot;&quot;], but it seems kind of off, and it seems to render  osx/plist unable to dump the history back out to XML for less clunky parsing.  A quick peek at the plist with plisteditor, though, and the key is, indeed, null.</p>
<p>So all that&rsquo;s the nub of a further exploration of <a href="http://mph.puddingbowl.org/2009/01/graphing-your-favorite-feeds-with-netnewswire-and-ruby/">what&rsquo;s getting my attentional resources</a>.</p>
<p>Attentional Followup</p>
<p>Yesterday I dropped a bunch of stuff from NetNewsWire, and it was a pleasure to wake up to an immensely less cluttered morning scan.  One thing all my poking around in the attentional numbers revealed was that I tend to read a lot of the stuff I&rsquo;d prefer to read the least. Dumping a few dozen feeds put the highest attentional score for any single feed to 81, where it had been 150 for the top feed prior to all the culling.  Most of the remaining feeds score well below 50.</p>
<p>It seemed a little counterintuitive to get rid of the things I read the most &ndash; they&rsquo;re surely what I&rsquo;m most interested in, right? &ndash; but after a little reflection I realized they&rsquo;re the things I&rsquo;m most eager to distract myself with, and there&rsquo;s a difference between those categories.</p>
<p>By way of further exploration, I think I&rsquo;m going to tweak my <a href="http://mph.puddingbowl.org/2009/01/graphing-your-favorite-feeds-with-netnewswire-and-ruby/">script</a> a little so it can take advantage of another NetNewsWire library feature, which is the &ldquo;scripted attention score&rdquo;:</p>
<blockquote>
<p>To affect the calculated attention score, you can change the scripted attention score. The scripted attention score is a component of the calculated attention score (it&rsquo;s added).</p>
</blockquote>
<p>I can organize feeds into categorized folders, add a scripted attention score value to each of the folders based on my &ldquo;real&rdquo; interest in a given category, and start using that to refine cull recommendations from time to time.</p>
<p>#attention #ruby #safari #solved</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Dumping%20Your%20Safari%20History%20With%20Ruby%20%28Apple%27s%20Curious%E2%80%A6">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Graphing Your Favorite Feeds with NetNewsWire and Ruby</title>
      <link>https://mike.puddingtime.org/posts/2009-01-07-graphing-your-favorite-feeds-with-netnewswire-and/</link>
      <pubDate>Wed, 07 Jan 2009 06:11:26 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2009-01-07-graphing-your-favorite-feeds-with-netnewswire-and/</guid>
      
      <description>After the election, my list of feeds in NetNewsWire became the source of some consternation. I&#39;m still not completely recovered from the &#34;must ... know&#34; paranoia that grips me, so I&#39;m loath to unsubscribe to the political stuff: What if the world starts to end? How will I know?
The holidays are …</description>
      <content:encoded><![CDATA[<p>After the election, my list of feeds in <a href="http://www.newsgator.com/Individuals/NetNewsWire/" title="Mac RSS Reader – News Reader for Apple - NetNewsWire by NewsGator">NetNewsWire</a> became the source of some consternation. I'm still not completely recovered from the "must ... know" paranoia that grips me, so I'm loath to unsubscribe to the political stuff: What if the world starts to end?  <i>How will I know?</i></p>
<p>The holidays are over, though, and it's time to quit indulging in a lot of distractions. So how to figure out what I ought to get rid of in my feed reader?  I don't always pay a lot of attention to what I'm reading the most, so I could end up dropping something that's more interesting to me than I realized.  And there's always the chance that there's something I don't really need to be following that I'm reading too much without realizing.</p>
<p>I thought about how much I like <a href="http://www.google.com/reader/">Google Reader's</a> attention tracking, which would help solve this sort of question pretty quickly.  NetNewsWire also tracks attention information, providing a way to sort feeds if you go to <code>View -> Sort Subscriptions By ...</code> and selecting "Attention."</p>
<p>At some point NetNewsWire started including the calculated attention score in its AppleScript dictionary.  The definition for it is:</p>
<blockquote>
<p>&ldquo;The calculated attention score for this subscription, based on clicks and actions (such as posting to weblog, posting to del.icio.us, etc.). For groups it is the average of the subscription inside the group.&rdquo;</p>
</blockquote>
<p>It was pretty easy to get a list of attention scores out of NNW using ruby and rb-appscript:</p>
<p>
<p>[sourcecode language=&lsquo;ruby&rsquo;]</p>
<p>!/usr/bin/ruby</p>
<p>require &lsquo;rubygems&rsquo;</p>
<p>require &lsquo;appscript&rsquo;</p>
<p>include Appscript</p>
<p>nnw = app(&ldquo;NetNewsWire&rdquo;)</p>
<p>subs = nnw.subscriptions.get</p>
<p>subs.reject!{|s| s.is_group.get != false}  get rid of folders</p>
<p>subs.sort!{ |a,b| b.calculated_attention_score.get &lt;=&gt; a.calculated_attention_score.get}</p>
<p>top = subs[0,25] get the top n subscriptions</p>
<p>subs.each do |s|</p>
<p>puts &ldquo;{s.display_name.get} - {s.calculated_attention_score.get}&rdquo;</p>
<p>end</p>
<p>[/sourcecode]</p>
</p>
<p>So there's my list, sorted by how much attention I'm giving each feed.</p>
<p>For the database project I'm working on over in Rails, it would be helpful to do some graphing so I used this little excursion as an excuse to test a few gems for that sort of thing.  Ultimately, I landed on <a href="http://scruffy.rubyforge.org/" title="Scruffy">scruffy</a>, which does all sorts of pretty things, but also just squirts out pie charts like some sort of Swanson's pot-pie factory.</p>
<p>Here's the scruffy-fied version of that script, limiting the results to the top 10 feeds in NNW:</p>
<p>
<pre><code>[sourcecode language='ruby']

!/usr/bin/ruby 

require 'rubygems'

require 'appscript'

require 'scruffy'

include Appscript

 Set up the graph

graph = Scruffy::Graph.new

graph.title = &quot;NNW Attention Scores&quot;

graph.renderer = Scruffy::Renderers::Pie.new

nnw = app(&quot;NetNewsWire&quot;)

subs = nnw.subscriptions.get

subs.reject!{|s| s.is_group.get != false}  get rid of folders

subs.sort!{ |a,b| b.calculated_attention_score.get &lt;=&gt; a.calculated_attention_score.get}

top = subs[0,9] get the top n subscriptions

scores = {}

top.each do |s| 

  name = s.display_name.get

  score = s.calculated_attention_score.get

  title = name + &quot; ({score})&quot;  get the attention score into the graph legend

  scores[title] = score

end

graph.add :pie, '', scores

graph.render  :to =&gt; &quot;nnw_attention.png&quot;,

              :as =&gt; 'png',

			

[/sourcecode]
</code></pre>
</p>
<p>Infolicious!</p>
<p>For the record, I think I'm going to mix deletions up with changing the update intervals. I can't believe the time I've wasted on MacWorld, and I think I can get more fiber from Talking Points Memo than I can Andrew Sullivan.  I'm torn about MacUpdate.  I rationalize keeping it around so I can stay current on security and bug fixes, but I have very few apps that don't utilize <a href="http://sparkle.andymatuschak.org/" title="Sparkle: a free software update framework for the Mac">Sparkle</a> or their own update framework, which means MacUpdate is more of a distracting parade of new crap I can futz with.</p>
<p>#attention #netnewswire #ruby</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Graphing%20Your%20Favorite%20Feeds%20with%20NetNewsWire%20and%20Ruby">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
  </channel>
</rss>
