[Koha] Koha from scratch.

MJ Ray mjr at dsl.pipex.com
Fri Jun 18 15:09:01 NZST 2004


On 2004-06-17 21:01:41 +0100 Milton Calnek <milton at calnek.com> wrote:

> i have all these books and i was hoping that i could build a list
> of isbn's and get a script from koha to do the real work of importing
> them into my library.  my understanding is that the z39.50 protocol
> is supposed to do this/help with it.

Copy the zm.pl example from "man MARC::Doc::Tutorial" and edit 
databaseName and connect details. Then, replace the last block with 
something like:

open(OUTFILE,">>zresults.marc");
for (my $ii = 1; $ii <= $numrec; $ii++) {
     my $zrec = $rs->record($ii);
     my $mrec = MARC::Record->new_from_usmarc($zrec->rawdata());
     print $mrec->as_formatted, "\n\n";
     print OUTFILE $mrec->as_usmarc();
}
close(OUTFILE);

Once run on some ISBNs (probably want to use xargs to run it with 
batches of numbers read from a file), you can upload zresults.marc to 
your breeding farm. You will still need to add the books.

-- 
MJR/slef
My Opinion Only and possibly not of any group I know.
http://www.ttllp.co.uk/ for creative copyleft computing
Help hack the EuroParl! http://mjr.towers.org.uk/proj/eurovote/



More information about the Koha mailing list