diff options
author | Christian Pointner <equinox@helsinki.at> | 2012-01-20 22:54:46 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2012-01-20 22:54:46 (GMT) |
commit | 5c15154a15840173ca8167bb0bbb3db32290ce41 (patch) | |
tree | b2f59ab1f9d0cc4f1820fdcf3eb13d22dc3aa4b9 /rhimport-dn | |
parent | fed2da097618da584b71637b50204666fe304ee1 (diff) |
moved pv add note to rhimport modul
Diffstat (limited to 'rhimport-dn')
-rwxr-xr-x | rhimport-dn | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/rhimport-dn b/rhimport-dn index b228bf0..d712c9b 100755 --- a/rhimport-dn +++ b/rhimport-dn @@ -134,25 +134,7 @@ for my $entry ($headlines_feed->entries) { print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; push(@PV_SCRIPT, sprintf("%04d-%02d-%02d", $today[0], $today[1], $today[2])); - my ($reader, $writer, $error ) = ( new IO::Handle, new IO::Handle, new IO::Handle ); - $writer->autoflush(1); - local $SIG{CHLD} = 'DEFAULT'; - my $pid = open3($writer, $reader, $error, @PV_SCRIPT); - binmode($reader, ":utf8"); - binmode($writer, ":utf8"); - binmode($error, ":utf8"); - print $writer $sum_title . "\n" . $sum_text; - close $writer; - waitpid $pid, 0; - if ( $? >> 8 ) { - print "\n\nPV: adding note returned non-zero value\n"; - print "STDERR:\n" . join('', <$error>) . "\n"; - print "STDOUT:\n" . join('', <$reader>) . "\n"; - print "Ignoring failed headline import!\n"; - } else { - print join('', <$reader>) . "\n"; - print join('', <$error>) . "\n"; - } + rhimport::pv_add_note($sum_title, $sum_text, @PV_SCRIPT); print "\n"; } } |