8 |
|
|
9 |
our $q = 'AD=Croatia'; |
our $q = 'AD=Croatia'; |
10 |
my $range_size = 500; |
my $range_size = 500; |
11 |
my $overlap = 10; # between previous and this range |
my $overlap = 3; # between previous and this range |
12 |
|
my $skip_results = 1; |
13 |
$q = 'TS=psychology AND AD=Croatia' if @ARGV; # FIXME debug |
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 |
our @ranges; |
|
17 |
|
if ( 0 ) { |
18 |
|
$q = 'TS=psychology AND AD=Croatia'; |
19 |
|
$range_size = 50; |
20 |
|
$overlap = 0; |
21 |
|
$max_cites = 50; |
22 |
|
} |
23 |
|
|
24 |
use WWW::Mechanize; |
use WWW::Mechanize; |
25 |
use Data::Dump qw(dump); |
use Data::Dump qw(dump); |
31 |
); |
); |
32 |
|
|
33 |
our $step = 0; |
our $step = 0; |
34 |
|
our @ranges; |
35 |
|
|
36 |
my $dir = '/tmp/isi/'; |
my $dir = '/tmp/isi/'; |
37 |
rmtree $dir if -e $dir; |
rmtree $dir if -e $dir; |
171 |
|
|
172 |
my @y = sort keys %$years; |
my @y = sort keys %$years; |
173 |
|
|
174 |
|
@ranges = (); |
175 |
|
|
176 |
|
if ( $cites_by_year ) { |
177 |
|
push @ranges, [ $_ ] foreach @y; |
178 |
|
warn "# cites_by_year ranges ", dump @ranges; |
179 |
|
return; |
180 |
|
} |
181 |
|
|
182 |
my $y = shift @y; |
my $y = shift @y; |
183 |
my $size = $years->{$y}; |
my $size = $years->{$y}; |
184 |
|
|
|
@ranges = (); |
|
185 |
my $cites_range; |
my $cites_range; |
186 |
$cites_range = [$y] if $y; |
$cites_range = [$y] if $y; |
187 |
|
|
210 |
|
|
211 |
search; |
search; |
212 |
years; |
years; |
213 |
get_results; |
get_results unless $skip_results; |
214 |
|
|
215 |
|
|
216 |
citations; |
citations; |
220 |
if ( @ranges ) { |
if ( @ranges ) { |
221 |
$part .= $ranges[0]->[0] . '.'; |
$part .= $ranges[0]->[0] . '.'; |
222 |
search; |
search; |
223 |
|
citations; |
224 |
} |
} |
225 |
$part .= 'citing'; |
$part .= 'citing'; |
226 |
get_results $part; |
get_results $part; |