]> git.koha-community.org Git - koha.git/commit
Bug 8015: Add MARC Modifications Templates
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 26 Apr 2012 20:08:57 +0000 (16:08 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 31 Oct 2013 22:47:08 +0000 (22:47 +0000)
commit622430cfb5bb1b9886e00a835d96b8434d6ef1db
treeb4b3c1708439b0e432ef378d838521a9402ce4ee
parent7c521a8cf20d73e7435d43450ba887689e60841b
Bug 8015: Add MARC Modifications Templates

The MARC Modification Templates system gives Koha users
the power to make alterations to MARC records automatically
while staging MARC records for import.

This tool is useful for altering MARC records from
various venders work with your MARC framework.

The system essentially allows one to create a basic script
using actions to Copy, Move, Add, Update and Delete fields.

Each action can also have an optional condition to check
the value or existance of another field.

The Copy & Move actions also support Regular Expressions,
which can be used to automatically modify field values during the
copy/move. An example would be to strip out the '$' character
in field 020$c.

Furthermore, the value for an update can include variables
that change each time the template is used. Currently,
the system supports two variables, __BRANCHCODE__ which
is replaced with the branchcode of the library currently
using the template, and __CURRENTDATE__ which is replaced
with the current date in ISO format ( YYYY-MM-DD ).

At its simplist, it can perform functions such as:
Copy field 092$a to 952$c
At its most complex it can run actions like:
Copy field 020$c to 020$c using RegEx s/\$// if 020$c equals RegEx m/^\$/

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
14 files changed:
C4/ImportBatch.pm
C4/Koha.pm
Koha/MarcModificationTemplates.pm [new file with mode: 0644]
Koha/SimpleMARC.pm [new file with mode: 0644]
installer/data/mysql/en/mandatory/userpermissions.sql
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt
tools/marc_modification_templates.pl [new file with mode: 0755]
tools/stage-marc-import.pl