root/trunk/plagger/lib/Plagger/Plugin/Subscription/Odeo.pm

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

Added Odeo plugin. Refs #43

  • Property svn:keywords set to Id Revision
Line 
1 package Plagger::Plugin::Subscription::Odeo;
2 use strict;
3 use base qw( Plagger::Plugin::Subscription::OPML );
4
5 sub register {
6     my($self, $context) = @_;
7
8     $context->register_hook(
9         $self,
10         'subscription.load' => \&load,
11     );
12 }
13
14 sub load {
15     my($self, $context) = @_;
16
17     my $account = $self->conf->{account}
18         or $context->error("config 'account' is missing");
19
20     my $uri = URI->new("http://www.odeo.com/profile/$account/opml.xml");
21     $self->load_opml($context, $uri);
22 }
23
24 1;
25
26 __END__
27
28 =head1 NAME
29
30 Plagger::Plugin::Subscrption::Odeo - Odeo Subscription via OPML
31
32 =head1 SYNOPSIS
33
34   - module: Subscription::Odeo
35     config:
36       account: TatsuhikoMiyagawa
37
38 =head1 DESCRIPTION
39
40 This plugin creates Subscription by fetching Odeo
41 L<http://www.odeo.com/> OPML by HTTP.
42
43 =head1 NOTE
44
45 As of this module writing, The way Odeo escapes HTML entities and URLs
46 in their OPML is kind of wrong. We should probably use C<rss.xml> or
47 C<pcast.xml> they provide and synchronizes enclosures as well, ala
48 Bloglines Subscription plugin.
49
50 =head1 AUTHOR
51
52 Tatsuhiko Miyagawa
53
54 =head1 SEE ALSO
55
56 L<Plagger>, L<Plagger::Plugin::Subscription::OPML>
57
58 =cut
Note: See TracBrowser for help on using the browser.