diff options
author | Christian Pointner <equinox@helsinki.at> | 2012-01-20 23:17:45 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2012-01-20 23:17:45 (GMT) |
commit | 7fcaad9eadba6a3968c2b24526ce69db3d1b4de0 (patch) | |
tree | dd55b9407548da9ea976ef87580c6310d0e52a42 /rhimport-rs | |
parent | b0e2a62cbc92cac628ff8d3565b2e310aad0c4c1 (diff) |
simpler interface to pv_add_note
git-svn-id: https://svn.helsinki.at/rhimport/trunk@118 7c65635b-ec39-4f67-a626-873dbafdd612
Diffstat (limited to 'rhimport-rs')
-rwxr-xr-x | rhimport-rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/rhimport-rs b/rhimport-rs index 13ea5a3..4e5f87f 100755 --- a/rhimport-rs +++ b/rhimport-rs @@ -42,8 +42,7 @@ my $DB = "rivendell"; my $STAT_FILE = $ENV{'HOME'} . "/rhimport-rs.stat"; my $RSS_URL = "http://cba.fro.at/seriesrss/197"; -my @PV_SCRIPT = ('/usr/bin/ssh', 'root@intranet', 'addnote', '75'); -my @PV_SCRIPT_REB = ('/usr/bin/ssh', 'root@intranet', 'addnote', '75'); +my $PV_ID = '75'; binmode(STDIN, ":utf8"); binmode(STDOUT, ":utf8"); @@ -114,12 +113,9 @@ for my $entry ($feed->entries) { print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; - push(@PV_SCRIPT, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2])); - rhimport::pv_add_note($sum_title, $sum_text, @PV_SCRIPT); + rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), 'n'); print "\n"; - - push(@PV_SCRIPT_REB, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2])); - rhimport::pv_add_note($sum_title, $sum_text, @PV_SCRIPT_REB); + rhimport::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]), 'r'); print "\n"; last; |