Changeset 73

Show
Ignore:
Timestamp:
02/10/06 21:19:15
Author:
miyagawa
Message:

Hooks adds / renames

  • entry.fixup -> publish.entry.fixup
  • Added update.entry.fixup and update.feed.fixup

Fixed UserAgent? timeout problem ad-hoc

Files:

Legend:

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

    r70 r73  
    121121    } 
    122122 
     123    for my $feed ($self->update->feeds) { 
     124        for my $entry ($feed->entries) { 
     125            $self->run_hook('update.entry.fixup', { feed => $feed, entry => $entry }); 
     126        } 
     127        $self->run_hook('update.feed.fixup', { feed => $feed }); 
     128    } 
     129 
    123130    $self->run_hook('update.fixup'); 
    124131 
    125132    for my $feed ($self->update->feeds) { 
    126133        for my $entry ($feed->entries) { 
    127             $self->run_hook('entry.fixup', { feed => $feed, entry => $entry, content => $entry->text }); 
     134            $self->run_hook('publish.entry.fixup', { feed => $feed, entry => $entry }); 
    128135        } 
    129136        $self->run_hook('publish.add_feed', { feed => $feed }); 
  • trunk/plagger/lib/Plagger/Plugin/Widget/Delicious.pm

    r62 r73  
    1111    $context->register_hook( 
    1212        $self, 
    13         'entry.fixup' => \&add, 
     13        'publish.entry.fixup' => \&add, 
    1414    ); 
    1515} 
  • trunk/plagger/lib/Plagger/Plugin/Widget/HatenaBookmark.pm

    r62 r73  
    1111    $context->register_hook( 
    1212        $self, 
    13         'entry.fixup' => \&add, 
     13        'publish.entry.fixup' => \&add, 
    1414    ); 
    1515} 
  • trunk/plagger/lib/Plagger/UserAgent.pm

    r36 r73  
    77    my $self  = $class->SUPER::new(); 
    88    $self->agent("Plagger/$Plagger::VERSION (http://plagger.bulknews.net/)"); 
     9    $self->timeout(15); # xxx to be config 
    910    $self; 
    1011}