root/lang/perl/plagger/lib/Plagger/Plugin/Notify/J405board.pm

Revision 17278, 1.1 kB (checked in by hashy1126, 4 months ago)

Plagger::Plugin::Notify::J405board追加

Line 
1package Plagger::Plugin::Notify::J405board;
2use strict;
3use Encode;
4use base qw( Plagger::Plugin );
5
6sub init {
7    my $self = shift;
8    $self->SUPER::init(@_);
9}
10
11sub register {
12    my($self, $context) = @_;
13    $context->register_hook(
14        $self,
15        'publish.feed' => \&update,
16    );
17}
18
19sub update {
20    my($self, $context, $args) = @_;
21    my $prog = '\\work\\J405board\\J405board_client';
22   
23#    system($prog, encode('shift-jis', "*Kansai.pm Plagger DEMO*"));
24#    Time::HiRes::sleep(5);
25
26    system($prog, encode('shift-jis', $args->{feed}->title_text));
27    Time::HiRes::sleep(5);
28   
29    foreach my $entry ($args->{feed}->entries) {
30#        system($prog, encode('shift-jis', "*Kansai.pm Plagger DEMO*"));
31#        Time::HiRes::sleep(5);
32
33        system($prog, encode('shift-jis', $entry->title));
34        Time::HiRes::sleep(5);
35
36    }
37}
38
391;
40
41__END__
42
43=head1 NAME
44
45Plagger::Plugin::Notify::J405board - Notify feed updates to J405 board
46
47=head1 SYNOPSIS
48
49  - module: Notify::J405board
50
51=head1 DESCRIPTION
52
53This plugin allows you to notify feed updates to J405 board.
54
55=head1 AUTHOR
56
57hashy1126
58
59=head1 SEE ALSO
60
61L<Plagger>,
62
63=cut
Note: See TracBrowser for help on using the browser.