]> git.donarmstrong.com Git - bin.git/commitdiff
tweak get_pdf
authorDon Armstrong <don@donarmstrong.com>
Mon, 24 May 2010 23:26:45 +0000 (23:26 +0000)
committerDon Armstrong <don@donarmstrong.com>
Mon, 24 May 2010 23:26:45 +0000 (23:26 +0000)
get_pdf
renamepic

diff --git a/get_pdf b/get_pdf
index 7daca792fc7f6332a7e11121b83bb3ad4b211b0b..0aadc600c1935f0e5f5a8f775355b2dbdaaece48 100755 (executable)
--- a/get_pdf
+++ b/get_pdf
@@ -133,11 +133,11 @@ if ($options{pmid}) {
        };
        if ($@) {
            print STDERR "$@\n" if $DEBUG;
-           ## system('links',
-           ##     exists $options{http_proxy}?('-http-proxy',$options{http_proxy}):(),
-           ##     $url
-           ##    ) == 0 or next;
-           ## rename('temp.pdf',"${pmid}.pdf") if -e 'temp.pdf';
+           system('links',
+                  exists $options{http_proxy}?('-http-proxy',$options{http_proxy}):(),
+                  $url
+                 ) == 0 or next;
+           rename('temp.pdf',"${pmid}.pdf") if -e 'temp.pdf';
        }
     }
 }
@@ -190,10 +190,10 @@ sub find_pdf_link {
            return $pdf_m;
        }
     }
-    if ($guess and defined $best_guess) {
-       $m->get($best_guess->url_abs());
-       return $m;
-    }
+    if ($guess and defined $best_guess) {
+#      $m->get($best_guess->url_abs());
+#      return $m;
+    }
     return undef;
 }
 
index 9d6545e2bcfce31cc53587d05d75b9a22d28bf20..a248e6806ef8e6cd79d901e6fe69bbf6d4802d4d 100755 (executable)
--- a/renamepic
+++ b/renamepic
@@ -40,7 +40,7 @@ my $config = {counter_start => 1,
 
 ($config->{program_name}) = $0 =~/([^\/]+)\s*$/;
 
-GetOptions($config,'counter_start|c=i','renumber_only|r!');
+GetOptions($config,'counter_start|c=i','renumber_only|renumber-only|r!');
 
 if ($#ARGV < 0) {
      print STDERR "No Directory Specified\nUsage:  $config->{program_name} <directory>\n";