bibsys2koha - scripts for migrating from BIBSYS to Koha
BIBSYS is a Norwegian ILS, used by academic and special libraries. Koha is the world's first (and coolest) free software ILS. The scripts provided by bibsys2koha are meant to facilitate a migration from BIBSYS to Koha.
Run Perl scripts with the -h option for details about what each script does and what arguments can be supplied.
migrate-sample.sh is an example of how the other scripts can be tied together to do a migration
prep.sh - Prepares the files for use with items.pl
items.pl - Assemble records and item info into a MARCXML file that can be imported into Koha
The export from BIBSYS will typically consist of two files:
.mrk - MARC records in line format
.dok - items in MARC line format
or:
- *-objektposter.txt - MARC records in line format
- *-dokumentposter.txt - items in MARC line format
Records in both files contain a 000 field with a record identifier (called Objektid in BIBSYS), which can be used to link items to records. E.g.:
*00097015822x
Here, 97015822x is the record identifier and *000 designates the field.
- 1 Make sure you are in the same directory as the unzipped export from BIBSYS
- 2 Run prep.sh. This will result in two new files: records.mrk and items.txt.
- 3 Convert from .mrk to .mrc by running the line2iso.pl script from LibrioTools ( https://github.com/MagnusEnger/LibrioTools )
- 4 Prepare the config files as desribed in the POD of items.pl.
- 5 Run items.pl. This will result in a MARCXML file containing records and items, which can be imported into Koha.
- 6 Run bulkmarcimport.pl from Koha. Remember to use the "-m MARCXML" switch.
- 7 Run rebuild_zebra.pl from Koha.
If the library that is being migrated has barcodes connected to DOKIDs, the barcodes might not be part of the exported item information, but might come in a separate file. This file contains DOKIDs and barcodes separated by a space. To change the order of the "columns", something like this might be used:
awk -v RS="\r" -v FS=" " -v ORS="\n" -v OFS=" " '{print $2,$1}' f1.txt > f2.txt
The resulting file can then be turned into SQL similar to this:
UPDATE items SET barcode = '<barcode>' WHERE barcode = '<DOKID>';
The resulting SQL file can then be run against the database after the other item information has been migrated.
This is a work in progress. Each new migration it is used for reveals some new things that need to be fixed. Here is a list of currently known issues:
Merge 571$b into 571$a. (571$b is defined in BIBSYS-MARC, but NORMARC only has 571$a.)
If you are requesting an export from BIBSYS, with a view to migration, insist on the following being part of the data exported:
Barcodes (if they differ from DOKIDS, see the BARCODES section above)
All URLs for electronic documents should be in 856$u
Single issues of periodicals should be exported as items
https://github.com/Libriotech/bibsys2koha
items.pl was formerly known as bibsys-items.pl in the LibrioTools project: https://github.com/MagnusEnger/LibrioTools
Copyright 2015 Magnus Enger Libriotech
This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
These files are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this file; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA