TIP FeedPlugin is not installed on Foswiki.org.

FeedPlugin

Syndication feed parser

This is a new plugin to render RSS and ATOM feeds from internet sites. It actually is a rework of the old HeadlinesPlugin now much leaner and more robust, i.e. facing unicode website feeds. Instead of implementing a RSS parser by its own FeedPlugin hands off duties to CPAN:XML::Feeed and only takes care of caching and integrating results on a Foswiki page.

Examples

List headlines at http://blog.foswiki.org; auto-discover news feed:

%STARTSECTION{"example1"}%
%FEED{
   "http://blog.foswiki.org" 
   discover="on"
   header="<div class='alt'>$n"
   footer="$n</div>"
}%
%ENDSECTION{"example1"}%

Format the most recent posting on the Foswiki Blog:

%STARTSECTION{"example2"}%
%FEED{
   "http://blog.foswiki.org/feed/"
   limit="1"
   header="<div class='alt'>$n"
   format="---+!! <div class='foswikiGrayText foswikiRight foswikiNormal'>$issued</div> [[$link][$title]]
           $content"
   footer="$n</div>"
}%
%ENDSECTION{"example2"}%

Syntax

Parameter Description Default
"..." or href="..." source url; this can either be a direct link to the RSS/ATOM feed or to the website serving the feed in which case you need to enable discover  
refresh="..." refresh rate for caching the feed; this can be specified using an expiry term such as 1 d for one day or 1 h for one hour etc specified in $Foswiki::cfg{FeedPlugin}{CacheExpire}, defaults to 1 d
limit="..." maximum items to show 0 (no limit)
skip="..." number of items in the feed to skip showing the rest 0
header="..." format string to be prepended to the list of items in the feed  
format="..." format string for each item on a feed * [[$link][$title]]
footer="..." format string to be appended to the list of items in the feed  
separator="..." format string to separte items in the feed  
discover="on/off" switch on feed discovery starting at the source url off

An empty result will be returned when no items have been found in the feed (or all items have been skipped).

The format parameter may contain the following variables expanding to respective properties of a feed item:

  • $author
  • $base
  • $category
  • $content
  • $id
  • $index
  • $issued, $issued(<date-format>)
  • $link
  • $modified, $modified($lt;date-format>)
  • $summary
  • $tags
  • $title

In addition the header, format, separator and footer format strings may contain:

  • $feed_author
  • $feed_base
  • $feed_copyright
  • $feed_format
  • $feed_generator
  • $feed_language
  • $feed_link
  • $feed_modified, $feed_modified($lt;date-format>)
  • $feed_tagline
  • $feed_title

... as well as the standard escapes:

  • $percnt
  • $dollar
  • $n

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Dependencies

NameVersionDescription
XML::Feed>=0.53Required.
LWP::UserAgent>=0Required.
Cache::Cache>=0Required.
Digest::MD5>=0Required.
URI>=0Required.

Change History

24 Apr 2016 fixed docu; fixed discover mode; added support for non-unicode Foswiki engines
18 Mar 2016 be more robust on feeds not publishing proper dates
16 Mar 2016 initial release
Topic attachments
I Attachment Action Size Date Who Comment
FeedPlugin.md5md5 FeedPlugin.md5 manage 153 bytes 26 Apr 2016 - 10:44 MichaelDaum  
FeedPlugin.sha1sha1 FeedPlugin.sha1 manage 177 bytes 26 Apr 2016 - 10:45 MichaelDaum  
FeedPlugin.tgztgz FeedPlugin.tgz manage 7 K 26 Apr 2016 - 10:44 MichaelDaum  
FeedPlugin.zipzip FeedPlugin.zip manage 10 K 26 Apr 2016 - 10:44 MichaelDaum  
FeedPlugin_installerEXT FeedPlugin_installer manage 4 K 26 Apr 2016 - 10:44 MichaelDaum  
Topic revision: r3 - 26 Apr 2016, MichaelDaum - This page was cached on 02 Jun 2017 - 09:22.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License