ZWiki RecentChanges as RSS feed
I've got a Zwiki instance that works just fine. If I visit it at http://localhost:8080/wiki/RecentChanges?action=rss_rc I get a nice feed of all the recent changes. But I don't want to reach it by URL, I want to reach it programmatically. How do I do that?? "return self.wiki.RecentChanges()" gives an AttributeError. I've looked throught the sources but there's too much DTML magic and other getSkinTemplate() magic. Thanks, Peter -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
Hi Peter,
I've got a Zwiki instance that works just fine. If I visit it at http://localhost:8080/wiki/RecentChanges?action=rss_rc I get a nice feed of all the recent changes.
I'm not familiar with ?action=rss_rc at all, it sounds like a local customization.
But I don't want to reach it by URL, I want to reach it programmatically. How do I do that??
"return self.wiki.RecentChanges()" gives an AttributeError.
If you want to know why, post the traceback and I'll say more. Generally, to get a zwiki page to render itself programmatically, give it a REQUEST. Eg self.wiki.RecentChanges(REQUEST=REQUEST). In certain contexts you might still have skin trouble, in which case try self.wiki.RecentChanges(REQUEST=REQUEST,bare=1) to render without the skin. Current Zwiki has changes_rss and pages_rss methods built in, eg wiki.AnyPage.pages_rss(). Cheers -Simon
http://localhost:8080/wiki/RecentChanges?action=rss_rc I get a nice feed of all the recent changes.
I'm not familiar with ?action=rss_rc at all, it sounds like a local customization.
I'm sorry. That was for MoinMoin which we had before but upgraded to Zwiki. My script was assuming MoinMoin, hence the action=rss_rc stuff.
Current Zwiki has changes_rss and pages_rss methods built in, eg wiki.AnyPage.pages_rss().
If I do : "return self.wiki.FrontPage.changes_rss()" I seem to get what I want, I think. The big problem with this is that it seems to be in reverse order with the first wiki page first. I'd like it the other way around. What I want is basically http://localhost:8080/wiki/FrontPage/recentchanges but in RSS or RDF format so that I can use them somewhere else. -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
Peter Bengtsson wrote:
The big problem with this is that it seems to be in reverse order with the first wiki page first. I'd like it the other way around.
Have a look at the changes_rss method in RSS.py (in 0.46). It calls pages(), which is essentially a catalog query restricted to this folder. You could move this method back to a pythonscript and tweak that query, or do it in dtml.
participants (2)
-
Peter Bengtsson -
Simon Michael