Changeset 230

Show
Ignore:
Timestamp:
08/22/06 16:01:51 (2 years ago)
Author:
miya
Message:

Publish::iCal: include author in ical summary
CustomFeed::AmazonWebService: add entry author

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plagger/trunk/lib/Plagger/Plugin/CustomFeed/AmazonWebService.pm

    r228 r230  
    4545        for my $item ( @$items ) { 
    4646            my $entry = Plagger::Entry->new; 
     47 
    4748            $entry->title($item->ProductName); 
    4849            $entry->body($item->ProductDescription); 
    4950            $entry->link($item->url); 
    5051            $entry->icon({ url => $item->ImageUrlSmall }); 
     52 
     53            if ( ref $item eq 'Net::Amazon::Property::Book' ){ 
     54                $entry->author($item->author); 
     55            } 
     56            elsif ( ref $item eq 'Net::Amazon::Property::Music' ){ 
     57                $entry->author($item->artist); 
     58            } 
     59            elsif ( ref $item eq 'Net::Amazon::Property::DVD' ){ 
     60                $entry->author( ( $item->starring() )[0] ); 
     61            } 
    5162 
    5263            my $date = Plagger::Date->strptime('%Y/%m/%d', $item->ReleaseDate); 
     
    8192 
    8293    if($response->is_error) { 
    83         $context->log(error => $response->message); 
     94        $context->log(error => $response->message . ": $keyword"); 
    8495        return; 
    8596    } 
  • plagger/trunk/lib/Plagger/Plugin/Publish/iCal.pm

    r229 r230  
    3737        my $event = Data::ICal::Entry::Event->new; 
    3838        $event->add_properties( 
    39             summary     => $entry->title
     39            summary     => $entry->title . ' - ' . $entry->author
    4040            description => $entry->summary || $entry->body, 
     41            organizer   => $entry->author, 
    4142            dtstart     => join('', split('-', $date->ymd)), 
    4243            dtend       => join('', split('-', Plagger::Date->from_epoch(epoch => $date->epoch + 60*60*24)->ymd)),