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 $length; |
39 |
my $where; |
40 |
my $offset; |
37 |
my $verbose_logging = 0; |
41 |
my $verbose_logging = 0; |
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-57
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, |
54 |
'v+' => \$verbose_logging, |
58 |
'l:i' => \$item_limit, |
|
|
59 |
'where:s' => \$where, |
60 |
'length:i' => \$length, |
61 |
'offset:i' => \$offset, |
62 |
'v+' => \$verbose_logging, |
55 |
); |
63 |
); |
56 |
|
64 |
|
57 |
|
65 |
|
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 $length } if ($length && !$offset); |
308 |
$strsth.=qq{ LIMIT $offset,$length } if ($length && $offset); |
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 $length } if ($length && !$offset); |
318 |
$strsth.=qq{ LIMIT $offset,$length } if ($offset); |
319 |
my $sth = $dbh->prepare($strsth); |
304 |
$sth->execute(); |
320 |
$sth->execute(); |
305 |
return $sth; |
321 |
return $sth; |
306 |
} |
322 |
} |
Lines 635-645
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 |
Use log level 2 (-v -v) to include all Zebra logs. |
658 |
Use log level 2 (-v -v) to include all Zebra logs. |
641 |
|
659 |
|
642 |
-munge-config Deprecated option to try |
660 |
--length 1234 how many biblio you want to export |
|
|
661 |
--offset 1243 offset you want to start to |
662 |
example: --offset 500 --length=500 will result in a LIMIT 500,1000 (exporting 1000 records, starting by the 500th one) |
663 |
note that the numbers are NOT related to biblionumber, that's the intended behaviour. |
664 |
--where let you specify a WHERE query, like itemtype='BOOK' |
665 |
or something like that |
666 |
|
667 |
--munge-config Deprecated option to try |
643 |
to fix Zebra config files. |
668 |
to fix Zebra config files. |
644 |
--help or -h show this message. |
669 |
--help or -h show this message. |
645 |
_USAGE_ |
670 |
_USAGE_ |
646 |
- |
|
|