diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-03-12 05:17:14 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-03-12 05:17:14 (GMT) |
commit | 909b01375b6f90aa365e6085d81a58dbae98d9d4 (patch) | |
tree | 006b83bdb414f05c2cd65330250adb5e4863cf5a /rhautoimport-ra | |
parent | c29dcdf834efd8623ab20f34fd47e1e24ab619b2 (diff) |
some cleanups and syntactic improvements
Diffstat (limited to 'rhautoimport-ra')
-rwxr-xr-x | rhautoimport-ra | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rhautoimport-ra b/rhautoimport-ra index a531458..aaa1e0a 100755 --- a/rhautoimport-ra +++ b/rhautoimport-ra @@ -67,12 +67,12 @@ $today[2] = 1; my @broadcast_day = Date::Calc::Business_to_Standard(@today); $today[2] = 3; my @import_date = Date::Calc::Business_to_Standard(@today); -my @import_date_reb = Date::Calc::Add_Delta_Days($import_date[0], $import_date[1], $import_date[2], 3); +my @import_date_reb = Date::Calc::Add_Delta_Days(@import_date, 3); 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_date) . "\n"; print "day of Radio Helsinki rebroadcast: " . Date::Calc::Date_to_Text(@import_date_reb) . "\n"; -my $bd = sprintf("%04d-%02d-%02d", $broadcast_day[0], $broadcast_day[1], $broadcast_day[2]); +my $bd = sprintf("%04d-%02d-%02d", @broadcast_day); print "looking for files from $bd in RSS Feed\n"; print " -> $RSS_URL\n"; @@ -118,9 +118,9 @@ for my $entry ($feed->entries) { my $sum_text = decode_entities($entry->content->body); print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; - rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1"); + rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_date), "1"); print "\n"; - rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2"); + rhautoimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", @import_date_reb), "2"); print "\n"; last; |