2 # small script that import an iso2709 file into koha 2.0
7 use MARC::File::USMARC;
12 use Time::HiRes qw(gettimeofday);
15 my ( $input_marc_file, $number) = ('',0);
24 script to write files for zebra DB reindexing. Once it's done, run zebraidx update biblios
26 run the script with -c to confirm the reindexing.
33 $|=1; # flushes output
35 my $dbh = C4::Context->dbh;
36 my $cgidir = C4::Context->intranetdir."/";
38 my $starttime = gettimeofday;
39 my $sth = $dbh->prepare("select biblionumber from biblio");
42 while ((my $biblionumber) = $sth->fetchrow) {
43 my $record = GetMarcBiblio($biblionumber);
44 my $filename = $cgidir."/tmp/BIBLIO".$biblionumber.".iso2709";
46 print F $record->as_usmarc();
49 print "\r$i" unless ($i % 100);
51 my $timeneeded = gettimeofday - $starttime;
52 print "\n$i MARC record done in $timeneeded seconds\n";