KohaExtensions

Extensions Manager

Migration Tools


Koha v 2.2x to v 3.x MARC migration tool

  • Author: atonyman
  • Compatible with: 2.2, 2.4, 3.0

This is a PHP script I wrote that merges/rearranges all of the item information that was spread about in v2.2x into where v3.x expects it (tag 952).
You can examine the script and see possibilities for other MARC tasks as needed.

Requirements : PHP, PEAR, File_MARC.php

Instructions - usage through the command line only at this time.

III to Koha importer

  • Author: sekjal
  • Compatible with: 3.0

Small script to import bibliographic records into Koha. Before using the import
stage, be sure to (in Millennium Administration), go to Web options > XRECTYPE
and make sure all of the following letters are included: bica

Parameters:
f|file /path/to/file: the file to import
dir name for IIIXML directory (defaults to Unix time)
mdir name for MARCXML directory (defaults to \'MARC-\' + IIIXML directory name)
l batch size (default 300)
v verbose mode
s|stage where in the process to start
1. pull records from III server (default)
2. convert records to MARCXML with Xalan
3. import records into Koha
a hardset authority flag (only necessary if resuming at stage 2 or 3)
h|help this screen

For more help, view the code.


Patron Extended Attribute reload

  • Author: sekjal
  • Compatible with: 3.0

Small script to import patron attributes into Koha from a flat file. Unwanted patron attribute values must be deleted from the borrower_attributes table prior to running this script in order to avoid duplicates.

Parameters:
f|file /path/to/file: the file to import
h|help this screen
t|test test mode; does not commit change to the db
id specify the unique id used for the patron (borrownumber is default)

This script expects a CSV file, with the unique identifer for the patron as the
first value per row, and attribute:value (separated by :) pairs for each
subsequent value. You may insert as many attributes per patron as your Koha
setup is configured to allow (see Koha manual to define patron attribute types).

Specify \"-id cardnumber\" or \"-id userid\" to use cardnumber or userid to link to
the patron\'s record (instead of borrowernumber).

Example of a row from the CSV file:

35,ATTR1:something,ATTR2:something else

Follett to Koha Migration

  • Author: douger
  • Compatible with: 3.0

A script to convert a marc21 file exported from Follett into Koha format. There are notes at the beginning of the file about how the script works.

This was originally generated using the 4.x version of MarcEdit. If you are using 5.x you need to modify the MarcBreaker and MarcMaker sections as follows.

\'======================================================
\'FUNCTION/SUB: Marc_Break
\'Description: Encapsulates the MarcBreaker functions
\'======================================================
Function Marc_Break(source, dest)
Dim obj_MB
Dim lret

if fso.FileExists(source)=false then
msgbox \"Local MarcFile Could not be located. Quitting\"
wscript.quit
end if
Set obj_MB=CreateObject(\"MARCEngine5.MARC21\") ***THIS LINE***
lret=obj_MB.MarcFile(source, dest)

set obj_MB=Nothing
Marc_Break=lret
end Function


\'======================================================
\'FUNCTION/SUB: Marc_Make
\'Description: Encapsulates the MarcMaker Functions
\'======================================================
Function Marc_Make(source, dest)
Dim obj_MK
Set obj_MK=CreateObject(\"MARCEngine5.MARC21\") ***THIS LINE***
lret=obj_MK.MMaker(source, dest)
Set obj_MK=Nothing
Marc_Make=lret
end function

athenamarc2koha.pl

  • Author: jglepage
  • Compatible with: 3.0

This script converts a MARC file generated by Sagebrush Athena to a file appropriate for Koha.

Usage: You need to specify the input and output files, and optionally the branch code for your library.
perl marcconvert.pl originalmarcfile convertedmarcfile
or
perl marcconvert.pl originalmarcfile convertedmarcfile branch_code


If you specify the branch code, it must correspond to branches.branchcode in the Koha DB.
The branch_code will be set in the output MARC records as 952$a and 952$b.
In the Koha DB, 952$a corresponds to items.homebranch (permanent location), and
952$b corresponds to items.holdingbranch (current location).

Send questions/comments/suggestions to jeffrey_lepage@yahoo.com