[Koha] Custom bulkmarcimport.pl

Stephen Hedges shedges at skemotah.com
Wed May 5 06:13:09 NZST 2004


Tim McMahon - West Liberty Public Library said:
> The "Migrating to Koha" document mentions using bulkmarcimport.pl as a
> starting point to make scripts for cleaning copyright dates and to allow
> imports of more than one subject per record.  I was wondering if anyone
> already had scripts to do these things.

OK, I'll share.

The attached script (import) is the one used at Nelsonville Public
Library.  As you can tell from a quick look, it's pretty messy.  Things
have been added as needed and commented out as they were no longer needed.
 It ain't pretty, but it works.

The script starts by taking the name of a (iso2709) file of MARC records
and building a new file (called 'bibs') after splitting the existing
holdings tag into two separate tags.  (This allows some holdings
information to be mapped to biblioitems, and other information to be
mapped to items.)

This new file is then run through the relevant portion of the original
bulkmarcimport.pl script.

After that the script does some clean-up operations on the data that was
just loaded into the old-Koha tables.

Finally, the script deletes the files to clean the directory and prepare
it for the next day's file of records.  (NPL uses a separate utility for
cataloging and building the import file, then ftp's the file to the Koha
server and runs the import script.  If somebody forgets to ftp the current
day's file, and the pervious day's file still exists, then the previous
day's records are loaded a second time when import is run.)

-- 
Stephen Hedges
Skemotah Solutions, USA
www.skemotah.com  --  shedges at skemotah.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: import
Type: application/octet-stream
Size: 8539 bytes
Desc: not available
Url : http://lists.katipo.co.nz/pipermail/koha/attachments/20040504/f847acfa/import-0001.obj


More information about the Koha mailing list