root/trunk/plagger/lib/Plagger/Plugin/Filter/2chNewsokuTitle.pm

Revision 1294 (checked in by miyagawa, 14 years ago)

remove un-use()ed modules

  • Property svn:keywords set to Id Revision
Line 
1 package Plagger::Plugin::Filter::2chNewsokuTitle;
2 use strict;
3 use base qw( Plagger::Plugin );
4
5 sub register {
6     my($self, $context) = @_;
7     $context->register_hook(
8         $self,
9         'update.entry.fixup' => \&update,
10     );
11 }
12
13 sub update {
14     my($self, $context, $args) = @_;
15
16     my $tags  = $args->{entry}->tags;
17     my $title = $args->{entry}->title;
18     $title = "\x{3010}$tags->[0]\x{3011} " . $title if $tags->[0];
19     $title = $title . " \x{3010}$tags->[1]\x{3011}" if $tags->[1];
20
21     $args->{entry}->title($title);
22 }
23
24 1;
25
26 __END__
27
28 =head1 NAME
29
30 Plagger::Plugin::Filter::2chNewsokuTitle - Newsokuize entry titles
31
32 =head1 SYNOPSIS
33
34   - module: Filter::2chNewsokuTitle
35
36 =head1 DESCRIPTION
37
38 This plugin uses entry tags to be prepended and appended to title, ala
39 2ch.net Newsoku style. Best used with plugin Filter::BulkfeedsTerms.
40
41 =head1 AUTHOR
42
43 Tatsuhiko Miyagawa
44
45 =head1 SEE ALSO
46
47 L<Plagger>, L<Plagger::Plugin::Filter::BulkfeedsTerms>
48
49 =cut
Note: See TracBrowser for help on using the browser.