Changeset 1264

Show
Ignore:
Timestamp:
08/10/06 11:47:45
Author:
miyagawa
Message:

support Atom 1.0 category extraction. Spotted by jwang

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r1241 r1264  
    134134        $entry->tags([ map _u($_), @$category ]) if $category; 
    135135 
     136        # XXX XML::Feed doesn't support extracting atom:category yet 
     137        if ($remote->format eq 'Atom' && $e->{entry}->can('categories')) { 
     138            my @categories = $e->{entry}->categories; 
     139            for my $cat (@categories) { 
     140                $entry->add_tag( $cat->label || $cat->term ); 
     141            } 
     142        } 
     143 
    136144        $entry->date( Plagger::Date->rebless($e->issued) ) 
    137145            if eval { $e->issued };