<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>The Party Line</title>
    <link rel="alternate" type="text/html" href="http://blog.tobez.org/" />
    <link rel="self" type="application/atom+xml" href="http://blog.tobez.org/atom.xml" />
    <id>tag:blog.tobez.org,2010-01-06://3</id>
    <updated>2009-03-01T12:07:36Z</updated>
    <subtitle>tobez&apos;s personal weblog</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 5.01</generator>

<entry>
    <title>Backing up Google Reader subscriptions as OPML, periodically and automatically</title>
    <link rel="alternate" type="text/html" href="http://blog.tobez.org/2007/10/backing-up-google-reader-subscriptions-as-opml-periodically-and-automatically.html" />
    <id>tag:blog.tobez.org,2007://3.64</id>

    <published>2007-10-31T21:07:42Z</published>
    <updated>2009-03-01T12:07:36Z</updated>

    <summary>A fellow former Bloglines user has asked me whether I found a way to backup Google Reader subscriptions into an OPML file from cron, as we used to do with our Bloglines accounts. A quick search turned up this, which,...</summary>
    <author>
        <name>tobez</name>
        
    </author>
    
        <category term="FreeBSD" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Hints" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Perl" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.tobez.org/">
        <![CDATA[<p>A fellow former <a href="http://www.bloglines.com/">Bloglines</a> user has asked me whether
I found a way to backup <a href="http://reader.google.com/">Google Reader</a> subscriptions
into an <a href="http://en.wikipedia.org/wiki/OPML">OPML</a> file from <a href="http://www.freebsd.org/cgi/man.cgi?query=cron&amp;apropos=0&amp;sektion=8&amp;format=html">cron</a>, as we used to
do with our Bloglines accounts.</p>

<p>A quick search turned up <a href="http://googlesystem.blogspot.com/2007/08/blogroll-powered-by-google-reader.html">this</a>,
which,
from the look of it,
in order for it to work
requires every feed to be
explicitly marked with a tag which
is set up as public.</p>

<p>This by itself is rather cumbersome,
and you have to remember to do that for every new
feed you subscribe to,
otherwise you&#8217;ll defeat the purpose of making
periodic backups in the first place.</p>

<p>Luckily, there is a better solution.
There is a nice little module on <a href="http://www.cpan.org/">CPAN</a>,
<a href="http://search.cpan.org/~gray/WebService-Google-Reader/">WebService::Google::Reader</a> by <a href="http://search.cpan.org/~gray/">gray</a>,
which uses an unofficial <a href="http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI">Google Reader API</a>
to do various nifty things with your Google Reader
subscription,
<em>including</em> OPML export.</p>

<p>This means that after installing the module
you can simply put the following command
into your crontab (only command itself is shown,
see <a href="http://www.freebsd.org/cgi/man.cgi?query=crontab&amp;apropos=0&amp;sektion=5&amp;format=html">crontab(5) manual page</a> to find
out what else you will want to put in there):</p>

<pre><code>env GOOGLE_USERNAME=your-username-typically@gmail.com \
  GOOGLE_PASSWORD=your-user-password \
  perl -MWebService::Google::Reader -e \
  'print WebService::Google::Reader-&gt;new(
     username =&gt; $ENV{GOOGLE_USERNAME},
     password =&gt; $ENV{GOOGLE_PASSWORD})-&gt;opml' \
  &gt; /where/to/put/greader.opml
</code></pre>

<p>You will have to make the above to be one long line to satisfy
crontab syntax, and of course remember to use a real username,
password, and the path to the resulting OPML file.</p>

<p>Unfortunately, the most recent version
of the module (which is 0.03 at the time of this writing)
has a minor bug which prevents
the <code>opml()</code> method from working correctly.
So you will need to do a little patching.</p>

<p>Before installing the module,
edit the source file <code>lib/WebService/Google/Reader/Constants.pm</code>,
look for a string <code>subscribtions</code>,
and fix the spelling
(finding correct spelling is left as an exercise for the reader).
Then proceed installing the module as usual.</p>

<p>Hopefully, this step won&#8217;t be necessary in a couple of days&#8217; time
when a new version of the module is released.</p>

<p>If you are a <a href="http://www.freebsd.org/">FreeBSD</a> user like myself,
you may choose instead to
<a href="http://www.tobez.org/download/p5-WebService-Google-Reader-0.03.tgz">fetch a skeleton of the port of the module</a>.
Unpack it in <code>/usr/ports/www/</code>
and install it as you would any other port.</p>

<p>I intend to add the port to the ports collection as soon
as our <a href="http://www.freebsd.org/cgi/mid.cgi?id=20071030120901.GM45185%40droso.net&amp;db=mid">current ports freeze</a> is over.</p>

<p>Enjoy!</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Space launch RSS feed</title>
    <link rel="alternate" type="text/html" href="http://blog.tobez.org/2007/01/space-launch-rss-feed.html" />
    <id>tag:blog.tobez.org,2007://3.52</id>

    <published>2007-01-07T00:07:16Z</published>
    <updated>2009-03-01T12:07:14Z</updated>

    <summary> There is a nice list of space launches that covers all launches made since 2004. Unfortunately, that page does not have an RSS feed. Since about 90% of the Web I see comes through various RSS feeds nowadays, I...</summary>
    <author>
        <name>tobez</name>
        
    </author>
    
        <category term="Links" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.tobez.org/">
        <![CDATA[<p><img src="http://www.tobez.org/images/blog/spacelaunch.jpg" alt="Spacelaunch" /></p>

<p>There is a nice <a href="http://spaceflightnow.com/tracking/launchlog.html">list of space launches</a> that covers all launches made since 2004.</p>

<p>Unfortunately, that page does not have an RSS feed.  Since about 90% of the Web I see comes through various RSS feeds nowadays, I decided to give it a go and made a little scrapper that runs from cron and generates a custom feed.  You can try it at <a href="http://www.tobez.org/comic2rss/space-launches.rss">http://www.tobez.org/comic2rss/space-launches.rss</a>.  Enjoy.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Make Yahoo Weather respect metric units</title>
    <link rel="alternate" type="text/html" href="http://blog.tobez.org/2006/01/make-yahoo-weather-respect-metric-units.html" />
    <id>tag:blog.tobez.org,2006://3.48</id>

    <published>2006-01-05T21:35:20Z</published>
    <updated>2009-03-01T12:07:12Z</updated>

    <summary> Although Yahoo Weather has a metric mode, it is, unfortunately, incomplete. The textual forecast still uses things like &#8220;29F&#8221; and &#8220;15 to 25 mph&#8221;. Since this is not very useful for the rest of us, :-) I wrote a...</summary>
    <author>
        <name>tobez</name>
        
    </author>
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.tobez.org/">
        <![CDATA[<p><img src="http://www.tobez.org/images/blog/yahoo001.gif" alt="" /></p>

<p>Although Yahoo Weather has a metric mode, it is, unfortunately, incomplete.
The textual forecast still uses things like &#8220;29F&#8221; and &#8220;15 to 25 mph&#8221;.
Since this is not very useful for the rest of us, :-) I wrote a <a href="http://greasemonkey.mozdev.org/">Greasemonkey</a> <a href="http://www.tobez.org/download/greasemonkey/yahoo-weather-respect-metric.user.js">script</a> which fixes the problem.
It even tries to do something sensible when encountering things like &#8220;in the upper 30s&#8221;.</p>

<p>So &#8220;Low 29F. Winds E at 15 to 25 mph&#8221; gets converted into &#8220;Low -2C. Winds E at 24 to 40 kph&#8221;,
while &#8220;Temps nearly steady in the low 30s&#8221; becomes &#8220;Temps nearly steady around 0C&#8221;.</p>

<p>A reasonably good URL to test this script would be:
<a href="http://weather.yahoo.com/forecast/DAXX0009_c.html">http://weather.yahoo.com/forecast/DAXX0009_c.html</a>.</p>

<p>The latest version of the script can be found <a href="http://www.tobez.org/download/greasemonkey/#yahoo-weather-respect-metric">here</a>.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Extended del.icio.us bookmarklet</title>
    <link rel="alternate" type="text/html" href="http://blog.tobez.org/2005/11/extended-delicious-bookmarklet.html" />
    <id>tag:blog.tobez.org,2005://3.47</id>

    <published>2005-11-10T09:41:16Z</published>
    <updated>2009-03-01T12:07:12Z</updated>

    <summary> Dan Phiffer came up with a really neat Google/del.icio.us greasemonkey userscript idea: Use case: I search for &#8220;tuna sandwich&#8221; and Google brings up http://www.starkist.com/recipes/sandwiches/classictuna.html among a host of other tuna-related links. A Greasemonkey script pays attention to which link...</summary>
    <author>
        <name>tobez</name>
        
    </author>
    
        <category term="Hints" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.tobez.org/">
        <![CDATA[<p><img src="http://www.tobez.org/images/blog/delicious.42px.gif" alt="" /></p>

<p>Dan Phiffer <a href="http://mozdev.org/pipermail/greasemonkey/2005-November/006604.html">came up</a> with a really neat
<a href="http://www.google.com/">Google</a>/<a href="http://del.icio.us/">del.icio.us</a>
<a href="http://greasemonkey.mozdev.org/">greasemonkey</a> <a href="http://userscripts.org/">userscript</a> idea:</p>

<blockquote>
  <p>Use case: I search for &#8220;tuna sandwich&#8221; and Google brings up
  http://www.starkist.com/recipes/sandwiches/classictuna.html
  among a host of
  other tuna-related links. A Greasemonkey script pays attention to
  which link I click on and upon the click event, bookmarks this page
  with the tags &#8220;tuna&#8221; and &#8220;sandwich&#8221;.</p>
</blockquote>

<p>People agreed that it is neat, but then
Lenny Domnitser <a href="http://mozdev.org/pipermail/greasemonkey/2005-November/006613.html">replied</a> that the same could
be easily and more conveniently accomplished
with a simple modification of the
&#8220;Post to del.icio.us&#8221; bookmarklet:</p>

<pre><code>javascript:
var t,q=document.referrer.match(/q=([^&amp;]+)/);
if(q){t='&amp;tags='+q[1];}else{t=''}
location.href='http://del.icio.us/YOURDELICIOUS?url='+
encodeURIComponent(location.href)+'&amp;title='+
encodeURIComponent(document.title)+t;
</code></pre>

<p>Simply replace <code>YOURDELICIOUS</code> with your del.icio.us account name,
and make it one long line, then add it to your Firefox bookmarks.</p>

<p>Works like a charm, thanks, Lenny!</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Bloglines keyboard shortcuts fix</title>
    <link rel="alternate" type="text/html" href="http://blog.tobez.org/2005/10/bloglines-keyboard-shortcuts-fix.html" />
    <id>tag:blog.tobez.org,2005://3.45</id>

    <published>2005-10-15T15:31:44Z</published>
    <updated>2009-03-01T12:07:12Z</updated>

    <summary> Bloglines has recently introduced very nice keyboard shortcuts to jump around the feeds. Unfortunately, the &#8220;j&#8221; shortcut (&#8220;go to the next article&#8221;) is broken for larger font sizes. Hopefully, Bloglines team will fix this soon. Meanwhile, for your enjoyment,...</summary>
    <author>
        <name>tobez</name>
        
    </author>
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.tobez.org/">
        <![CDATA[<p><img src="http://www.tobez.org/images/blog/blogo225x50.gif" alt="" /></p>

<p><a href="http://www.bloglines.com/">Bloglines</a> has recently introduced very nice keyboard shortcuts to
jump around the feeds.  Unfortunately, the &#8220;<code>j</code>&#8221; shortcut (<em>&#8220;go to the
next article&#8221;</em>) is broken for larger font sizes.  Hopefully, Bloglines
team will fix this soon.  Meanwhile, for your enjoyment, this 
<a href="http://greasemonkey.mozdev.org/">Greasemonkey</a> script <a href="http://www.tobez.org/download/greasemonkey/bloglines-fix-j.user.js">does the job</a>.</p>
]]>
        

    </content>
</entry>

</feed>
