Bugzilla – Attachment 23063 Details for
Bug 11278
Adjusting bulkmarcimport.pl for customization routine and verbose printing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11278: [EXAMPLE: DO_NOT_PUSH] Example LocalChanges.pm
Bug-11278-EXAMPLE-DONOTPUSH-Example-LocalChangespm.patch (text/plain), 1.39 KB, created by
Marcel de Rooy
on 2013-11-21 12:38:20 UTC
(
hide
)
Description:
Bug 11278: [EXAMPLE: DO_NOT_PUSH] Example LocalChanges.pm
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-11-21 12:38:20 UTC
Size:
1.39 KB
patch
obsolete
>From 309c00ce42dcfa085e8f32963bd29bd258942489 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 21 Nov 2013 13:36:13 +0100 >Subject: [PATCH] Bug 11278: [EXAMPLE: DO_NOT_PUSH] Example LocalChanges.pm >Content-Type: text/plain; charset=utf-8 > >This patch adds a LocalChanges.pm to migration_tools. >To illustrate the concept of record customization during bulkmarcimport. >--- > misc/migration_tools/LocalChanges.pm | 25 +++++++++++++++++++++++++ > 1 files changed, 25 insertions(+), 0 deletions(-) > create mode 100644 misc/migration_tools/LocalChanges.pm > >diff --git a/misc/migration_tools/LocalChanges.pm b/misc/migration_tools/LocalChanges.pm >new file mode 100644 >index 0000000..0387d08 >--- /dev/null >+++ b/misc/migration_tools/LocalChanges.pm >@@ -0,0 +1,25 @@ >+use strict; >+use warnings; >+ >+use MARC::Field; >+ >+sub customize { >+ my ($record)= @_; >+#this is ONLY EXAMPLE code; please create your own customizations here >+ >+ #We clear e.g. field 001 >+ my $f1= $record->field('001'); >+ my $oldid= $f1->data(); >+ $f1->update(''); >+ #We add a 005 if it does not exist >+ if( !$record->field('005') ) { >+ $f1=MARC::Field->new('005', '00000000000000.00'); >+ $record->insert_fields_ordered($f1); >+ } >+ #We add e.g. a local note 590 >+ $f1=MARC::Field->new('590','','',a=>'Old id:'.$oldid); >+ $record->insert_fields_ordered($f1); >+ >+} >+ >+1; >-- >1.7.7.6
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11278
:
23061
|
23062
| 23063 |
23133
|
23134
|
24748
|
24749
|
24750
|
26087
|
26088
|
26090
|
26099
|
26100
|
26101