From d2730dcd258076888f6117869874ccb04efbc6b1 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 21 Jul 2011 04:37:38 +0000 Subject: addnote function should be working git-svn-id: https://svn.helsinki.at/rhimport/trunk@83 7c65635b-ec39-4f67-a626-873dbafdd612 diff --git a/rhimport-dn b/rhimport-dn index fcfa7e9..0b95049 100755 --- a/rhimport-dn +++ b/rhimport-dn @@ -92,7 +92,7 @@ for my $entry ($feed->entries) { my $ff = File::Fetch->new(uri => $entry->enclosure->url); print $1 . ": downloading " . $entry->enclosure->url . " (" . $entry->enclosure->length . " Bytes) .. "; - $file = "test"; #$ff->fetch( to => '/tmp' ) or die $ff->error; + $file = $ff->fetch( to => '/tmp' ) or die $ff->error; print "ok\n"; print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; @@ -103,6 +103,7 @@ for my $entry ($feed->entries) { local $SIG{CHLD} = 'DEFAULT'; my $pid = open3($writer, $reader, $error, @PV_SCRIPT); print $writer $sum_title . "\n" . $sum_text; + close $writer; waitpid $pid, 0; my $out = join('', <$reader>); my $errstr = ""; @@ -123,8 +124,6 @@ for my $entry ($feed->entries) { (-e "$file") or die "file '$file' not found - donwload error?\n"; print "will import $file to dropbox $dropbox (cart=$to_cart)\n\n"; -exit 0 - my $error_cb = sub { my ($text) = @_; -- cgit v0.10.2