Changeset 1345

Show
Ignore:
Timestamp:
08/16/06 23:32:54
Author:
taro
Message:

store rate of background-color for Widget

Files:

Legend:

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

    r1343 r1345  
    5656            ( $res->content =~ m#<h4[^>]*>[^<>]*this url has been saved by\D+(\d+)#s )[0]; 
    5757    } 
     58    $args->{entry}->meta->{delicious_rate} = rate_of_color($delicious_users); 
    5859    $args->{entry}->meta->{delicious_users} = $delicious_users; 
     60} 
     61 
     62sub rate_of_color { 
     63    my $n = shift; 
     64    int(log($n) / log(0.82) + 100); 
    5965} 
    6066