Home » Category » Software & Application Miscellaneous

Software & Application Miscellaneous: ZWiki RecentChanges as RSS feed

116| Sun, 04 May 2008 12:47:00 GMT| peterbengtsson| Comments (3)
I've got a Zwiki instance that works just fine. If I visit it at
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

Keywords & Tags: zwiki, recentchanges, rss, feed, software, application

URL: http://software.itags.org/software-application/240731/
 
«« Prev - Next »» 3 helpful answers below.
Hi Peter,
I've got a Zwiki instance that works just fine. If I visit it at
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

Zope maillist - Zope (AT) zope (DOT) org

** No cross posts or HTML encoding! **
(Related lists -

)

simonmichael | Sun, 04 May 2008 12:49:00 GMT |

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 ()" 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
but in RSS or RDF
format so that I can use them somewhere else.

peterbengtsson | Sun, 04 May 2008 12:50:00 GMT |

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.

Zope maillist - Zope (AT) zope (DOT) org

** No cross posts or HTML encoding! **
(Related lists -

)

simonmichael | Sun, 04 May 2008 12:51:00 GMT |

Software & Application Miscellaneous Hot Answers

Software & Application Miscellaneous New questions

Software & Application Miscellaneous Related Categories