Changeset 61

Show
Ignore:
Timestamp:
02/09/06 16:44:45
Author:
miyagawa
Message:
  • Added Filter::FeedBurner? to rewrite feedburner links in permalink. Fixes #25
  • Added $entry->permalink method
  • $entry->clone to avoid duplicated widgets
Files:

Legend:

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

    r54 r61  
    66 
    77use DateTime::Format::Mail; 
     8use Storable; 
    89 
    910sub new { 
     
    4445} 
    4546 
     47sub permalink { 
     48    my $self = shift; 
     49    $self->{permalink} = shift if @_; 
     50    $self->{permalink} || $self->link; 
     51} 
     52 
     53sub clone { 
     54    my $self = shift; 
     55    my $clone = Storable::dclone($self); 
     56    $clone; 
     57} 
     58 
    46591; 
    4760 
  • trunk/plagger/lib/Plagger/Plugin/Splice/Tag.pm

    r58 r61  
    2727        for my $entry ($f->entries) { 
    2828            if ($self->match_tags($op, $entry, \@tags)) { 
    29                 # xxx don't we have to clone it? 
    30                 $feed->add_entry($entry); 
     29                $feed->add_entry($entry->clone); 
    3130            } 
    3231        } 
  • trunk/plagger/lib/Plagger/Plugin/Widget/Delicious.pm

    r36 r61  
    2525    $uri->query_form( 
    2626        v => 3, 
    27         url => $entry->link, 
     27        url => $entry->permalink, 
    2828        title => encode('utf-8', $entry->title), 
    2929    ); 
  • trunk/plagger/lib/Plagger/Plugin/Widget/HatenaBookmark.pm

    r36 r61  
    2323    my($self, $entry) = @_; 
    2424    my $uri = URI->new('http://b.hatena.ne.jp/append'); 
    25     $uri->query($entry->link); 
     25    $uri->query($entry->permalink); 
    2626 
    2727    my $url = HTML::Entities::encode($uri->as_string); 
  • trunk/plagger/templates/plugins/gmail_notify.tt

    r34 r61  
    1616[% IF entry.body.match('(?i)^<p[ >]') %][% entry.body %][% ELSE %]<div style="padding: 1em 0">[% entry.body %]</div>[% END %] 
    1717[% ELSE %]<br />[% END %] 
    18 <div style="font-size:0.8em">[% IF entry.date %]Posted on [% entry.date.format('Mail') %][% END %] | <a href="[% link | html %]">permalink</a> | <a href="[% feed.link | html %]">[% feed.title | html %]</a>[% FOREACH widget = entry.widgets %] | [% widget.html(entry) %][% END %]<br clear="all" /></div> 
     18<div style="font-size:0.8em">[% IF entry.date %]Posted on [% entry.date.format('Mail') %][% END %] | <a href="[% entry.permalink | html %]">permalink</a> | <a href="[% feed.link | html %]">[% feed.title | html %]</a>[% FOREACH widget = entry.widgets %] | [% widget.html(entry) %][% END %]<br clear="all" /></div> 
    1919</div> 
    2020[% UNLESS loop.last %]<hr />[% END %] 
  • trunk/plagger/templates/plugins/psp.tt

    r36 r61  
    1818[% IF item.body.match('(?i)^<p[ >]') %][% item.body %][% ELSE %]<div class="item_body">[% item.body %]</div>[% END %] 
    1919[% ELSE %]<br />[% END %] 
    20 <div class="post">[% IF item.date %]Posted on [% item.date.format('Mail') %][% END %] | <a href="[% link | html %]">permalink</a> | <a href="[% feed.link | html %]">[% (feed.title || '(no-title)') | html %]</a>[% FOREACH widget = item.widgets %] | [% widget.html(item) %][% END %]<br clear="all" /></div> 
     20<div class="post">[% IF item.date %]Posted on [% item.date.format('Mail') %][% END %] | <a href="[% entry.permalink | html %]">permalink</a> | <a href="[% feed.link | html %]">[% (feed.title || '(no-title)') | html %]</a>[% FOREACH widget = item.widgets %] | [% widget.html(item) %][% END %]<br clear="all" /></div> 
    2121</div> 
    2222[% END %]