Lines 34-39
my $want_help;
Link Here
|
34 |
my $as_xml; |
34 |
my $as_xml; |
35 |
my $process_zebraqueue; |
35 |
my $process_zebraqueue; |
36 |
my $do_not_clear_zebraqueue; |
36 |
my $do_not_clear_zebraqueue; |
|
|
37 |
my $item_limit; |
38 |
my $min; |
39 |
my $where; |
40 |
my $ofset; |
37 |
my $verbose_logging; |
41 |
my $verbose_logging; |
38 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
42 |
my $zebraidx_log_opt = " -v none,fatal,warn "; |
39 |
my $result = GetOptions( |
43 |
my $result = GetOptions( |
Lines 51-56
my $result = GetOptions(
Link Here
|
51 |
'x' => \$as_xml, |
55 |
'x' => \$as_xml, |
52 |
'y' => \$do_not_clear_zebraqueue, |
56 |
'y' => \$do_not_clear_zebraqueue, |
53 |
'z' => \$process_zebraqueue, |
57 |
'z' => \$process_zebraqueue, |
|
|
58 |
'l:i' => \$item_limit, |
59 |
'where:s' => \$where, |
60 |
'min:i' => \$min, |
61 |
'ofset:i' => \$ofset, |
54 |
'v' => \$verbose_logging, |
62 |
'v' => \$verbose_logging, |
55 |
); |
63 |
); |
56 |
|
64 |
|
Lines 294-306
sub select_all_records {
Link Here
|
294 |
} |
302 |
} |
295 |
|
303 |
|
296 |
sub select_all_authorities { |
304 |
sub select_all_authorities { |
297 |
my $sth = $dbh->prepare("SELECT authid FROM auth_header"); |
305 |
my $strsth=qq{SELECT authid FROM auth_header}; |
|
|
306 |
$strsth.=qq{ WHERE $where } if ($where); |
307 |
$strsth.=qq{ LIMIT $min } if ($min && !$ofset); |
308 |
$strsth.=qq{ LIMIT $ofset,$min } if ($min && $ofset); |
309 |
my $sth = $dbh->prepare($strsth); |
298 |
$sth->execute(); |
310 |
$sth->execute(); |
299 |
return $sth; |
311 |
return $sth; |
300 |
} |
312 |
} |
301 |
|
313 |
|
302 |
sub select_all_biblios { |
314 |
sub select_all_biblios { |
303 |
my $sth = $dbh->prepare("SELECT biblionumber FROM biblioitems ORDER BY biblionumber"); |
315 |
my $strsth = qq{ SELECT biblionumber FROM biblioitems }; |
|
|
316 |
$strsth.=qq{ WHERE $where } if ($where); |
317 |
$strsth.=qq{ LIMIT $min } if ($min && !$ofset); |
318 |
$strsth.=qq{ LIMIT $ofset,$min } if ($ofset); |
319 |
my $sth = $dbh->prepare($strsth); |
304 |
$sth->execute(); |
320 |
$sth->execute(); |
305 |
return $sth; |
321 |
return $sth; |
306 |
} |
322 |
} |
Lines 635-643
Parameters:
Link Here
|
635 |
the same records - specify -y to override this. |
651 |
the same records - specify -y to override this. |
636 |
Cannot be used with -z. |
652 |
Cannot be used with -z. |
637 |
|
653 |
|
|
|
654 |
-l set a maximum number of exported items per biblio. |
655 |
Doesn't work with -nosanitize. |
638 |
-v increase the amount of logging. Normally only |
656 |
-v increase the amount of logging. Normally only |
639 |
warnings and errors from the indexing are shown. |
657 |
warnings and errors from the indexing are shown. |
640 |
|
658 |
|
|
|
659 |
-min 1234 minimum biblionumber |
660 |
-ofset 1243 count biblios to process |
661 |
example: -min 1000 -ofset=500 will result in a LIMIT 500,1000 (exporting 1000 records, starting by the 500th one) |
662 |
note that the numbers are NOT related to biblionumber, that's the intended behaviour. |
663 |
|
664 |
-where let you specify a WHERE query, like itemtype='BOOK' |
665 |
or something like that |
666 |
|
641 |
-munge-config Deprecated option to try |
667 |
-munge-config Deprecated option to try |
642 |
to fix Zebra config files. |
668 |
to fix Zebra config files. |
643 |
--help or -h show this message. |
669 |
--help or -h show this message. |
644 |
- |
|
|