Skip to content

Download MARC records from an FTP site and load them into Koha

Notifications You must be signed in to change notification settings

Libriotech/ftp2koha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

ftp2koha.pl

SYNOPSIS

sudo koha-shell -c "perl ftp2koha.pl --config my_config.yml -v" kohadev

DESCRIPTION

This script will

  • connect to an FTP server

  • download a file containing MARC records

  • add a dummy item to each record

  • import the records into Koha, the free software integrated library system

  • optionally delete the downloaded file

The script is designed to be run from cron at set intervals, like each night.

DOCUMENTATION

See perldoc ftp2koha.pl for a full list of options etc.

THINGS TO LOOK OUT FOR

Here are some gotchas that you might run into.

CANT'T CALL METHOD "fix_checksum"

This script relies heasvily on the Perl module Business::ISBN for ISBN manipulation. That module relies on some input data about ISBN publisher codes, which be out of date.

See perldoc Business::ISBN::Data for more details.

Symptom

Imports fail with an error message like this:

Can't call method "fix_checksum" on an undefined value at 
/usr/share/perl5/Business/ISBN13.pm line 63.

Solution

Download the XML file from https://www.isbn-international.org/range_file_generation and use it to replace the old file at /usr/share/perl5/Business/ISBN/RangeMessage.xml.

SPONSORS

Initial development of this script was funded by

  • Hylte public library

  • Halland Regional Library

ABOUT KOHA

Koha is a fully featured, scalable library management system. Development is sponsored by libraries of varying types and sizes, volunteers, and support companies worldwide.

See http://koha-community.org/ for more information.

AUTHOR

Magnus Enger, magnus [at] libriotech.no

LICENSE

This program 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.

This program is distributed in the hope that it 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 program.  If not, see <http://www.gnu.org/licenses/>.

About

Download MARC records from an FTP site and load them into Koha

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published