Author: dom Date: 2006-04-20 10:42:05 +0100 (Thu, 20 Apr 2006) New Revision: 769
Modified: trunk/Build.PL trunk/Changes trunk/PREREQUISITES trunk/lib/OpenGuides.pm trunk/lib/OpenGuides/Feed.pm trunk/wiki.cgi Log: Revert changes using CGI::Wiki::Plugin::Atom pending CGI::Wiki/Wiki::Toolkit refactoring.
Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2006-04-20 09:38:32 UTC (rev 768) +++ trunk/Build.PL 2006-04-20 09:42:05 UTC (rev 769) @@ -220,7 +220,6 @@ 'CGI::Cookie' => 0, 'CGI::Wiki' => '0.62', # fixed delete version 'CGI::Wiki::Formatter::UseMod' => '0.16', # macros - 'CGI::Wiki::Plugin::Atom' => 0, 'CGI::Wiki::Plugin::Categoriser' => 0, 'CGI::Wiki::Plugin::Diff' => '0.08', # earlier buggy 'CGI::Wiki::Plugin::Locator::Grid'=> '0.02', # cope with sqlite 3
Modified: trunk/Changes =================================================================== --- trunk/Changes 2006-04-20 09:38:32 UTC (rev 768) +++ trunk/Changes 2006-04-20 09:42:05 UTC (rev 769) @@ -4,9 +4,8 @@ Miscellanous fixes for mod_perl. #42 New "About" screen. Try action=about and action=about;format=rdf. #97 Use "summary" metadata to generate HTML meta descriptions. - Support for Atom feeds for RecentChanges; new OpenGuides::Feed - module to handle feed generation (code was previously in - OpenGuides::RDF). + New OpenGuides::Feed module to handle feed generation (code was + previously in OpenGuides::RDF). Generate URIs for locales and contributors in RDF output.
0.52 5 March 2006
Modified: trunk/PREREQUISITES =================================================================== --- trunk/PREREQUISITES 2006-04-20 09:38:32 UTC (rev 768) +++ trunk/PREREQUISITES 2006-04-20 09:42:05 UTC (rev 769) @@ -8,7 +8,6 @@ CGI::Cookie CGI::Wiki (version 0.62 or later) CGI::Wiki::Formatter::UseMod (version 0.16 or later) -CGI::Wiki::Plugin::Atom CGI::Wiki::Plugin::Categoriser CGI::Wiki::Plugin::Diff (version 0.08 or later) CGI::Wiki::Plugin::Locator::Grid (version 0.02 or later)
Modified: trunk/lib/OpenGuides/Feed.pm =================================================================== --- trunk/lib/OpenGuides/Feed.pm 2006-04-20 09:38:32 UTC (rev 768) +++ trunk/lib/OpenGuides/Feed.pm 2006-04-20 09:42:05 UTC (rev 769) @@ -5,7 +5,6 @@ use vars qw( $VERSION ); $VERSION = '0.01';
-use CGI::Wiki::Plugin::Atom; use CGI::Wiki::Plugin::RSS::ModWiki; use Time::Piece; use URI::Escape; @@ -63,7 +62,6 @@
my %known_types = ( 'rss' => 1, - 'atom' => 1, );
croak "No feed type specified" unless $feed_type; @@ -72,32 +70,8 @@ if ($feed_type eq 'rss') { return $self->rss_maker->recent_changes(%args); } - elsif ($feed_type eq 'atom') { - return $self->atom_maker->recent_changes(%args); - } }
-sub atom_maker { - my $self = shift; - - unless ($self->{atom_maker}) { - $self->{atom_maker} = CGI::Wiki::Plugin::Atom->new( - wiki => $self->{wiki}, - site_name => $self->{site_name}, - site_url => $self->{config}->script_url, - site_description => $self->{site_description}, - make_node_url => $self->{make_node_url}, - recent_changes_link => $self->{config}->script_url . '?action=rc', - atom_link => $self->{config}->script_url . '?action=rc&format=atom', - software_name => 'OpenGuides', - software_homepage => 'http://openguides.org/', - software_version => $self->{og_version}, - ); - } - - $self->{atom_maker}; -} - sub rss_maker { my $self = shift;
@@ -132,7 +106,7 @@
=head1 DESCRIPTION
-Produces RSS 1.0 and Atom 1.0 feeds for OpenGuides. Distributed and +Produces RSS 1.0 feeds for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers. @@ -176,11 +150,6 @@ Returns a raw LCGI::Wiki::Plugin::RSS::ModWiki object created with the values you invoked this module with.
-=item B<atom_maker> - -Returns a raw LCGI::Wiki::Plugin::Atom object created with the values you -invoked this module with. - =item B<make_feed>
# Ten most recent changes in RSS format. @@ -190,15 +159,6 @@ feed_type => 'rss', ); print $rdf_writer->make_feed( %args );
- # All the changes made by bob in the past week, ignoring minor edits, in Atom. - $args{days} = 7; - $args{ignore_minor_edits = 1; - $args{filter_on_metadata} => { username => "bob" }; - - print "Content-Type: application/atom+xml\n"; - print "Last-Modified: " . $feed->feed_timestamp( %args ) . "\n\n"; - print $feed->make_feed( %args ); - =item B<feed_timestamp>
print "Last-Modified: " . $feed->feed_timestamp( %args ) . "\n\n"; @@ -215,7 +175,7 @@
=over 4
-=item * LCGI::Wiki, LCGI::Wiki::Plugin::RSS::ModWiki and LCGI::Wiki::Plugin::Atom +=item * LCGI::Wiki and LCGI::Wiki::Plugin::RSS::ModWiki
=item * Lhttp://openguides.org/
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2006-04-20 09:38:32 UTC (rev 768) +++ trunk/lib/OpenGuides.pm 2006-04-20 09:42:05 UTC (rev 769) @@ -156,9 +156,6 @@ $tt_vars{"rss_".lc($type)."_url"} = $config->script_name . "?action=rc;format=rss;" . lc($type) . "=" . lc(CGI->escape($2)); - $tt_vars{"atom_".lc($type)."_url"} = - $config->script_name . "?action=rc;format=atom;" - . lc($type) . "=" . lc(CGI->escape($2)); }
my %current_data = $wiki->retrieve_node( $id ); @@ -650,16 +647,8 @@ locale => "Hammersmith", );
- # All edits bob has made to pub pages in the last week in Atom format - $guide->display_feed( - feed_type => 'atom', - days => 7, - username => "bob", - category => "Pubs", - ); - C<feed_type> is a mandatory parameter. Supported values at present are -"rss" and "atom". +"rss".
As with other methods, the C<return_output> parameter can be used to return the output instead of printing it to STDOUT. @@ -704,11 +693,7 @@
if ($feed_type eq 'rss') { $output = "Content-Type: application/rdf+xml\n"; - } - elsif ($feed_type eq 'atom') { - $output = "Content-Type: application/atom+xml\n"; - } - else { + } else { croak "Unknown feed type given: $feed_type"; }
Modified: trunk/wiki.cgi =================================================================== --- trunk/wiki.cgi 2006-04-20 09:38:32 UTC (rev 768) +++ trunk/wiki.cgi 2006-04-20 09:42:05 UTC (rev 769) @@ -110,12 +110,6 @@ } else { croak "Unknown RSS feed type '$feed'"; } - } elsif ($format && $format eq 'atom') { - my %args = map { $_ => ( $q->param($_) || "" ) } - qw( feed items days ignore_minor_edits username - category locale ); - $args{feed_type} = 'atom'; - $guide->display_feed( %args ); } else { $guide->display_node( id => 'RecentChanges' ); }
openguides-commits@lists.openguides.org