Changeset 59

Show
Ignore:
Timestamp:
02/09/06 15:40:22
Author:
miyagawa
Message:
  • Store atom:id as $feed->id when feed is Atom. Fixes #24
  • Allows %i in Publish::JavaScript?
Files:

Legend:

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

    r36 r59  
    3838    $feed->updated($remote->modified); 
    3939 
     40    if ($remote->format eq 'Atom') { 
     41        $feed->id( $remote->{atom}->id ); 
     42    } 
     43 
    4044    for my $e ($remote->entries) { 
    4145        my $entry = Plagger::Entry->new; 
  • trunk/plagger/lib/Plagger/Plugin/Publish/JavaScript.pm

    r37 r59  
    3636    'u' => sub { my $s = $_[0]->url;  $s =~ s!^https?://!!; $s }, 
    3737    'l' => sub { my $s = $_[0]->link; $s =~ s!^https?://!!; $s }, 
    38     't' => sub { $_[0]->title } 
     38    't' => sub { $_[0]->title }, 
     39    'i' => sub { $_[0]->id }, 
    3940); 
    4041 
    41 my $format_re = qr/%(u|l|t)/; 
     42my $format_re = qr/%(u|l|t|i)/; 
    4243 
    4344sub gen_filename {