package SVN::Web::RSS; @ISA = qw(SVN::Web::Log); use strict; use SVN::Web::Log; our $VERSION = 0.53; =head1 NAME SVN::Web::RSS - SVN::Web action to generate an RSS feed =head1 SYNOPSIS In F actions: ... rss: class: SVN::Web::RSS action_menu: show: - file - directory link_text: (rss) head_only: 1 icon: /css/trac/feed-icon-16x16.png opts: publisher: address@domain ... =head1 DESCRIPTION Generates an RSS feed of commits to a file or path in the Subversion repository. =head1 CONFIGURATION The following options may be specified in F. =over =item publisher The e-mail address of the feed's publisher. This is placed in to the C<< >> element in the RSS output. There is no default. If not specified then no C<< >> element is included. =back B RSS dates have a specific format. Accordingly, the C and C configuration options are ignored by this action. =head1 OPTIONS See L. =head1 TEMPLATE VARIABLES See L. =head1 EXCEPTIONS See L. =cut my %default_opts = (publisher => ''); # elements have a specific format that we must use, overriding # the user's choice sub format_svn_timestamp { my $self = shift; my $cstring = shift; my $time = SVN::Core::time_from_cstring($cstring) / 1_000_000; return POSIX::strftime('%Y-%m-%dT%H:%M:%S', gmtime($time)); } sub run { my $self = shift; my $data = $self->SUPER::run(@_)->{data}; $self->{opts} = { %default_opts, %{ $self->{opts} } }; return { template => 'rss', mimetype => 'text/xml', data => { %{$data}, publisher => $self->{opts}{publisher}, } }; } 1; =head1 COPYRIGHT Copyright 2003-2004 by Chia-liang Kao C<< >>. Copyright 2005-2007 by Nik Clayton C<< >>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =cut