<?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/safari/</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>Sun, 06 Nov 2011 14:56:31 +0000</lastBuildDate>
    <atom:link href="https://mike.puddingtime.org/tags/safari/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Put the current Chrome URL in your Safari reading list</title>
      <link>https://mike.puddingtime.org/posts/2011-11-06-put-the-current-chrome-url-in-your-safari-reading/</link>
      <pubDate>Sun, 06 Nov 2011 14:56:31 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2011-11-06-put-the-current-chrome-url-in-your-safari-reading/</guid>
      
      <description>... or “Hey, dawg, we heard you like Safari so we put your Chrome in your Safari so you can Safari when you’re done Chroming!”
&lt;div class=&#34;thumbnail&#34; style=&#34;float:right;margin:0 1em;border:1px solid ccc;&#34;&gt;&lt;a href=&#34;https://skitch\.com/michaelhall/ggmt3/safari\-service\-menu&#34;&gt;&lt;/a&gt;&lt;/div&gt; I tend to do …</description>
      <content:encoded><![CDATA[<p><em>... or &ldquo;Hey, dawg, we heard you like Safari so we put your Chrome in your Safari so you can Safari when you&rsquo;re done Chroming!&rdquo;</em></p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;div class=&#34;thumbnail&#34; style=&#34;float:right;margin:0 1em;border:1px solid ccc;&#34;&gt;&lt;a href=&#34;https://skitch\.com/michaelhall/ggmt3/safari\-service\-menu&#34;&gt;&lt;/a&gt;&lt;/div&gt;</span></span></code></pre></div>
<p>I tend to do desktop surfing with Google Chrome because I do a lot of &ldquo;open 10 tabs at the same time&rdquo; stuff on our Drupal multi-site and Safari&rsquo;s not very good at that. Sometimes, when it&rsquo;s time to head downstairs for lunch or by the fireplace for some iPad surfing, I find myself wanting to take a few things I had open in Chrome with me on the iPad. I used to use Pinboard, but Safari&rsquo;s new reading list is more convenient and doesn&rsquo;t clutter up Pinboard with short-lived links, so it&rsquo;s cool that there&rsquo;s an AppleScript command to add things to it:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;script src=&#34;https://gist\.github\.com/1342437\.js?file=save\_chrome\_url\.rb&#34;&gt;&lt;/script&gt;</span></span></code></pre></div>
<p>And here&rsquo;s one that does the same thing with the selected NetNewsWire headline:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;script src=&#34;https://gist\.github\.com/1342551\.js?file=add\_nnw\_to\_safari\_reading\_list\.rb&#34;&gt;&lt;/script&gt;</span></span></code></pre></div>
<p>Hook them up to the actual apps to taste.</p>
<p>I made the mistake of writing a quick Automator workflow that created a Service Menu item to do the same thing with any selected URL in any app, but when I went to try out my new service I noticed Apple had already thought of that. Easier to go into System Preferences and create a shortcut for it.</p>
<p>If you don&rsquo;t mind the extra keystrokes, you could also just ⌘l then ⌘c to get Chrome&rsquo;s current URL and use the service, no need for AppleScript at all, but I wrote it all before I realized Apple had done it for me.</p>
<p>What about Firefox?</p>
<p>No real scripting support because Firefox is lame like that and always has been. You can get the current Firefox URL by using AppleScript to press ⌘l then ⌘c:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">&lt;script src=&#34;https://gist\.github\.com/1342557\.js?file=get\_firefox\_url\.rb&#34;&gt;&lt;/script&gt;</span></span></code></pre></div>
<p>Yuck.</p>
<p>#chrome #icloud #ruby #safari</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Put%20the%20current%20Chrome%20URL%20in%20your%20Safari%20reading%20list">Drop a line about this</a>.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Chrome Beating Safari: Apple Begs &#34;Please Don&#39;t Throw…</title>
      <link>https://mike.puddingtime.org/posts/2010-05-05-chrome-beating-safari-apple-begs-please-don-t/</link>
      <pubDate>Wed, 05 May 2010 06:20:19 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2010-05-05-chrome-beating-safari-apple-begs-please-don-t/</guid>
      
      <description>Chrome Beating Safari: Apple Begs &#34;Please Don&#39;t Throw Me in the Briar Patch&#34;
Google Chrome Market Share Surges, Apple’s Safari Dead In Water, Microsoft’s IE Drowning:
The more important story here is potentially that Google&#39;s Chrome is gaining share much faster than Apple&#39;s Safari. This highlights …</description>
      <content:encoded><![CDATA[<p>Chrome Beating Safari: Apple Begs &quot;Please Don't Throw Me in the Briar Patch&quot;</p>
<p><a href="http://www.businessinsider.com/google-chrome-market-share-2010-5">Google Chrome Market Share Surges, Apple&rsquo;s Safari Dead In Water, Microsoft&rsquo;s IE Drowning</a>:</p>
<blockquote>The more important story here is potentially that Google's Chrome is gaining share much faster than Apple's Safari.  This highlights the power of Google's 'open source' software model, as compared to Apple's integrated hardware-software combo.  The software versus hardware/software model, of course, is what doomed Apple in its first battle to the near-death (against Microsoft).  So it's worth watching this one closely.</blockquote>
<p>I&rsquo;m going to return to my point from <a href="http://mph.puddingbowl.org/2010/04/pick-your-open/">a couple of days ago</a> instead of savaging the excerpt.</p>
<p>Chrome&rsquo;s rendering engine is <a href="http://en.wikipedia.org/wiki/WebKit">WebKit</a>. That&rsquo;s an Apple project. Apple took <a href="http://en.wikipedia.org/wiki/KHTML">KHTML</a>, spruced it up (such that I know of one Linux site where Konqueror breaks but Konqueror-using-Webkit works), and made it open source. Google liked what it saw and borrowed it for Chrome.</p>
<p>If the author of that excerpt were to be confronted with this fact, he or she might backpedal by pointing out that Apple is a tiny bit open but Google is super-open, and the uptake numbers reflect that. Such backpedaling would require additional politeness on our part, because that&rsquo;s entirely not the point. The point is this:</p>
<p>It isn&rsquo;t a bad thing for Apple that Chrome is doing well using WebKit.  In fact, it&rsquo;s a really, really good thing: Apple can continue to serve its customers as it sees fit, Google can continue to serve its customers as it sees fit, and neither has to pay a price for the other&rsquo;s popularity in terms of the way its customers experience the Web. Both get an outstanding, standards-compliant rendering engine that runs on every major desktop platform, is amenable to being wrapped in a wide variety of toolkits, user agents and form-factors, and helps ensure that we won&rsquo;t ever have to worry about a single vendor trying to lock the Web up with a bunch of proprietary, non-standard extensions and quirks. Chrome&rsquo;s gain is every Safari user&rsquo;s gain and vice versa.</p>
<p>If we want to talk about what in this story is worth watching closely, it&rsquo;ll be in the ways Apple and Google interact around the WebKit project, and how two companies that are on a collision course in a couple of different spheres (besides the heavily commoditized browser market) manage to relate to each other in a case where they share a mutual interest. Might as well include Adobe in the companies to watch despite bitter disagreements: It uses WebKit to render HTML in Air.</p>
<p>#apple #chrome #google #safari #web standards</p>
<p><em><a href="mailto:mike@puddingtime.org?subject=Re%3A%20Chrome%20Beating%20Safari%3A%20Apple%20Begs%20%22Please%20Don%27t%20Throw%E2%80%A6">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>
  </channel>
</rss>
