[OGDev] Refactoring CGI::Wiki::Plugin::RSS::ModWiki and OpenGuides::Feed
Nick Burch
openguides at gagravarr.org
Fri May 19 11:45:58 BST 2006
Hi All
An update on my (and Dom's progress):
> * wiki.cgi notices you want the recent changes
wiki.cgi now decides if you want rss or atom, and passes that in (as
feed_type). It now sets a feed_listing of "recent_changes", and passes
that in too.
> * display_feed in OpenGuides.pm largely delegates to OpenGuides::Feed
This ensures it's given a feed type, and a feed listing, before passing on
to OpenGuides::Feed
> * OpenGuides::Feed sets up the cgi::wiki instance, and calls
> CGI::Wiki::Plugin::RSS::ModWiki
This now checks that it is given a valid feed type and listing. Since it
only supports recent changes, it will then call the recent changes method
on the appropriate Wiki::Toolkit::Feed (be that RSS or Atom)
(It has the infrastructure for calling other feed methods on the
appropriate feed object, for the future)
> * CGI::Wiki::Plugin::RSS::ModWiki fetches the recent changes, and RSS
> formats it
This has now been replaced with Wiki::Toolkit::Feed::RSS and
Wiki::Toolkit::Feed::Atom.
These make use of Wiki::Toolkit::Feed::Listing, which handles fetching the
recently changed nodes in a common way (and the newest appropriate node,
for the feed timestamps).
Having used Wiki::Toolkit::Feed::Listing, they then provide a standard
method for producing a feed of a list of nodes (generate_node_list_feed).
In future, new kinds of lists of nodes can be added to ::Listing, and the
feeds can be configured to fetch with these. Also, other code can get
their own list of nodes (eg via a search), and just use the appropriate
feed module to format these into a feed (via a call to
generate_node_list_feed).
Nick
More information about the OpenGuides-Dev
mailing list