Hi All
I've been looking through the codebase, seeing if it's possible to enable rss feeds for more things. I think it is going to be possible, but it's going to require refactoring of both CGI::Wiki::Plugin::RSS::ModWiki and OpenGuides::Feed to support it.
Currently, it's just possible to get feeds of the recent changes list (with filtering by username, and changing the number shown, but that's about it).
I'd like to extend the rss support so that we can have recent changes style RSS feeds of: * recent changes (as now) * all the versions of a node * search results And then something similar for locales and categories.
However, Earle is also planning some refactoring to this code. I believe he's planning to add Atom support (Earle - can you confirm).
Before I just go ahead and co-ordinate my changes with Earle, I thought I should check: * Is anyone else also planning refactoring of these modules? * Does anyone have thoughts / suggestions on my plans?
Cheers Nick
On Fri, May 12, 2006 at 09:32:48AM +0100, Nick Burch wrote:
I've been looking through the codebase, seeing if it's possible to enable rss feeds for more things. I think it is going to be possible, but it's going to require refactoring of both CGI::Wiki::Plugin::RSS::ModWiki and OpenGuides::Feed to support it.
Currently, it's just possible to get feeds of the recent changes list (with filtering by username, and changing the number shown, but that's about it).
I'd like to extend the rss support so that we can have recent changes style RSS feeds of:
- recent changes (as now)
- all the versions of a node
- search results
And then something similar for locales and categories.
However, Earle is also planning some refactoring to this code. I believe he's planning to add Atom support (Earle - can you confirm).
This is already present and I'm in the process of integrating both into Wiki::Toolkit. See changesets from last night. I'll prod you when they're ready (and I'll probably do another development release then too).
Before I just go ahead and co-ordinate my changes with Earle, I thought I should check:
- Is anyone else also planning refactoring of these modules?
- Does anyone have thoughts / suggestions on my plans?
I think you need to give us an idea of how you plan to refactor these first :)
Dominic.
On Fri, 12 May 2006, Dominic Hargreaves wrote:
This is already present and I'm in the process of integrating both into Wiki::Toolkit. See changesets from last night. I'll prod you when they're ready (and I'll probably do another development release then too).
Any chance they could be done by Thursday? :)
I think you need to give us an idea of how you plan to refactor these first :)
OK, first I should give an overview of how it currently works:
* wiki.cgi notices you want the recent changes * it spots you want format=rss, and calls guide->display_feed, requesting feed_type of rss and feed of recent_changes * display_feed in OpenGuides.pm largely delegates to OpenGuides::Feed It only supports rss (and doesn't pass that to OpenGuides::Feed), and only supports recent changes (and doesn't pass that to OpenGuides::Feed) * OpenGuides::Feed sets up the cgi::wiki instance, and calls CGI::Wiki::Plugin::RSS::ModWiki * CGI::Wiki::Plugin::RSS::ModWiki fetches the recent changes, and RSS formats it
So, my change would be to: * allow other kinds of feeds to be requested from wiki.cgi * have everything keep track of what sort of feed it is you want * have CGI::Wiki::Plugin::RSS::ModWiki be able to fetch different node lists, be they recent changes, node versions etc * have CGI::Wiki::Plugin::RSS::ModWiki format all these lists in much the same way as it now does
This will need to fit in with tracking what format of feed (rss, atom etc) is requested, and having different outputs possible
Nick
On Tue, May 16, 2006 at 03:36:30PM +0100, Nick Burch wrote:
On Fri, 12 May 2006, Dominic Hargreaves wrote:
This is already present and I'm in the process of integrating both into Wiki::Toolkit. See changesets from last night. I'll prod you when they're ready (and I'll probably do another development release then too).
Any chance they could be done by Thursday? :)
I did it last weekend actually in SVN and 0.69_03.
I think you need to give us an idea of how you plan to refactor these first :)
OK, first I should give an overview of how it currently works:
- wiki.cgi notices you want the recent changes
- it spots you want format=rss, and calls guide->display_feed, requesting feed_type of rss and feed of recent_changes
- display_feed in OpenGuides.pm largely delegates to OpenGuides::Feed It only supports rss (and doesn't pass that to OpenGuides::Feed), and only supports recent changes (and doesn't pass that to OpenGuides::Feed)
- OpenGuides::Feed sets up the cgi::wiki instance, and calls CGI::Wiki::Plugin::RSS::ModWiki
- CGI::Wiki::Plugin::RSS::ModWiki fetches the recent changes, and RSS formats it
True up to a point. OpenGuides::Feed now supports Atom too.
So, my change would be to:
- allow other kinds of feeds to be requested from wiki.cgi
Done for atom recentchanges.
- have everything keep track of what sort of feed it is you want
Where is this not the case currently?
- have CGI::Wiki::Plugin::RSS::ModWiki be able to fetch different node lists, be they recent changes, node versions etc
Okay, so this needs some generalisation.
- have CGI::Wiki::Plugin::RSS::ModWiki format all these lists in much the same way as it now does
This will need to fit in with tracking what format of feed (rss, atom etc) is requested, and having different outputs possible
What do you mean by different outputs?
Essentially it sounds like you need to add node filtering and search criteria passing to the feed output. Would that be a good summary?
Stay tuned for OpenGuides 0.54_01 with Wiki::Toolkit support.
Dominic.
On Tue, 16 May 2006, Dominic Hargreaves wrote:
I did it last weekend actually in SVN and 0.69_03.
Great :)
So, my change would be to:
- allow other kinds of feeds to be requested from wiki.cgi
Done for atom recentchanges.
Ah, by "kinds of feeds" I meant things like node versions, rather than atom!.
"allow different kinds of node list feeds"
- have everything keep track of what sort of feed it is you want
Where is this not the case currently?
Again with the confusion :)
Fairly soon along, it just starts assuming you want recent changes
Essentially it sounds like you need to add node filtering and search criteria passing to the feed output. Would that be a good summary?
Kinda. I need to pass a lot more context through into the plugin, and then generalise to support different sources of "lists of nodes" to go into the feed.
With that done, I can then get searching to be rss'd/atom'd :)
Nick
On Tue, May 16, 2006 at 06:48:36PM +0100, Nick Burch wrote:
Ah, by "kinds of feeds" I meant things like node versions, rather than atom!.
Right.
Fairly soon along, it just starts assuming you want recent changes
Essentially, though, we *do* always want recent changes for RSS, don't we? We just want to be able to filter the results by various means including a full-text search.
I'm just trying to clarify that we all thinking along the same lines.
Dominic.
On Tue, 16 May 2006, Dominic Hargreaves wrote:
Fairly soon along, it just starts assuming you want recent changes
Essentially, though, we *do* always want recent changes for RSS, don't we? We just want to be able to filter the results by various means including a full-text search.
No, not always. Sometimes we just want to use the RSS/RDF as a nice and standard way to get out other data
Nick
On Tue, May 16, 2006 at 09:07:52PM +0100, Nick Burch wrote:
No, not always. Sometimes we just want to use the RSS/RDF as a nice and standard way to get out other data
Whoa, wait a minute. RDF data per node is provided by a separate module, OpenGuides::RDF. You haven't said anything about wanting to change that up to now. As far as I can see they are two logically distinct features.
Dominic.
On Tue, 16 May 2006, Dominic Hargreaves wrote:
On Tue, May 16, 2006 at 09:07:52PM +0100, Nick Burch wrote:
No, not always. Sometimes we just want to use the RSS/RDF as a nice and standard way to get out other data
Whoa, wait a minute. RDF data per node is provided by a separate module, OpenGuides::RDF. You haven't said anything about wanting to change that up to now. As far as I can see they are two logically distinct features.
No, not the RDF on a single node.
I'm interested in other lists of nodes, being exported as RSS (well, RDF in RSS, as is it now). Same format as the recent changes list, just a different source of the list of nodes
Nick
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
openguides-dev@lists.openguides.org