Complete.Org: Mailing Lists: Archives: webdev: July 2002:
[webdev] RSS
Home

[webdev] RSS

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: webdev@xxxxxxxxx
Subject: [webdev] RSS
From: Tom Hull <thull2@xxxxxxx>
Date: Sun, 14 Jul 2002 22:08:53 -0500
Reply-to: webdev@xxxxxxxxx

James Violette wrote:
> It looks like Dale has the RSS  headlines on the neuralmatrix aclug 
> website prototype. What would it take to implement that on the OpenACS 
> website prototype?

Good question. This started me digging, and approx. 2.5 hours later I
have something sort-of working locally. When I understand it better,
and give a little more thought to the user interface, I'll try to move
it up to aclug.notwerk.net.

Basically, this is what I did:

First thing, I searched for "rss aolserver" and found an openacs-based
website that has it working:

   http://www.deepskydesign.com/

This is run by a guy named Dave, who appears to be Dave Bauer, who has
released:

   http://www.thedesignexperience.org/rss-nsd.tar.gz

This package contains three files that drop into the tcl library. In
these files:

   rss_register_feed: specifies a url to get a feed from, stores the url
     in a nsv_set

   rss_grab_all_feeds: cycles through the nsv_set, grabs and parses all
     of the rss feeds. this function runs once on init, and refreshes
     every 60 minutes thereafter.

   rss_display_feed: formats grabbed rss info in an html table

This almost worked right out of the box, except that it depends on an
aolserver module nsxml.so that I don't have loaded. Download from:

   http://acs-misc.sourceforge.net/nsxml.html

This depends on -lxml2 and -lxslt, so I also needed to load them, then
build nsxml.so, install it in aolserver, edit nsd.tcl and add it to
the modules list. I also found a link to a more general file on xml
in aolserver:

   http://www.fifthgate.org/articles/aolserver/xml/ns_xml_doc.html

I also had to write up a test file. Right now this test file looks
like:

   ReturnHeaders

   set page [ad_header "RSS Demo"]

   array set feeds [nsv_array get rss_feeds]
   set feeds_list [array names feeds]
   foreach feed_url $feeds_list {
     append page "<h3>$feed_url</h3><p>\n"
     append page [rss_display_feed $feed_url 10 "100%"]
   }

   append page [ad_footer]
   ns_write $page

Like I said, this isn't all together yet, but it comes close. I need
to find some more interesting RSS feeds (presumably there is a registry
somewhere). Also figure out a user interface. I also think that the
feed list should be stored in the database rather than in a config
file. That also raises the question of whether we want to let users
specify a personal set of RSS feeds for their workspace page?

If anyone wants to give me some nominations for feed urls, please do.

-- 
/*
  *  Tom Hull * thull2 at cox.net * http://www.tomhull.com/
  */



[Prev in Thread] Current Thread [Next in Thread]