Changeset 1213

Show
Ignore:
Timestamp:
08/07/06 16:24:36
Author:
miyagawa
Message:

Publish::Feed: use author <nobody@example.com> in RSS feed to make it a valid feed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Bundle/Planet.pm

    r1173 r1213  
    4444            title => $self->conf->{title}, 
    4545            link  => $self->conf->{url}, 
     46            description => $self->conf->{description}, 
    4647        }, 
    4748    }); 
     
    127128      stylesheet: foo.css 
    128129      duration: 7 days 
     130      description: Everything about Foobar from the Web 
    129131 
    130132=head1 DESCRIPTION 
     
    186188Additional rule to add to filter entris using SmartFeed::All. Optional and defaults to nothing. 
    187189 
     190=item description 
     191 
     192Description to use in XHTML tagline and Atom/RSS feeds. Optional. 
     193 
    188194=back 
    189195 
  • trunk/plagger/lib/Plagger/Plugin/Publish/Feed.pm

    r1212 r1213  
    5151    $feed->modified(Plagger::Date->now); 
    5252    $feed->generator("Plagger/$Plagger::VERSION"); 
     53    $feed->description($f->description); 
    5354 
    5455    if ($feed_format eq 'Atom') { 
     
    7576        $entry->issued($e->date)   if $e->date; 
    7677        $entry->modified($e->date) if $e->date; 
    77         $entry->author($e->author); 
     78 
     79        if ($feed_format eq 'RSS') { 
     80            $entry->author($e->author . ' <nobody@example.com>'); 
     81        } else { 
     82            $entry->author($e->author); 
     83        } 
     84 
    7885        $entry->id("tag:plagger.org,2006:" . $e->id); 
    7986 
  • trunk/plagger/lib/Plagger/Plugin/SmartFeed.pm

    r1061 r1213  
    2525    $feed->title( $self->conf->{title} || "Entries " . $self->rule->as_title ); 
    2626    $feed->link( $self->conf->{link} ); 
     27    $feed->description( $self->conf->{description} || $feed->title ); 
    2728 
    2829    $self->{feed} = $feed; 
  • trunk/plagger/lib/Plagger/Plugin/SmartFeed/All.pm

    r1173 r1213  
    99    $feed->type('smartfeed'); 
    1010    $feed->id( $self->conf->{id} || ('smartfeed:all') ); 
    11     $feed->title( $self->conf->{title} || "All Entries " ); 
     11    $feed->title( $self->conf->{title} || "All Entries" ); 
    1212    $feed->link( $self->conf->{link} ); 
     13    $feed->description( $self->conf->{description} || $feed->title ); 
    1314 
    1415    $self->{feed} = $feed; 
  • trunk/plagger/t/plugins/Bundle-Planet/feedvalidator.t

    r1212 r1213  
    1414 
    1515our $dir    = "$FindBin::Bin/planet"; 
    16 our $output = "$dir/atom.xml"; 
    1716 
    1817run_eval_expected; 
     
    4342      theme: sixapart-std 
    4443      stylesheet: foo.css 
     44      description: Everything about Foobar 
    4545--- expected 
    46 my $out = `$ENV{HOME}/svn/feedvalidator/src/demo.py $main::output A`; 
     46my $out = `$ENV{HOME}/svn/feedvalidator/src/demo.py $main::dir/atom.xml A`; 
    4747like $out, qr/No errors or warnings/; 
     48$out = `$ENV{HOME}/svn/feedvalidator/src/demo.py $main::dir/rss.xml A`; 
     49like $out, qr/No errors or warnings/;