Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use warnings;
- use WebService::Google::Reader;
- use Net::Growl;
- use Getopt::Long;
- use FindBin;
- use YAML::Tiny;
- use Data::Dumper;
- $XML::Atom::ForceUnicode = 1;
- my $AppName = "GoogleReader Growler";
- my $path = File::Spec->catfile($FindBin::Bin, 'config.yaml');
- GetOptions('--config=s', \$path);
- my $config = get_preferences($path);
- Net::Growl::register(
- host => 'localhost',
- application => $AppName,
- password => $config->{growl}->{password},
- );
- my $reader = WebService::Google::Reader->new(
- username => $config->{google}->{username},
- password => $config->{google}->{password},
- );
- foreach my $entry ($reader->unread(count => 10)->entries) {
- Net::Growl::notify(
- application => $AppName,
- title => $entry->title,
- description => $entry->content->body,
- password => $config->{growl}->{password},
- );
- }
- sub get_preferences {
- YAML::Tiny::LoadFile(shift);
- }
Add Comment
Please, Sign In to add comment