|
|
@ -71,7 +71,7 @@ sub load_config { |
|
|
|
_log(fatal => "Empty 'matches' section in feed") |
|
|
|
_log(fatal => "Empty 'matches' section in feed") |
|
|
|
unless (scalar @{ $feed->{matches} }); |
|
|
|
unless (scalar @{ $feed->{matches} }); |
|
|
|
|
|
|
|
|
|
|
|
foreach my $key (qw(type use lookup)) { |
|
|
|
foreach my $key (qw(use lookup)) { |
|
|
|
$feed->{$key} //= $config->{defaults}->{$key}; |
|
|
|
$feed->{$key} //= $config->{defaults}->{$key}; |
|
|
|
} |
|
|
|
} |
|
|
|
# TODO: more |
|
|
|
# TODO: more |
|
|
@ -144,6 +144,7 @@ sub process_feed { |
|
|
|
# gotcha! |
|
|
|
# gotcha! |
|
|
|
my $msg = sprintf "Got it! URL: %s (%s)", $entry->link, $entry->title; |
|
|
|
my $msg = sprintf "Got it! URL: %s (%s)", $entry->link, $entry->title; |
|
|
|
_log(info => $msg); |
|
|
|
_log(info => $msg); |
|
|
|
|
|
|
|
# TODO: handle 'use' feed option |
|
|
|
$urls->{$entry->link} = $entry->title; |
|
|
|
$urls->{$entry->link} = $entry->title; |
|
|
|
} |
|
|
|
} |
|
|
|
$feedconf->{lastseen} = $time; |
|
|
|
$feedconf->{lastseen} = $time; |
|
|
|