<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title>Paul Dix Explains Nothing</title>
    
    
    <link rel="alternate" type="text/html" href="http://www.pauldix.net/" />
    <id>tag:typepad.com,2003:weblog-108605</id>
    <updated>2009-12-30T16:14:39-05:00</updated>
    <subtitle>Entrepreneurship, programming, software development, politics, NYC, and random thoughts.</subtitle>
    <generator uri="http://www.typepad.com/">TypePad</generator>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/PaulDixExplainsNothing" /><feedburner:info uri="pauldixexplainsnothing" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
        <title>Parse Domains from URLs easily with Domainatrix</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PaulDixExplainsNothing/~3/ILoDYYMgIR8/parse-domains-from-urls-easily-with-domainatrix.html" />
        <link rel="replies" type="text/html" href="http://www.pauldix.net/2009/12/parse-domains-from-urls-easily-with-domainatrix.html" thr:count="5" thr:updated="2009-12-31T14:50:24-05:00" />
        <id>tag:typepad.com,2003:post-6a00d8341f4a0d53ef012876917e06970c</id>
        <published>2009-12-30T16:14:39-05:00</published>
        <updated>2010-01-08T15:07:33-05:00</updated>
        <summary>I've released another library just in time for the new year. The new library is called Domainatrix and she's used for parsing domain names, canonicalizing URLs, and a few other things. It uses the list of domain names from the...</summary>
        <author>
            <name>Paul Dix</name>
        </author>
        <category scheme="http://www.sixapart.com/ns/types#category" term="Ruby" />
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.pauldix.net/">&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;I've released another library just in time for the new year. The new library is called &lt;a href="http://github.com/pauldix/domainatrix"&gt;Domainatrix and she's used for parsing domain names, canonicalizing URLs&lt;/a&gt;, and a few other things. It uses the list of domain names from the &lt;a href="http://publicsuffix.org/"&gt;Public Suffix List&lt;/a&gt; to know what constitutes a subdomain, domain, and public suffix.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Usage couldn't be simpler.&lt;/p&gt;&#xD;
&lt;pre&gt;url = Domainatrix.parse("http://www.pauldix.net")&lt;br&gt;url.public_suffix  # =&amp;gt; "net"&lt;br&gt;url.domain # =&amp;gt; "pauldix"&lt;br&gt;url.canonical # =&amp;gt; "net.pauldix"&lt;br&gt;&lt;br&gt;url = Domainatrix.parse("http://foo.bar.pauldix.co.uk/asdf.html?q=arg")&lt;br&gt;url.public_suffix # =&amp;gt; "co.uk"&lt;br&gt;url.domain # =&amp;gt; "pauldix"&lt;br&gt;url.subdomain # =&amp;gt; "foo.bar"&lt;br&gt;url.path  # =&amp;gt; "/asdf.html?q=arg"&lt;br&gt;url.canonical # =&amp;gt; "uk.co.pauldix.bar.foo/asdf.html?q=arg"&lt;br&gt;&lt;/pre&gt;&#xD;
&lt;p&gt;It's simple, but I think quite useful. Enjoy!&lt;/p&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=ILoDYYMgIR8:EfA9xnPlqtI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=ILoDYYMgIR8:EfA9xnPlqtI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=ILoDYYMgIR8:EfA9xnPlqtI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=ILoDYYMgIR8:EfA9xnPlqtI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=ILoDYYMgIR8:EfA9xnPlqtI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulDixExplainsNothing/~4/ILoDYYMgIR8" height="1" width="1"/&gt;</content>


    <feedburner:origLink>http://www.pauldix.net/2009/12/parse-domains-from-urls-easily-with-domainatrix.html</feedburner:origLink></entry>
    <entry>
        <title>Resources for Synchronous Reads, Asynchronous Writes at RubyConf 2009</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PaulDixExplainsNothing/~3/DGpAGa2rdMg/resources-for-synchronous-reads-asynchronous-writes-at-rubyconf-2009.html" />
        <link rel="replies" type="text/html" href="http://www.pauldix.net/2009/11/resources-for-synchronous-reads-asynchronous-writes-at-rubyconf-2009.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-6a00d8341f4a0d53ef012875c3311e970c</id>
        <published>2009-11-21T16:56:19-05:00</published>
        <updated>2009-11-23T12:11:44-05:00</updated>
        <summary>Here are some links to articles and libraries that I mentioned in my talk at RubyConf 2009. RabbitMQ Sinatra Typhoeus, my Ruby library for performing parallel Ruby HTTP requests Great intro to RabbitMQ Bunny, a synchronous Ruby library for RabbitMQ...</summary>
        <author>
            <name>Paul Dix</name>
        </author>
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.pauldix.net/">
&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;Here are some links to articles and libraries that I mentioned in my talk at RubyConf 2009.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://rabbitmq.com/"&gt;RabbitMQ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sinatrarb.com/"&gt;Sinatra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/pauldix/typhoeus/"&gt;Typhoeus, my Ruby library for performing parallel Ruby HTTP requests&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/"&gt;Great intro to RabbitMQ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/celldee/bunny"&gt;Bunny, a synchronous Ruby library for RabbitMQ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/tmm/amqp"&gt;AMQP, an evented Ruby library for RabbitMQ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/brianmario/yajl-ruby"&gt;YAJL-Ruby, a superb streaming JSON parser written in Ruby and C&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.julianbrowne.com/article/viewer/brewers-cap-theorem"&gt;Good article on Brewer's CAP Theorem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.allthingsdistributed.com/2008/12/eventually_consistent.html"&gt;Vogels' article on Eventually Consistent&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here are links to images used during the talk.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/28479345@N06/2904198055/"&gt;NYC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/30546596@N00/2353299126/"&gt;Synchronized&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/79982766@N00/268917648/"&gt;lyubov_zhivotn_12&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/73874748@N00/525047172/"&gt;Feathery Friday is Having a Party&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://peepcode.com/system/uploads/2009/envycasts-activerecord-title.png"&gt;Jason Siefer and Greg Pollack of RailsEnvy from their Advanced Active Record Peepcode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/91351004@N00/452412873/"&gt;Highway Insomnia&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/19953384@N00/2650022174/"&gt;Boldly go where no man has gone before&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/28233229@N00/1407449118/"&gt;Terrified Sandwich&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/91294193@N00/165416063/"&gt;darma queen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sinatrarb.com/images/legend.gif"&gt;Sinatra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/91351004@N00/452412873/"&gt;Distance, Depth, Marble World&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/22229020@N07/2148857029/"&gt;Cathédrale espagnole&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/76203377@N00/1306629413/"&gt;Maneating Antenna'd Neotronic Terror Insect Simulator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/78415063@N00/3362517220/"&gt;Don't Stop!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/66757701@N00/2570656870/"&gt;Big Baby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/photos/8018349@N03/2441435170/"&gt;Otter Cry/Laugh - Tamar Otter and Wildlife Park, Devon&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, here are the slides with the images removed.&lt;/p&gt;
&lt;div style="width:425px;text-align:left" id="__ss_2566393"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/pauldix/synchronous-reads-asynchronous-writes-rubyconf-2009" title="Synchronous Reads Asynchronous Writes RubyConf 2009"&gt;Synchronous Reads Asynchronous Writes RubyConf 2009&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=synchronous-reads-asynchronous-writes-stripped-images-091123110648-phpapp02&amp;stripped_title=synchronous-reads-asynchronous-writes-rubyconf-2009" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=synchronous-reads-asynchronous-writes-stripped-images-091123110648-phpapp02&amp;stripped_title=synchronous-reads-asynchronous-writes-rubyconf-2009" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/pauldix"&gt;pauldix&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=DGpAGa2rdMg:AX5kHLiAKlM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=DGpAGa2rdMg:AX5kHLiAKlM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=DGpAGa2rdMg:AX5kHLiAKlM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=DGpAGa2rdMg:AX5kHLiAKlM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=DGpAGa2rdMg:AX5kHLiAKlM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulDixExplainsNothing/~4/DGpAGa2rdMg" height="1" width="1"/&gt;</content>


    <feedburner:origLink>http://www.pauldix.net/2009/11/resources-for-synchronous-reads-asynchronous-writes-at-rubyconf-2009.html</feedburner:origLink></entry>
    <entry>
        <title>Typhoeus, the best Ruby HTTP client just got better</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PaulDixExplainsNothing/~3/vgoUs9dLlAk/typhoeus-the-best-ruby-http-client-just-got-better.html" />
        <link rel="replies" type="text/html" href="http://www.pauldix.net/2009/10/typhoeus-the-best-ruby-http-client-just-got-better.html" thr:count="8" thr:updated="2010-01-27T03:18:27-05:00" />
        <id>tag:typepad.com,2003:post-6a00d8341f4a0d53ef0120a6340f31970b</id>
        <published>2009-10-29T12:29:29-04:00</published>
        <updated>2009-10-29T12:29:29-04:00</updated>
        <summary>I've been quietly working on Typhoeus for the last few months. With the help of Wilson Bilkovich and David Balatero I've finished what I think is a significant improvement to the library. The new interface removes all the magic and...</summary>
        <author>
            <name>Paul Dix</name>
        </author>
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.pauldix.net/">&lt;p&gt;I've been quietly working on Typhoeus for the last few months. With the help of &lt;a href="http://metaclass.org/"&gt;Wilson Bilkovich&lt;/a&gt; and &lt;a href="http://github.com/dbalatero"&gt;David Balatero&lt;/a&gt; I've finished what I think is a significant improvement to the library. The new interface removes all the magic and opts instead for clarity.&lt;/p&gt;&lt;p&gt;It's really slick and includes improved stubing support, caching, memoization, and (of course) parallelism. The &lt;a href="http://github.com/pauldix/typhoeus/"&gt;Typhoeus readme&lt;/a&gt; highlights all of the awesomeness. It should be noted that the old interface of including Typhoeus into classes and defining remote methods has been deprecated. I'll be removing that sometime in the next six months.&lt;/p&gt;&lt;p&gt;In addition to thanking everyone using the library and everyone contributing, I should also thank my employer kgbweb. If you're a solid Rubyist that likes parsing, crawling, and stuff, or a machine learning guy, or a Solr/Lucene/indexing bad ass, let me know. We need you and we're doing some crazy awesome stuff.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=vgoUs9dLlAk:g11LczuoG8k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=vgoUs9dLlAk:g11LczuoG8k:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=vgoUs9dLlAk:g11LczuoG8k:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=vgoUs9dLlAk:g11LczuoG8k:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=vgoUs9dLlAk:g11LczuoG8k:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulDixExplainsNothing/~4/vgoUs9dLlAk" height="1" width="1"/&gt;</content>


    <feedburner:origLink>http://www.pauldix.net/2009/10/typhoeus-the-best-ruby-http-client-just-got-better.html</feedburner:origLink></entry>
    <entry>
        <title>Bypassing wxWidgets error when building Erlang from Source on OS X</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PaulDixExplainsNothing/~3/nDlp2sOxi7A/bypassing-wxwidgets-error-when-building-erlang-from-source-on-os-x.html" />
        <link rel="replies" type="text/html" href="http://www.pauldix.net/2009/10/bypassing-wxwidgets-error-when-building-erlang-from-source-on-os-x.html" thr:count="0" />
        <id>tag:typepad.com,2003:post-6a00d8341f4a0d53ef0120a6779ff3970c</id>
        <published>2009-10-26T11:23:13-04:00</published>
        <updated>2009-10-26T11:23:13-04:00</updated>
        <summary>I had the following error when trying to build Erlang from source on OS X: make[3]: *** [i386-apple-darwin9.8.0/wxe_events.o] Error 1 make[2]: *** [opt] Error 2 make[1]: *** [opt] Error 2 make: *** [libs] Error 2 After a quick search I...</summary>
        <author>
            <name>Paul Dix</name>
        </author>
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.pauldix.net/">&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;I had the following error when trying to build Erlang from source on OS X:&lt;/p&gt;&#xD;
&#xD;
&lt;pre&gt;&#xD;
make[3]: *** [i386-apple-darwin9.8.0/wxe_events.o] Error 1&#xD;
make[2]: *** [opt] Error 2&#xD;
make[1]: *** [opt] Error 2&#xD;
make: *** [libs] Error 2&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;After a quick search I uncovered this &lt;a href="http://www.nabble.com/OS-X-10.5-build-without-WxWidgets-td25687201.html"&gt;post about building without wxWidgets support&lt;/a&gt; (which is fine by me for running RabbitMQ Server.) So putting it all together, building and installing Erlang looks like this:&lt;/p&gt;&#xD;
&lt;pre&gt;&#xD;
# in the erlang source directory&#xD;
./configure&#xD;
touch lib/wx/SKIP&#xD;
make&#xD;
sudo make install&#xD;
&lt;/pre&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=nDlp2sOxi7A:RY7TmYqjFqk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=nDlp2sOxi7A:RY7TmYqjFqk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=nDlp2sOxi7A:RY7TmYqjFqk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=nDlp2sOxi7A:RY7TmYqjFqk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=nDlp2sOxi7A:RY7TmYqjFqk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulDixExplainsNothing/~4/nDlp2sOxi7A" height="1" width="1"/&gt;</content>


    <feedburner:origLink>http://www.pauldix.net/2009/10/bypassing-wxwidgets-error-when-building-erlang-from-source-on-os-x.html</feedburner:origLink></entry>
    <entry>
        <title>Detect and Parse Atom and RSS Feed URLs from HTML with TruffleHog</title>
        <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/PaulDixExplainsNothing/~3/PQEEAfhlnGo/detect-and-parse-atom-and-rss-feed-urls-from-html-with-trufflehog.html" />
        <link rel="replies" type="text/html" href="http://www.pauldix.net/2009/10/detect-and-parse-atom-and-rss-feed-urls-from-html-with-trufflehog.html" thr:count="5" thr:updated="2010-02-25T00:41:39-05:00" />
        <id>tag:typepad.com,2003:post-6a00d8341f4a0d53ef0120a617bfb3970b</id>
        <published>2009-10-23T11:55:31-04:00</published>
        <updated>2009-10-23T11:55:31-04:00</updated>
        <summary>TruffleHog is a small library I wrote for detecting and parsing Atom and RSS feeds in a web page. I'm sure there are other libraries out there, but I couldn't find one easily. I found Cory Forsyth's FeedDetector, but there...</summary>
        <author>
            <name>Paul Dix</name>
        </author>
        
        
<content type="html" xml:lang="en-US" xml:base="http://www.pauldix.net/">&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;&lt;a href="http://github.com/pauldix/truffle-hog"&gt;TruffleHog is a small library I wrote for detecting and parsing Atom and RSS feeds in a web page&lt;/a&gt;. I'm sure there are other libraries out there, but I couldn't find one easily. I found &lt;a href="http://github.com/bantic/feeddetector"&gt;Cory Forsyth's FeedDetector&lt;/a&gt;, but there were some cases that it didn't handle.&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;Anyway, here is everything you need to get running.&lt;/p&gt;&#xD;
&lt;pre&gt;gem install truffle-hog --source http://gemcutter.org&lt;br&gt;&lt;br&gt;# and then in teh rubys&lt;br&gt;require 'rubygems'&lt;br&gt;require 'truffle-hog'&lt;br&gt;&lt;br&gt;# get atom and rss&lt;br&gt;feed_urls = TruffleHog.parse_feed_urls(some_html)&lt;br&gt;&lt;br&gt;# get atom if available, otherwise rss&lt;br&gt;feed_urls = TruffleHog.parse_feed_urls(some_html, :atom)&lt;br&gt;&lt;br&gt;# get rss if available, otherwise atom&lt;br&gt;feed_urls = TruffleHog.parse_feed_urls(some_html, :rss)&lt;br&gt;&lt;/pre&gt;&#xD;
&lt;p&gt;Behind the scenes it's grabbing the urls through a regex. Really just a few lines of code. I may update it with some fancy Nokogiri parsing and some other stuff, but for now it's just a simple way to parse out feed urls.&lt;/p&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=PQEEAfhlnGo:aGEAXuenQGI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=PQEEAfhlnGo:aGEAXuenQGI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=PQEEAfhlnGo:aGEAXuenQGI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?a=PQEEAfhlnGo:aGEAXuenQGI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/PaulDixExplainsNothing?i=PQEEAfhlnGo:aGEAXuenQGI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulDixExplainsNothing/~4/PQEEAfhlnGo" height="1" width="1"/&gt;</content>


    <feedburner:origLink>http://www.pauldix.net/2009/10/detect-and-parse-atom-and-rss-feed-urls-from-html-with-trufflehog.html</feedburner:origLink></entry>
 
</feed><!-- ph=1 --><!-- nhm:dynamic-ssi -->
