| Plagger documentation | Contained in the Plagger distribution. |
Plagger::Plugin::Filter::2chNewsokuTitle - Newsokuize entry titles
- module: Filter::2chNewsokuTitle
This plugin uses entry tags to be prepended and appended to title, ala 2ch.net Newsoku style. Best used with plugin Filter::BulkfeedsTerms.
Tatsuhiko Miyagawa
| Plagger documentation | Contained in the Plagger distribution. |
package Plagger::Plugin::Filter::2chNewsokuTitle; use strict; use base qw( Plagger::Plugin ); sub register { my($self, $context) = @_; $context->register_hook( $self, 'update.entry.fixup' => \&update, ); } sub update { my($self, $context, $args) = @_; my $tags = $args->{entry}->tags; my $title = $args->{entry}->title; $title = "\x{3010}$tags->[0]\x{3011} " . $title if $tags->[0]; $title = $title . " \x{3010}$tags->[1]\x{3011}" if $tags->[1]; $args->{entry}->title($title); } 1; __END__