IRSS

What is RSS?

According to Mark Pilgrim:

What is IRSS?

Inline RSS, or IRSS, is a moin plugin which allows one to turn parts of any normal moin page in RSS feeds, using very simple and straightforward markup.

This plugin was tested with moin 1.3.

Example

The following example demonstrates how to turn part of a given page in an RSS feed, and include the usual RSS orange icon with a link to the RSS feed.

This won't be considered 
 
##irss start 
 
== Newest item == 
This will be the newest RSS item. 
 
== Older item == 
This is another RSS item. 
 
##irss stop 
 
This won't be considered either. 
 
Click on [[IRSS]] to get an RSS feed from this page. 

IRSS markup

The following tags allow you to define and configure an RSS feed on any Moin page:

##irss start [<name>]

Mark the start of an RSS feed. <name> can be omitted, unless you want to define multiple feeds in a single page. Any Moin titles (like = title =) found between that tag and the stop tag will be considered part of the feed.

##irss stop [<name>]

Mark the end of an RSS feed. <name> can be omitted, even when using multiple feeds in a single page. It's useful only if you want to define nested feeds.

##irss topic <rss topic>
This will set the title of the whole RSS feed. Only the first topic found is considered. The default topic is the page name.
##irss descr <rss description>
This will set the description of the whole RSS feed. Only the first description found is considered. The

default description is "News from <pagename>".

##irss reverse
The default behavior is to have the newer items at the top of the list. If used, this tag will reverse this behavior.
##irss link <url>
This tag should be used just after a Moin title, and will make the RSS item title link to that URL. The default behavior is to link the RSS item title to the Moin title in the page where the feed is defined.

IRSS macro

To give your users access to the RSS feed, you use the IRSS macro in your pages. This macro will insert the usual orange RSS icon, linking to the URL where the feed is accessible.

The syntax of the IRSS macro is [[IRSS([<pagename>] [, <feedname>])]], where: <pagename> is the name of the page where the feed is defined, and can be omitted when the feed is in the same page where the macro is used; and <feedname> is the feed name as passed to the start tag, and can be omitted if no feedname was given for that tag.

It means that the following macros are valid:

The simplest and most used form: 
[[IRSS]] 
 
Refer to a feed in another page: 
[[IRSS(AnotherPage)]] 
 
Refer to the feed oldnews on this page: 
[[IRSS(,oldnews)]] 
 
Refer to the feed mynews on another page: 
[[IRSS(MyPage,mynews)]] 

Installing

To install IRSS in your Moin, just drop the IRSS.py file in your plugin macro directory (plugin/macro/IRSS.py), and irss.py file in the plugin action directory (plugin/action/irss.py).

Download

You will need both files:

The old version, for moin 1.1, is also available. To use it, just drop that single file in the plugin/macro/ directory.

Author

Gustavo Niemeyer <gustavo@niemeyer.net>


CategoryProject

irss (last edited 2008-03-03 03:12:59 by GustavoNiemeyer)