Created
March 4, 2009 19:15
-
-
Save laiso/73953 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Plagger::Plugin::Subscription::Bookmarks::Konqueror; | |
use strict; | |
use base qw( Plagger::Plugin::Subscription::Bookmarks ); | |
use XML::XBEL; | |
sub load { | |
my($self, $context) = @_; | |
my $xbel = XML::XBEL->new; | |
$xbel->parse_file($self->conf->{path}); | |
my @bookmarks = $xbel->bookmarks(); | |
$self->find_feed($context, @bookmarks); | |
} | |
sub find_feed { | |
my($self, $context, @bookmarks) = @_; | |
foreach my $bookmark(@bookmarks){ | |
my $feed = Plagger::Feed->new; | |
$feed->url($bookmark->href()); | |
$feed->title($bookmark->title()); | |
# $feed->tags(\@tags); | |
$context->subscription->add($feed); | |
} | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment