Current development on JAMWiki is primarily focused on maintenance rather than new features due to a lack of developer availability. If you are interested in working on JAMWiki please join the jamwiki-devel mailing list.

Tech:RSS

ktip.png This page (and all pages in the Tech: namespace) is a developer discussion about a feature that is either proposed for inclusion in JAMWiki or one that has already been implemented. This page is NOT documentation of JAMWiki functionality - for a list of documentation, see Category:JAMWiki.
Status of this feature: IMPLEMENTED. Implemented in JAMWiki 0.5.0.
Contents

Description[edit]

Provide RSS and Atom Feeds for Recent Changes.

Author(s)[edit]

Status[edit]

Code is in svn.

Feeds are generated using Rome which among other nice things allows to create different feed types from the same data model. Feed creation can be configured through request parameters:

  • feedType: select one of rss_0.92, rss_0.93, rss_0.94, rss_1.0, rss_2.0, atom_0.3, or atom_1.0. Default is rss_2.0
  • minorEdits: set to true if minor edits shall be included
  • linkToVersion: set to true if feed entry links shall point to the changed version of an article (and not to the current version)
  • num: number of entries to include in feed. Default is set from JAMWiki environment.

The feed title can be set in jamwiki.properties (property feed-title). Ryan, you may want to add this to the admin configuration form.

Todo[edit]

  • Add feed title property to admin configuration form.
  • Cache generated feeds. If many feed aggregators are retrieving feeds in short intervals it will impact the server load. If the feed is computed, say, every 5 minutes it will decrease the load significantly by still delivering reasonably fresh data.
  • Review content of feed and feed entries.
    • Some feed types do offer more content options.
    • It would be nice to include edit diffs, but for that some deeper knowledge of JAMWiki is neccessary.
    • Another nice option: Specify how many entries to retrieve by time, e.g. get the entries changed during the last 24 hours or since yesterday.

Comments[edit]

I made a couple of quick updates - the jamwiki:link tag takes care of figuring out virtual wiki and servlet context, so I've added that. The RSS image wasn't in the repository, so I've added a message key - feel free to change that if needed. Also, ServletUtil adds the virtualWiki parameter to the request, so I removed that from RecentChangesServlet.

Thanks for your help - I suspected there woud be a better way to create the link. And I forgot to check in the feed image; it's in the repository now. As for jdom.jar: it's needed at runtime by rome.jar. -- Rainer 23-Dec-2006 02:45 PST

Looks good, and thanks for doing this! I'm going to try to get the 0.5.0 release done this week, so RSS may end up with an "experimental" marker for this release, although there should be plenty of time during 0.5.1 to make updates. -- Ryan 22-Dec-2006 23:25 PST

I've added 2 feed links which are automatically recognized by some browsers, e.g. Firefox. This way we can offer different feeds (e.g. excluding and including minor edits) without cluttering the interface. What do you think? If we use this we'll have do add message keys for all feeds advertised this way.-- Rainer 23-Dec-2006 02:45 PST

I moved the <link> link tags to the header - per the XHTML spec they should be there. I'm also a bit unsure about the RSS icon - it looks out of place to me on the recent changes page, although perhaps others will have a different opinion. Hopefully at some point we'll get a graphic artist to take an interest in JAMWiki, as the aesthetics of the software could definitely use some help! In any case, the new code is now running on jamwiki.org.
I like the feed icon because it's easy to find when you want to figure out whether a page offers a feed. On the other hand, using the browser's feed recognition feature this is not as important as it used to be... feel free to change this to whatever you prefer. -- Rainer 24-Dec-2006 01:30 PST
I'm driving up to San Francisco for the holiday, but I'm hoping to have Tuesday free to work on JAMWiki. Once the various setup/upgrade issues are fixed I'll look into adding admin options per your suggestions. Thanks again! -- Ryan 23-Dec-2006 10:58 PST
Happy Holidays, and thanks for bringing JAMWiki to the community! -- Rainer 24-Dec-2006 01:30 PST
Ryan, I've added ResourceBundle properties for the "automagic" feed links. Please have a look at top.jsp: I've added the feed title configured via the admin console to the feed name. I'm not sure whether the way I did this is the most elegant way, though. -- Rainer 09-Jan-2007 07:36 PST
Whenever possible I'd like to avoid scriplets in JSP pages, but it should be easy enough to either modify WikiPageInfo or to use some other method of providing access to the new values. Thanks for the fix. -- Ryan 09-Jan-2007 08:17 PST
I'm afraid it is more complicated then we thought: the RSS feed title configured in the admin console is for all feeds. But the feed title should be configurable for each virtual wiki, or not? -- Rainer 09-Jan-2007 11:24 PST
Virtual wikis already have a default topic associated with them, so we could add a similar field for feed title. Give me a chance to take a look at what you've done and I'll see if I can throw some code together. -- Ryan 09-Jan-2007 21:34 PST
...it occurred to me a bit late, but an alternative that might be easier would be to just pre-pend the virtual wiki name onto the feed name, so you would end up with something like "en - RSS Feed". -- Ryan 10-Jan-2007 00:13 PST
I've included both. The link is now: "<RSS Title> (<virtual wiki>): Recent Changes" -- Rainer 11-Jan-2007 02:58 PST

Can you please integrate (a possibly modified?) version of Rome Propono to create an interface for external (remote) editors?


It would be cool if the Special:WatchList page could offer a customized RSS feed of watched articles for a given user. -- Régis Décamps

I second that. Mike 13-Mar-2008 13:51 PDT