Bug 11278: Adjusting bulkmarcimport.pl for customization routine and verbose printing
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 21 Nov 2013 10:29:59 +0000 (11:29 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 5 May 2014 00:58:54 +0000 (00:58 +0000)
commit84805701972fc6d580e40105f755613b4136b981
tree02c7f29cc338dd63277dc3848276b5dce7772fd7
parent700568bb894b2810b093d51e9aa83a56174eed98
Bug 11278: Adjusting bulkmarcimport.pl for customization routine and verbose printing

This patch makes two adjustments:
[1] For the verbose option, verbose level 2 now means print the
formatted version of each record.
[2] If a module LocalChanges.pm is found in misc/migration_tools, the
routine "customize" in this module is called for each marc record.
This allows you to make local changes to these marc records before
importing them.

Test plan:
[1] Test the verbose option: a single -v for medium verbosity and two
-v to dump a human-readable version of the record to standard output.
(Do not yet copy LocalChanges.pm in the folder.)
You may used the attached example file on Bugzilla:
perl misc/migration_tools/bulkmarcimport.pl -file zztest01.xml -v -v -b -m XML -t | more
Note the option t for test; no records will be imported.
[2] Copy LocalChanges.pm in the migration_tools folder. You may use the
example provided on Bugzilla (in a patch). If you use the example module,
check the contents of 001, 005 and 590 fields. (The -v -v option allows
you to easily check that.)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/migration_tools/bulkmarcimport.pl