diff options
author | Christian Pointner <equinox@helsinki.at> | 2013-03-19 00:57:38 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2013-03-19 00:57:38 (GMT) |
commit | 8a971b1e5429b4e26a09f43495a50c3bbe7f7957 (patch) | |
tree | c6b4fda1b8941bb03ffbe22e3155ca40ca8dbba9 | |
parent | aa247d1c2b41265fd74e8f79e79cc87040d75598 (diff) |
fixed rhimport-zfw
-rwxr-xr-x | rhimport-zfw | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rhimport-zfw b/rhimport-zfw index a0759a7..012db4b 100755 --- a/rhimport-zfw +++ b/rhimport-zfw @@ -24,6 +24,7 @@ use strict; use DBI; use Date::Calc; +use Time::localtime; use XML::Feed; use XML::Feed::Entry; use XML::Feed::Content; @@ -85,7 +86,7 @@ if(localtime->hour >= 12) { print "day of original broadcast: " . Date::Calc::Date_to_Text(@broadcast_day) . "\n"; print "day of Radio Helsinki broadcast: " . Date::Calc::Date_to_Text(@import_day) . "\n"; -my $id = sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]); +my $id = sprintf("%04d-%02d-%02d", $import_day[0], $import_day[1], $import_day[2]); my $bd = sprintf("%04d-%02d-%02d", $broadcast_day[0], $broadcast_day[1], $broadcast_day[2]); print "looking for files from $bd in RSS Feed\n"; print " -> $RSS_URL\n"; @@ -114,7 +115,7 @@ for my $entry ($feed->entries) { my $ff = File::Fetch->new(uri => $url); next unless (uc($ff->output_file) =~ $bdfile); # file not from correct day - my $sum_title = decode_entities($entry->title); + my ($sum_title, $sum_title_rest) = split(/:/, decode_entities($entry->title), 2); my $sum_text = decode_entities($entry->content->body); my $current_stat = `cat $STAT_FILE`; |