NOTE: This is a
DistributionDocument.
- Please help maintain high quality documentation:
This is a wiki, please
fix the documentation if you find errors or incomplete content.
Put questions and suggestions concerning the documentation of this topic in the comments section below.
Use the Support web for problems you are having using TWiki.
Use the Sandbox web to evaluate & test TWiki.
RSS News Feeds
Find out What's New
There are several ways to find out what's new in each TWiki web:
- Visit WebChanges to see recent changes
- Subscribed in WebNotify get notified of recent changes by e-mail
- Use a news readers such as TWiki:Plugins/HeadlinesPlugin to display the recent changes
RSS Feed Usage
RSS Feed Internals
Each web has a
WebRss topic which includes part of this WebRssBase topic. This topic is the base for the RSS feed and generates an RSS 1.0 feed for
TWiki:Codev/TWikiSyndication.
The
WebRss topic in each web contains the following text:
<channel rdf:about="%SCRIPTURL{"view"}%/%INCLUDINGWEB%">
<title>%WIKITOOLNAME%'s <nop>%INCLUDINGWEB% web</title>
<link>%SCRIPTURL{"view"}%/%INCLUDINGWEB%</link>
<description>(the description of the web). TWiki is a Web-Based Collaboration Platform for the Enterprise.</description>
%INCLUDE{"TWiki06x01.WebRssBase"}% <!--
* Set SKIN = rss
-->
Below part is included by each WebRss topic:
%STARTINCLUDE%<image rdf:resource="%WIKILOGOIMG%" />
<dc:language>en-us</dc:language>
<dc:rights>%WEBRSSCOPYRIGHT%</dc:rights>
<dc:publisher>%WIKIWEBMASTERNAME% [%WIKIWEBMASTER%]</dc:publisher>
<dc:creator>The contributing authors of %WIKITOOLNAME%</dc:creator>
<dc:source>%WIKITOOLNAME%</dc:source>
<items>
<rdf:Seq>
%SEARCH{"%URLPARAM{"search" encode="quote" default=".*" }%" web="%URLPARAM{"web" encode="quote" default="%INCLUDINGWEB%" }%" excludetopic="%URLPARAM{"excludetopic" encode="quote" default="WebStatistics" }%" type="%URLPARAM{"type" encode="quote" default="regex" }%" nosearch="on" order="modified" reverse="on" nototal="on" limit="%URLPARAM{"limit" encode="quote" default="16" }%" scope="%URLPARAM{"scope" encode="quote" default="text" }%" casesensitive="%URLPARAM{"casesensitive" encode="quote" default="on" }%" date="%URLPARAM{"date" encode="quote" default="" }%" format=" <rdf:li rdf:resource=\"%SCRIPTURL{"view"}%/$web/$topic\" />"}%
</rdf:Seq>
</items>
</channel>
<image rdf:about="%WIKILOGOIMG%">
<title>%WIKILOGOALT%.%INCLUDINGWEB%</title>
<link>%SCRIPTURL{"view"}%/%INCLUDINGWEB%</link>
<url>%WIKILOGOIMG%</url>
</image>
%SEARCH{"%URLPARAM{"search" encode="quote" default=".*" }%" web="%URLPARAM{"web" encode="quote" default="%INCLUDINGWEB%" }%" excludetopic="%URLPARAM{"excludetopic" encode="quote" default="WebStatistics" }%" type="%URLPARAM{"type" encode="quote" default="regex" }%" nosearch="on" order="modified" reverse="on" nototal="on" limit="%URLPARAM{"limit" encode="quote" default="16" }%" scope="%URLPARAM{"scope" encode="quote" default="text" }%" casesensitive="%URLPARAM{"casesensitive" encode="quote" default="on" }%" date="%URLPARAM{"date" encode="quote" default="" }%" format="<item rdf:about=\"%SCRIPTURL{"view"}%/$web/$topic\">$n <title>$topic</title>$n <link>%SCRIPTURL{"view"}%/$web/$topic</link>$n <description>$summary (last changed by <nop>$wikiname)</description>$n <dc:date>$isodate</dc:date>$n <dc:contributor>$n <rdf:Description link=\"%SCRIPTURL{"view"}%?topic=$wikiusername\">$n <rdf:value>$username</rdf:value>$n </rdf:Description>$n </dc:contributor>$n</item>"}%
%STOPINCLUDE%
See also:
WebAtomBase,
TWiki:Codev/RichSiteSummary,
TWiki:Codev/TWikiSyndication
Comments & Questions about this Distribution Document Topic
See
TWiki:Codev/TWikiSyndication for the URLs to use when accessing TWiki RSS feeds, and
templates/view.rss.tmpl
in
BeijingRelease for the skin to be used. This is also available in CVS, see
CVSget:templates/view.rss.tmpl (save this file and view in a text editor, as browsers may be upset by its use of near-XML).
See also:
--
PeterThoeny - 09 Dec 2001
generalised the RSS contents to use
TWikiPreferences as referenced in
TWiki:Codev/WebRssDcFieldsWrong
--
SvenDowideit - 26 Jan 2004
Added "Last changed by" as this has been tested on Codev.
--
ArthurClemens - 25 Jul 2004
If I am not mistaken, entities are not valid in RSS feeds. The
TWiki feed info at Synic8 shows only "Last changed by" for description. I changed
to
<nop>
which should get removed. Lets see if Syndic8 picks up the description now.
I also moved the "Last changed by" part to the end of the description, I find the summary more useful than the contributor name (which is also available in other fields).
--
PeterThoeny - 26 Jul 2004
I don't find the summary useful as long as it always stays the same. It would be improved if it showed the last changes.
And because each summary has a different length, the contributor name now hops position, which is not easy to scan.
This has been for months in use in Codev. Why did you not give feedback there?
- Simply because I did not notice until yesterday -- PTh
- That happens to me too. -- AC - 27 Jul 2004
--
ArthurClemens - 26 Jul 2004
it's not that entities aren't allowed in rss feeds, it's just that xml doesn't predefine entities like html does; they'll either need to be defined in the xml (the rss feed itself), or they'll need to use
numeric entity identifiers.
CPAN:HTML::Entities can provide this mapping.
sample text at
TestTopicHtmlEntities
something else to keep in mind: avoid embedding html in the title.
The channel and item titles in RSS, like their counterpart in HTML, are considered metadata and therefore are not expected to have display elements such as HTML tags. Embedding markup, even encoded with CDATA, could break an end user's application with your feed. Keep HTML in the description only, if at all.
(source: http://webservices.xml.com/pub/a/ws/2002/11/19/rssfeedquality.html?page=2)
http://www.xml.com/pub/a/tools/ruwf/check.html provides an xml syntax checker.
--
WillNorris - 26 Jul 2004, 23 Mar 2005
disabled to test new server load
--
SvenDowideit - 19 May 2005
May I add the following to the item-section:
<author><nop>$wikiname</author>$n
This is part of the RSS 2.0 Specification that you can find at
http://blogs.law.harvard.edu/tech/rss. The advantage is that RSS Readers can display the author of the edit in a separate column, which comes handy when using it with TWiki. At the moment the column says "Peter Thoeny" (as he is the channel creator).
You can try the modification with your RSS reader at
http://page.mi.fu-berlin.de/~oezbek/cgi-bin/view/TWiki/WebRssBase.
--
ChristopherOezbek - 04 Jul 2005
does this look like a proper patch for the change? if so, i'll check it in.
Index: WebRssBase.txt
===================================================================
--- WebRssBase.txt (revision 4523)
+++ WebRssBase.txt (working copy)
@@ -58,7 +58,7 @@
<link>%SCRIPTURL%/view%SCRIPTSUFFIX%/%INCLUDINGWEB%</link>
<url>%WEBLOGOIMG%</url>
</image>
-%SEARCH{"%URLPARAM{"search" default=".*" }%" web="%INCLUDINGWEB%" regex="on" nosearch="on" order="modified" reverse="on" nototal="on" limit="16" format="<item rdf:about=\"%SCRIPTURL%/view%SCRIPTSUFFIX%/$web/$topic\">$n <title>$topic</title>$n <link>%SCRIPTURL%/view%SCRIPTSUFFIX%/$web/$topic?t=$isodate</link>$n <description>$summary (last changed by <nop>$wikiname)</description>$n <dc:date>$isodate</dc:date>$n <dc:contributor>$n <rdf:Description link=\"%SCRIPTURL%/view%SCRIPTSUFFIX%?topic=$wikiusername\">$n <rdf:value>$username</rdf:value>$n </rdf:Description>$n </dc:contributor>$n <wiki:version>$rev</wiki:version>$n <wiki:status>updated</wiki:status>$n <wiki:importance>major</wiki:importance>$n <wiki:diff>%SCRIPTURL%/rdiff%SCRIPTSUFFIX%/$web/$topic</wiki:diff>$n <wiki:history>%SCRIPTURL%/rdiff%SCRIPTSUFFIX%/$web/$topic</wiki:history>$n</item>"}%
+%SEARCH{"%URLPARAM{"search" default=".*" }%" web="%INCLUDINGWEB%" regex="on" nosearch="on" order="modified" reverse="on" nototal="on" limit="16" format="<item rdf:about=\"%SCRIPTURL%/view%SCRIPTSUFFIX%/$web/$topic\">$n <title>$topic</title>$n <link>%SCRIPTURL%/view%SCRIPTSUFFIX%/$web/$topic?t=$isodate</link>$n <description>$summary (last changed by <nop>$wikiname)</description>$n <author><nop>$wikiname</author>$n <dc:date>$isodate</dc:date>$n <dc:contributor>$n <rdf:Description link=\"%SCRIPTURL%/view%SCRIPTSUFFIX%?topic=$wikiusername\">$n <rdf:value>$username</rdf:value>$n </rdf:Description>$n </dc:contributor>$n <wiki:version>$rev</wiki:version>$n <wiki:status>updated</wiki:status>$n <wiki:importance>major</wiki:importance>$n <wiki:diff>%SCRIPTURL%/rdiff%SCRIPTSUFFIX%/$web/$topic</wiki:diff>$n <wiki:history>%SCRIPTURL%/rdiff%SCRIPTSUFFIX%/$web/$topic</wiki:history>$n</item>"}%
%STOPINCLUDE%
--
WillNorris - 05 Jul 2005
Works for me.
--
ChristopherOezbek - 05 Jul 2005
great, checked into
SVN:4526
--
WillNorris - 05 Jul 2005
hi folks, figured out a way to include <!CDATA
> into view.rss.tmpl.
Simple really:
%3C![CDATA[%INCLUDE{"%WEB%.%TOPIC%"}%]]%3E
(Hopefully it comes out ok, I'll edit the topic so it does if need be).
Just a "simple" matter of "triple-escaping": escape once for TWiki, escape once for RSS/XML, escape once for HTML (probably another level in there somewhere). It's not perfect, since it trips up on HTML named entities, (e.g.) é.
I had a go at this to see if I could get the RSS to render properly in Galeon (probably works in Firefox and others too).
Have I said recently how much TWiki rocks? It r0x0rs my s0x0rs.
--
EricCote - 01 Dec 2005
Oh, I forgot, a) you can
see an example of it. I have an é in there, and when I went to see it in skin=rss, it buggered all over my screen because of that "accent". I had a b) but I forgot it now.
--
EricCote - 01 Dec 2005
Ok, made some changes. The above stopped working, so I moved the CDATA[] stuff to
WebRssBase, and it works as expected. I don't know why I did what I did before, seems kinda brain-dead now.
--
EricCote - 03 Dec 2005
Here's a diff:
--- WebRssBase.txt.bak 2005-12-03 14:04:14.000000000 -0500
+++ WebRssBase.txt 2005-12-03 17:04:14.162397393 -0500
@@ -58,7 +58,7 @@
<link>%SCRIPTURL{"view"}%/%INCLUDINGWEB%</link>
<url>%WIKILOGOIMG%</url>
</image>
-%SEARCH{"%URLPARAM{"search" default=".*" }%" web="%INCLUDINGWEB%" regex="on" nosearch="on" order="modified" reverse="off" nototal="on" limit="16" format="<item rdf:about=\"%SCRIPTURL{"view"}%/$web/$topic\">$n <title>$topic</title>$n <link>%SCRIPTURL{"view"}%/$web/$topic?t=$isodate</link>$n <description>$changes (last changed by <nop>$wikiname)</description>$n <dc:date>$isodate</dc:date>$n <dc:contributor>$n <rdf:Description link=\"%SCRIPTURL{"view"}%?topic=$wikiusername\">$n <rdf:value>$username</rdf:value>$n </rdf:Description>$n </dc:contributor>$n <wiki:version>$rev</wiki:version>$n <wiki:status>updated</wiki:status>$n <wiki:importance>major</wiki:importance>$n <wiki:diff>%SCRIPTURL{"rdiff"}%/$web/$topic</wiki:diff>$n <wiki:history>%SCRIPTURL{"rdiff"}%/$web/$topic</wiki:history>$n</item>"}%
+%SEARCH{"%URLPARAM{"search" default=".*" }%" web="%INCLUDINGWEB%" regex="on" nosearch="on" order="modified" reverse="off" nototal="on" limit="16" format="<item rdf:about=\"%SCRIPTURL{"view"}%/$web/$topic\">$n <title><![CDATA[$topic]]></title>$n <link>%SCRIPTURL{"view"}%/$web/$topic?t=$isodate</link>$n <description><![CDATA[$changes (last changed by <nop>$wikiname)]]></description>$n <dc:date>$isodate</dc:date>$n <dc:contributor>$n <rdf:Description link=\"%SCRIPTURL{"view"}%?topic=$wikiusername\">$n <rdf:value>$username</rdf:value>$n </rdf:Description>$n </dc:contributor>$n <wiki:version>$rev</wiki:version>$n <wiki:status>updated</wiki:status>$n <wiki:importance>major</wiki:importance>$n <wiki:diff>%SCRIPTURL{"rdiff"}%/$web/$topic</wiki:diff>$n <wiki:history>%SCRIPTURL{"rdiff"}%/$web/$topic</wiki:history>$n</item>"}%
--
EricCote - 03 Dec 2005
I'm not sure if it is better to have author or dc:creator. I put in dc:creator, and it worsk with thunderbird's blog reader. My changes to WebRssBase are twofold:
- excludetopic="WebStatistics"
- insert for each item, using a search to find the email of the person:
<dc:creator>\"$username\" < $percntSEARCH{ \"Email\" web=\"%MAINWEB%\" topic=\"$wikiname\" format=\"$dollarpattern(.*?\*.*?Email\:\s*([^\n\r]+).*)\" nosearch=\"on\" nototal=\"on\" }$nop% > </dc:creator>$n
I've put a diff -c between the standard cairo version and my version at
WebRssBase.txt.patch.
--
DougClaar - 12 Jan 2006
Thanks for contributing this. I will take the exclude topic into
DakarRelease. Altough I'd like to take dc:creator into Dakar, I will pass on it because of performance.
WebRss is hit many times, and nested searches can be slow.
--
PeterThoeny - 13 Jan 2006
A naive question, perhaps, but "Is it possible for the RSS news feed to present some info instead of or in addition to the topic name?" The topic name is all I see on my Google home page in the RSS feed of
http://twiki.org/cgi-bin/view/Main/WebRss. I'd like subscribers to our internal RSS to see more than, e.g.,
HasanAlMatrouk. The first line line of the page might be an appropriate substitute or addition. -- Jared
--
JaredFreeman - 24 Aug 2006
Is it possible to have a feed for just one topic? Can that be done with the search?
--
EricHanson - 21 Mar 2007
Please ask support questions in the
Support web.
--
PeterThoeny - 24 Mar 2007