specify query as command-line params
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 18 Apr 2010 10:56:01 +0000 (10:56 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 18 Apr 2010 10:56:01 +0000 (10:56 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1331 07558da8-63fa-0310-ba24-9fe276d99e06

bin/isi-download-results.pl

index 3a385e8..9f7c971 100755 (executable)
@@ -21,6 +21,8 @@ if ( 0 ) {
        $max_cites  = 50;
 }
 
+$q = join(' ', @ARGV) if @ARGV;
+
 use WWW::Mechanize;
 use Data::Dump qw(dump);
 use File::Path;
@@ -34,8 +36,8 @@ our $step = 0;
 our @ranges;
 
 my $dir = '/tmp/isi/';
-rmtree $dir if -e $dir;
-mkdir $dir;
+#rmtree $dir if -e $dir;
+mkdir $dir unless -d $dir;
 
 sub save_mech {
        my $path = shift;