rssreader

Overview

rssreader provides RSS aggregation functions: it supports RSS 2.0 (but does not support atom). The RSS entries are held in the internal Mnesia table.

Configuration

The rssreader component does not provide any configuration functionality.

API

During the system start the component will create (if needed) three additional Mnesia tables: rss_list, rss_detail and contentmeta.

The following API is provided (all functions are exported from the rssreader module):

Moreover, together with rssreader module, this components is shipped with two wparts:

Example

The most common usage of this module is as follows (we assume the e_component has started without an error):

   1 %% add an RSS feed, for example the XKCD one:
   2 1> rssreader:add_rss("http://xkcd.com/rss.xml").
   3 "Added RSS Item: Packages"
   4 "Added RSS Item: The Race: Part 1"
   5 "Added RSS Item: The Race: Part 2"
   6 "Added RSS Item: The Race: Part 3"
   7 ok
   8 %% we read the records
   9 2> rr(rssreader).
  10 [contentmeta,rss_detail,rss_list,xmerl_event,
  11  xmerl_fun_states,xmerl_scanner,xmlAttribute,xmlComment,
  12  xmlContext,xmlDecl,xmlDocument,xmlElement,xmlNamespace,
  13  xmlNode,xmlNsNode,xmlObj,xmlPI,xmlText]
  14 %% get all subscribed channels
  15 3> rssreader:get_all_rss_list().
  16 [#rss_list{url = "http://xkcd.com/rss.xml",
  17            name = "xkcd.com"}]

Now we can use two wpart tags in our views to display the saved RSS entries and manage them.

Ecomponents/rssreader (last edited 2009-05-06 09:45:44 by Michal Ptaszek)