Changeset 1211

Show
Ignore:
Timestamp:
08/07/06 15:49:19
Author:
miyagawa
Message:

make sure generated Atom 1.0 is valid, using Feedvalidator command line.
You need to check out feedvalidator to ~/svn/feedvalidator to run this.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Feed.pm

    r1210 r1211  
    118118            _is_same_domain($permalink, $_->source->url),    # permalink and $feed->url is the same domain 
    119119            _is_same_domain($permalink, $_->source->link),   # permalink and $feed->link is the same domain 
    120             ($_->date ? ($now - $_->date->epoch) : 0),        # Older entry date is prioritized 
     120            ($_->date ? ($now - $_->date->epoch) : 0),       # Older entry date is prioritized 
    121121            length($_->body || ''),                          # Prioritize full content feed 
    122122        ] } @entries; 
  • trunk/plagger/lib/Plagger/Plugin/Publish/Feed.pm

    r1173 r1211  
    5252    $feed->generator("Plagger/$Plagger::VERSION"); 
    5353 
     54    if ($feed_format eq 'Atom') { 
     55        $feed->{atom}->id("tag:plagger.org,2006:" . $f->id); 
     56    } 
     57 
    5458    # add entry 
    5559    for my $e ($f->entries) { 
     
    5862        $entry->link($e->link); 
    5963        $entry->summary($e->body_text) if defined $e->body; 
    60         $entry->content($e->body
     64        $entry->content( XML::Feed::Content->new({ body => $e->body, type => 'xhtml' })
    6165            if $self->conf->{full_content} && defined $e->body; 
    6266        $entry->category(join(' ', @{$e->tags})); 
    63         $entry->issued($e->date) if $e->date; 
     67        $entry->issued($e->date)   if $e->date; 
     68        $entry->modified($e->date) if $e->date; 
    6469        $entry->author($e->author); 
     70        $entry->id("tag:plagger.org,2006:" . $e->id); 
    6571 
    6672        if ($e->has_enclosure) {