<?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>Linux For All &#187; linux breaking news ticker</title>
	<atom:link href="http://www.linux4all.in/tag/linux-breaking-news-ticker/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linux4all.in</link>
	<description>Making Linux Usable For All From Newbies To Techies</description>
	<lastBuildDate>Wed, 15 Dec 2010 05:34:15 +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>Breaking News Alert On Your Linux Machine</title>
		<link>http://www.linux4all.in/2008/12/05/create-a-breaking-news-alert-ticker-on-linux/</link>
		<comments>http://www.linux4all.in/2008/12/05/create-a-breaking-news-alert-ticker-on-linux/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 15:26:20 +0000</pubDate>
		<dc:creator>Kunal Gautam</dc:creator>
				<category><![CDATA[Featured Post]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Alert]]></category>
		<category><![CDATA[breaking news alert box on your linux machine]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux breaking news ticker]]></category>
		<category><![CDATA[linux news ticker]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://linux.tech-nologic.info/?p=66</guid>
		<description><![CDATA[A shell script for Breaking news alert on Linux Box]]></description>
			<content:encoded><![CDATA[<p>For the past few days, I&#8217;ve been disconnected from T.V. and I couldn&#8217;t keep up with the buzz around. Visiting web portals frequently for updates didn&#8217;t seem feasible either. The tickers provided by many web portals could&#8217;ve been used, but, unfortunately almost all of them are incompatible with Linux, the beautiful OS.This was the very reason behind me venturing out to code a <strong>Breaking News Alert for Linux Machines.</strong> And, proudly, I was successful in that.<em> According to the theory that states, &#8220;anything good and useful is to be shared&#8221;, here, I share the source code and instructions to create a <strong>custom Breaking News Alert </strong></em><em><strong>for your Linux Machine/</strong></em><em><strong>Linux News Ticker </strong></em></p>
<p><strong> </strong><br />
<span id="more-66"></span></p>
<h2>Source Code</h2>
<p>In the sample code below, I&#8217;ve used  <a title="Daily News &amp; Analysis" href="http://www.dnaindia.com/" target="_blank">DNAIndia</a> <a title="DNA Latest News Feed" href="http://www.dnaindia.com/syndication/rss,catid-0.xml" target="_blank">Latest News Feed<br />
</a><strong>Here is the code for GNOME Desktop Environment</strong><br />
Download it From <a href="http://linux.tech-nologic.info/wp-content/uploads/2008/12/gnome.sh">Here</a> in a textt File</p>
<blockquote><p>#!/bin/bash<br />
mkdir -p /tmp/dnadata<br />
cd /tmp/dnadata<br />
rm -rf news-latest*<br />
wget http://www.dnaindia.com/services/rss/news-latest.xml<br />
if [[ "$(echo  $(md5sum news-latest.xml | sed -e 's:news-latest.xml::g'))" == "$(echo  $(md5sum check.xml | sed -e 's:check.xml::g'))" ]]<br />
then<br />
echo &#8220;same news&#8221;</p>
<p>else</p>
<p>cat news-latest.xml | grep &#8220;pubDate&#8221; | sed -e &#8216;s:&lt;pubDate&gt;::g&#8217; | sed -e &#8216;s:&lt;/pubDate&gt;::g&#8217; | head -n 3 | tail -n 1 &gt; 1<br />
cat news-latest.xml | grep &#8220;title&#8221; | sed -e &#8216;s:&lt;title&gt;::g&#8217; | sed -e &#8216;s:&lt;/title&gt;::g&#8217; | head -n 3 | tail -n 1 &gt; 2<br />
cat news-latest.xml | grep &#8220;description&#8221; | sed -e &#8216;s:&lt;description&gt;::g&#8217; | sed -e &#8216;s:&lt;/description&gt;::g&#8217; | head -n 3 | tail -n 1 &gt; 3<br />
zenity &#8211;display :0 &#8211;title=&#8221;$(echo $(cat 2))&#8221; &#8211;info &#8211;text=&#8221;$(echo $(cat 3)) n n n n News as on $(echo $(cat 1))&#8221;<br />
fi<br />
cat news-latest.xml &gt; check.xml</p></blockquote>
<p><strong>Here Is Coding For KDE</strong></p>
<p>Download it From <a href="http://linux.tech-nologic.info/wp-content/uploads/2008/12/kde.sh">Here</a> in a text File</p>
<blockquote><p>#!/bin/bash<br />
mkdir -p /tmp/dnadata<br />
cd /tmp/dnadata<br />
rm -rf news-latest*<br />
wget http://www.dnaindia.com/services/rss/news-latest.xml<br />
if [[ "$(echo  $(md5sum news-latest.xml | sed -e 's:news-latest.xml::g'))" == "$(echo  $(md5sum check.xml | sed -e 's:check.xml::g'))" ]]<br />
then<br />
echo &#8220;same news&#8221;</p>
<p>else<br />
cat news-latest.xml | grep &#8220;pubDate&#8221; | sed -e &#8216;s:&lt;pubDate&gt;::g&#8217; | sed -e &#8216;s:&lt;/pubDate&gt;::g&#8217; | head -n 3 | tail -n 1 &gt; 1<br />
cat news-latest.xml | grep &#8220;title&#8221; | sed -e &#8216;s:&lt;title&gt;::g&#8217; | sed -e &#8216;s:&lt;/title&gt;::g&#8217; | head -n 3 | tail -n 1 &gt; 2<br />
cat news-latest.xml | grep &#8220;description&#8221; | sed -e &#8216;s:&lt;description&gt;::g&#8217; | sed -e &#8216;s:&lt;/description&gt;::g&#8217; | head -n 3 | tail -n 1 &gt; 3<br />
kdialog &#8211;display :0 &#8211;title=&#8221;$(echo $(cat 2))&#8221; &#8211;msgbox=&#8221;$(echo $(cat 3)) n n n n News as on $(echo $(cat 1))&#8221;<br />
fi<br />
cat news-latest.xml &gt; check.xml</p></blockquote>
<p>___<br />
<em>Please Note : As My Linux Box Is out of Disk Space . I&#8217;m Unable to check the KDE Script . But I hope it will run Fine . If any one can Confirm please Drop a Comment</em><br />
___</p>
<ul>
<li><strong>Save the Above Script in a File and add it to cron job</strong></li>
</ul>
<p>To add a cron job use following command<br />
<em>[You need to know VI or VIM for this]</em></p>
<blockquote><p>crontab -eu username</p></blockquote>
<p>replace username with your desired username<br />
and add following entry [ which will check every one minute ]</p>
<blockquote><p>*/1 * * * * /bin/bash   /path/to/the/file/script &amp;&gt; /dev/null</p></blockquote>
<p><em><strong>The above command is set to execute every minute.</strong></em></p>
<p>Here is Screen Shot of The Script</p>
<div id="attachment_103" class="wp-caption alignnone" style="width: 430px"><img class="size-full wp-image-103" title="breaking_news" src="http://linux.tech-nologic.info/wp-content/uploads/2008/12/breaking_news.jpeg" alt="breaking_news" width="420" height="234" /><p class="wp-caption-text">Breaking News Aleart ScreenShot </p></div>
<h2>Short Description about the Script</h2>
<p>This script downloads the specified RSS feed and checks against any old versions of the same. If a change is observed , the script extracts the relevant information from the feed and sends the output to different files. These are then displayed using the ALERT command.<br />
<em>PS. This script needs an active Internet connection for its successful execution. (Duh!!)</em></p>
<p>You can use any other news feed for your <strong>Breaking News Alert Box/Live News Ticker on your Linux Machine</strong>. If you&#8217;re stuck with that or need help/guidance with regard to the code, kindly drop a comment with your original email, so that I could personally respond to you.</p>
<p style="text-align: right;">Special Thanks To <a title="Only Fresh Thoughts and Insights blogged." href="http://aravindjose.com/blog/" target="_blank">Aravind Jose T.</a> for helping me to pep-up this post !!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux4all.in/2008/12/05/create-a-breaking-news-alert-ticker-on-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
