Plagger Hacks
Filter::HatenaKeywordTagは$bodyが無いとエラるから、実用的じゃないからtitleも追加。
むしろtitleとbody両方でextractしたほうがよさげ。
Publish::HatenaBookmarkは今のままだとentryごとにrule適用できなくて嫌な感じなのでregister_hookの順番をいれかえ。
Plaggerはregister_hookで宣言されたhookの先頭のみをruleで見るのでregister_hookの順番には気を使うべき。ただし、ごにょごにょするとこの条件は正しくない。
Index: Filter/HatenaKeywordTag.pm =================================================================== --- Filter/HatenaKeywordTag.pm (revision 744) +++ Filter/HatenaKeywordTag.pm (working copy) @@ -16,7 +16,7 @@ my $title = $args->{entry}->title; my $body = $args->{entry}->body; Encode::_utf8_off($body); # Hatena::Keyword's Bug? - my $keywords = Hatena::Keyword->extract($body); + my $keywords = Hatena::Keyword->extract("$title$body"); my @terms = sort { $a->refcount <=> $b->refcount } @$keywords; for my $term (@terms) { Index: Publish/HatenaBookmark.pm =================================================================== --- Publish/HatenaBookmark.pm (revision 744) +++ Publish/HatenaBookmark.pm (working copy) @@ -11,8 +11,8 @@ my($self, $context) = @_; $context->register_hook( $self, + 'publish.entry.fixup' => \&add_entry, 'publish.init' => \&initialize, - 'publish.entry.fixup' => \&add_entry, ); }