[open-ils-commits] r11938 - trunk/Open-ILS/src/extras/import
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 23 15:09:39 EST 2009
Author: phasefx
Date: 2009-01-23 15:09:35 -0500 (Fri, 23 Jan 2009)
New Revision: 11938
Modified:
trunk/Open-ILS/src/extras/import/marc_add_ids
Log:
-set_as_deleted param for setting Leader/05 to "d". This is to support XC's OAIToolkit.
Modified: trunk/Open-ILS/src/extras/import/marc_add_ids
===================================================================
--- trunk/Open-ILS/src/extras/import/marc_add_ids 2009-01-23 17:10:07 UTC (rev 11937)
+++ trunk/Open-ILS/src/extras/import/marc_add_ids 2009-01-23 20:09:35 UTC (rev 11938)
@@ -18,11 +18,13 @@
my ($delim, @fields) = (' \| ');
my $set_001_003 = 0;
my $repository_code = 'Evergreen';
+my $set_as_deleted = 0;
GetOptions(
'delimiter=s' => \$delim,
'field=s' => \@fields,
'set_001_003' => \$set_001_003,
'repository_code=s' => \$repository_code,
+ 'set_as_deleted' => \$set_as_deleted,
);
my %partmap;
@@ -79,6 +81,14 @@
}
}
+ if ($set_as_deleted) {
+ my $leader = $r->leader();
+ if (length($leader)>4) {
+ substr($leader,5,1,"d");
+ $r->leader($leader);
+ }
+ }
+
print $r->as_xml_record;
} otherwise {
warn "failed on record $., $partlist{marc}, for $@\n";
More information about the open-ils-commits
mailing list