Lines 64-69
Only index the supplied biblionumber, mostly for testing purposes. May be
Link Here
|
64 |
repeated. This also applies to authorities via authid, so if you're using it, |
64 |
repeated. This also applies to authorities via authid, so if you're using it, |
65 |
you probably only want to do one or the other at a time. |
65 |
you probably only want to do one or the other at a time. |
66 |
|
66 |
|
|
|
67 |
=item B<-sbn|--start-bnumber> |
68 |
|
69 |
Only index biblios with biblionumber greater or equal than supplied |
70 |
biblionumber. |
71 |
|
72 |
=item B<-ebn|--end-bnumber> |
73 |
|
74 |
Only index biblios with biblionumber less or equal to supplied biblionumber. |
75 |
|
67 |
=item B<-v|--verbose> |
76 |
=item B<-v|--verbose> |
68 |
|
77 |
|
69 |
By default, this program only emits warnings and errors. This makes it talk |
78 |
By default, this program only emits warnings and errors. This makes it talk |
Lines 94-102
use Pod::Usage;
Link Here
|
94 |
|
103 |
|
95 |
my $verbose = 0; |
104 |
my $verbose = 0; |
96 |
my $commit = 5000; |
105 |
my $commit = 5000; |
97 |
my ($delete, $help, $man); |
106 |
my ( |
98 |
my ($index_biblios, $index_authorities); |
107 |
$delete, |
99 |
my (@biblionumbers); |
108 |
$help, |
|
|
109 |
$man, |
110 |
$index_biblios, |
111 |
$index_authorities, |
112 |
@biblionumbers, |
113 |
$start_biblionumber, |
114 |
$end_biblionumber |
115 |
); |
100 |
|
116 |
|
101 |
$|=1; # flushes output |
117 |
$|=1; # flushes output |
102 |
|
118 |
|
Lines 106-111
GetOptions(
Link Here
|
106 |
'a|authorities' => \$index_authorities, |
122 |
'a|authorities' => \$index_authorities, |
107 |
'b|biblios' => \$index_biblios, |
123 |
'b|biblios' => \$index_biblios, |
108 |
'bn|bnumber=i' => \@biblionumbers, |
124 |
'bn|bnumber=i' => \@biblionumbers, |
|
|
125 |
'sbn|start-bnumber=i' => \$start_biblionumber, |
126 |
'ebn|end-bnumber=i' => \$end_biblionumber, |
109 |
'v|verbose+' => \$verbose, |
127 |
'v|verbose+' => \$verbose, |
110 |
'h|help' => \$help, |
128 |
'h|help' => \$help, |
111 |
'man' => \$man, |
129 |
'man' => \$man, |
Lines 131-137
if ($index_biblios) {
Link Here
|
131 |
return ($r, Koha::BiblioUtils->get_from_biblionumber($r, item_data => 1 )); |
149 |
return ($r, Koha::BiblioUtils->get_from_biblionumber($r, item_data => 1 )); |
132 |
}; |
150 |
}; |
133 |
} else { |
151 |
} else { |
134 |
my $records = Koha::BiblioUtils->get_all_biblios_iterator(); |
152 |
my $records = Koha::BiblioUtils->get_all_biblios_iterator({ |
|
|
153 |
'start_biblionumber' => $start_biblionumber, |
154 |
'end_biblionumber' => $end_biblionumber, |
155 |
}); |
135 |
$next = sub { |
156 |
$next = sub { |
136 |
$records->next(); |
157 |
$records->next(); |
137 |
} |
158 |
} |
138 |
- |
|
|