Posted by: Preetam | March 1, 2007

RSS Reader – Revisited

I did some changes in RSS Reader code which I previously posted, now I have added hyperlink to the title of the link, in case I like it, I will click the link to get the page.

$z=@()
$f=”<a href=”
$g=”>”
$j=”</a>”
$para=”<p>”
$hrline=”<HR>”
$HTMLfile=new-item -type file “rssstuff.html” -force
Import-Csv rsslinks.csv | %{
$a=([xml](new-object net.webclient).downloadstring($_.links)).rss.channel.item | sort -desc | select -first 5
add-content $HTMLfile $_.topic
$A | %{

$z=$para+$f+$_.link+$g+$_.title+$J+$para
add-content $HTMLfile $z
}
add-content $HTMLfile $hrline
}

I have used CSV file, for playing around with title and topics of RSS’s xml file.

topic,links
India,http://www.rediff.com/rss/inrss.xml
US,http://www.rediff.com/rss/usrss.xml
NEWS,http://www.rediff.com/rss/newsrss.xml
International,http://www.rediff.com/rss/intnewsrss.xml
Get-Ahead,http://www.rediff.com/rss/getaheadrss.xml
Information You Can Use,http://www.rediff.com/rss/iycurss.xml
Business,http://www.rediff.com/rss/moneyrss.xml
Cricket,http://www.rediff.com/rss/cricketrss.xml
Sports,http://www.rediff.com/rss/sportsrss.xml
Movies,http://www.rediff.com/rss/moviesrss.xml
Interviews,http://www.rediff.com/rss/interviewsrss.xml

Now the output you get it here

RSS Reader - Revisited

With CSV function you can manipulate the headers. I’m thinking for creating SMTP object and passing this html file as attachment to it and schedule it for 24 hours.


Responses

  1. Howdy, I do believe your web site may be having browser
    compatibility problems. When I take a look at your website in Safari,
    it looks fine however, if opening in Internet Explorer, it’s got some overlapping issues. I simply wanted to give you a quick heads up! Apart from that, excellent website!

    • Thank you for a compliment. Really appreciate it. You may also visit my highly active blog http://vcp5.wordpress.com and provide your feedback


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: