From: Don Armstrong Date: Mon, 24 May 2010 23:26:45 +0000 (+0000) Subject: tweak get_pdf X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=93a2dbfd57977eea33cf6227eaea5c4682f73094;p=bin.git tweak get_pdf --- diff --git a/get_pdf b/get_pdf index 7daca79..0aadc60 100755 --- 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; } diff --git a/renamepic b/renamepic index 9d6545e..a248e68 100755 --- 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} \n";