/[webpac2]/trunk/bin/isi-download-results.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/isi-download-results.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1294 by dpavlin, Sat Sep 19 22:54:45 2009 UTC revision 1331 by dpavlin, Sun Apr 18 10:56:01 2010 UTC
# Line 9  use strict; Line 9  use strict;
9  our $q = 'AD=Croatia';  our $q = 'AD=Croatia';
10  my $range_size = 500;  my $range_size = 500;
11  my $overlap    = 3; # between previous and this range  my $overlap    = 3; # between previous and this range
12    my $skip_results = 1;
13    my $cites_by_year = 1;
14    
15  my $max_cites = 5000; # ISI limit to get cites  my $max_cites = 5000; # ISI limit to get cites
16    
# Line 19  if ( 0 ) { Line 21  if ( 0 ) {
21          $max_cites  = 50;          $max_cites  = 50;
22  }  }
23    
24    $q = join(' ', @ARGV) if @ARGV;
25    
26  use WWW::Mechanize;  use WWW::Mechanize;
27  use Data::Dump qw(dump);  use Data::Dump qw(dump);
28  use File::Path;  use File::Path;
# Line 32  our $step = 0; Line 36  our $step = 0;
36  our @ranges;  our @ranges;
37    
38  my $dir = '/tmp/isi/';  my $dir = '/tmp/isi/';
39  rmtree $dir if -e $dir;  #rmtree $dir if -e $dir;
40  mkdir $dir;  mkdir $dir unless -d $dir;
41    
42  sub save_mech {  sub save_mech {
43          my $path = shift;          my $path = shift;
# Line 169  sub years { Line 173  sub years {
173    
174          my @y = sort keys %$years;          my @y = sort keys %$years;
175    
176            @ranges = ();
177    
178            if ( $cites_by_year ) {
179                    push @ranges, [ $_ ] foreach @y;
180                    warn "# cites_by_year ranges ", dump @ranges;
181                    return;
182            }
183    
184          my $y = shift @y;          my $y = shift @y;
185          my $size = $years->{$y};          my $size = $years->{$y};
186    
         @ranges = ();  
187          my $cites_range;          my $cites_range;
188          $cites_range = [$y] if $y;          $cites_range = [$y] if $y;
189    
# Line 201  sub years { Line 212  sub years {
212    
213  search;  search;
214  years;  years;
215  get_results;  get_results unless $skip_results;
216    
217    
218  citations;  citations;

Legend:
Removed from v.1294  
changed lines
  Added in v.1331

  ViewVC Help
Powered by ViewVC 1.1.26