<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: reader code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 07 Aug 2008 12:28:41 GMT</pubDate>
    <description>DZone Snippets: reader code</description>
    <item>
      <title>Digg/RSS Reader</title>
      <link>http://snippets.dzone.com/posts/show/1900</link>
      <description>Grabs the RSS-feed from digg.com and reads it out&lt;br /&gt;loud using festival.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;# Copyright (c) 2005 Davor Babic &lt;davorb@gmail.com&gt;&lt;br /&gt;# All rights reserved.&lt;br /&gt;# Usage of the works is permitted provided that this&lt;br /&gt;# instrument is retained with the works, so that any&lt;br /&gt;# entity that uses the works is notified of this&lt;br /&gt;# instrument.&lt;br /&gt;# DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.&lt;br /&gt;&lt;br /&gt;url="http://digg.com/rss/index.xml"&lt;br /&gt;&lt;br /&gt;echo "Parsing RSS..."&lt;br /&gt;curl --silent "$url" | grep -E '(title&gt;|description&gt;)' | \&lt;br /&gt;        sed -n '4,$p' | \&lt;br /&gt;	sed -e 's/&lt;title&gt;//' -e 's/&lt;\/title&gt;//' -e 's/&lt;description&gt;/  /' \&lt;br /&gt;	    -e 's/&lt;\/description&gt;//' | head -5 &gt; digg &lt;br /&gt;echo "Reading..."&lt;br /&gt;festival --tts digg&lt;br /&gt;rm -rf ./digg&lt;br /&gt;echo "Done."&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 12 Apr 2006 04:18:53 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1900</guid>
      <author>davor (Davor Babic)</author>
    </item>
  </channel>
</rss>
