<?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Jacken&#039;s Blog &#187; ruby</title> <atom:link href="http://www.jackenhack.com/archives/tag/ruby/feed/" rel="self" type="application/rss+xml" /><link>http://www.jackenhack.com</link> <description></description> <lastBuildDate>Tue, 07 Feb 2012 05:59:39 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Download all files in RSS feed using Ruby</title><link>http://www.jackenhack.com/archives/2009/04/24/download-all-files-in-rss-feed-using-ruby/</link> <comments>http://www.jackenhack.com/archives/2009/04/24/download-all-files-in-rss-feed-using-ruby/#comments</comments> <pubDate>Fri, 24 Apr 2009 17:26:33 +0000</pubDate> <dc:creator>Jacken</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[ruby]]></category><guid isPermaLink="false">http://www.jackenhack.com/blog/archives/2009/04/24/download-all-files-in-rss-feed-using-ruby/</guid> <description><![CDATA[I&#8217;m working on learning Ruby on Rails and one great resource that I find myself going to is RailsCast. But as I really need to learn Ruby I wanted to write a quick program to download all the episodes to &#8230; <a href="http://www.jackenhack.com/archives/2009/04/24/download-all-files-in-rss-feed-using-ruby/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I&#8217;m working on learning Ruby on Rails and one great resource that I find myself going to is <a title="RailsCast Ruby on Rails" href="http://railscasts.com">RailsCast</a>. But as I really need to learn Ruby I wanted to write a quick program to download all the episodes to my harddisk and watch them using <a title="Plex Media Center for Macintosh" href="http://plexapp.com/">Plex Media Center</a>. There&#8217;s probably a million different utilities (or podcast managers) that can do that, but using them I won&#8217;t learn to program Ruby that way. There&#8217;s probably a better way of doing this, but hey, do it and post a comment. [cc lang="ruby"] require &#8216;rubygems&#8217; require &#8216;hpricot&#8217; require &#8216;open-uri&#8217;</p><p>doc = Hpricot.XML(open(&#8220;http://feeds.feedburner.com/railscasts&#8221;))</p><p>(doc/&#8221;enclosure&#8221;).each do |para| filename = File.basename(para[:url]) puts &#8220;== Found a file #{filename}&#8221; open(filename,&#8221;w&#8221;).write(open(para[:url]).read) end [/cc]</p><div id="tweetbutton881" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fbit.ly%2FuyMl5j&amp;via=jackenhack&amp;text=Download%20all%20files%20in%20RSS%20feed%20using%20Ruby&amp;related=jackenhack&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Fwww.jackenhack.com%2Farchives%2F2009%2F04%2F24%2Fdownload-all-files-in-rss-feed-using-ruby%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.jackenhack.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded> <wfw:commentRss>http://www.jackenhack.com/archives/2009/04/24/download-all-files-in-rss-feed-using-ruby/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Yes, please apple, kill AppleScript</title><link>http://www.jackenhack.com/archives/2008/06/04/yes-please-apple-kill-applescript/</link> <comments>http://www.jackenhack.com/archives/2008/06/04/yes-please-apple-kill-applescript/#comments</comments> <pubDate>Tue, 03 Jun 2008 22:45:27 +0000</pubDate> <dc:creator>Jacken</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[apple]]></category> <category><![CDATA[applescript]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[python]]></category> <category><![CDATA[ruby]]></category><guid isPermaLink="false">http://www.jackenhack.com/blog/?p=737</guid> <description><![CDATA[Everytime (well, last night actually) when I need to do something with Applescript I shudder with horror. The syntax is actually something you forget all the time. There must be better alternatives for Apple to use as a scripting language. &#8230; <a href="http://www.jackenhack.com/archives/2008/06/04/yes-please-apple-kill-applescript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Everytime (well, last night actually) when I need to do something with Applescript I shudder with horror. The syntax is actually something you forget all the time. There must be better alternatives for Apple to use as a scripting language. <a href="http://www.red-sweater.com/502/apples-script">I agree with this article</a>, but Python or Ruby would be a better alternative I think.</p><div id="tweetbutton737" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fbit.ly%2Fvw8aKh&amp;via=jackenhack&amp;text=Yes%2C%20please%20apple%2C%20kill%20AppleScript&amp;related=jackenhack&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Fwww.jackenhack.com%2Farchives%2F2008%2F06%2F04%2Fyes-please-apple-kill-applescript%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.jackenhack.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded> <wfw:commentRss>http://www.jackenhack.com/archives/2008/06/04/yes-please-apple-kill-applescript/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: www.jackenhack.com @ 2012-02-07 11:13:06 by W3 Total Cache -->
