[open-ils-commits] r10402 - trunk/Open-ILS/src/extras/import
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 21 12:22:46 EDT 2008
Author: sboyette
Date: 2008-08-21 12:22:44 -0400 (Thu, 21 Aug 2008)
New Revision: 10402
Modified:
trunk/Open-ILS/src/extras/import/marc2bre.pl
Log:
new flag --tcnfile, allows specification of a dumpfile for all dontuse and found tcn values
Modified: trunk/Open-ILS/src/extras/import/marc2bre.pl
===================================================================
--- trunk/Open-ILS/src/extras/import/marc2bre.pl 2008-08-21 16:20:16 UTC (rev 10401)
+++ trunk/Open-ILS/src/extras/import/marc2bre.pl 2008-08-21 16:22:44 UTC (rev 10402)
@@ -22,7 +22,7 @@
#MARC::Charset->ignore_errors(1);
-my ($id_field, $id_subfield, $recid, $user, $config, $idlfile, $marctype, $keyfile, $dontuse_file, $enc, $force_enc, @files, @trash_fields, @req_fields, $use901, $quiet) =
+my ($id_field, $id_subfield, $recid, $user, $config, $idlfile, $marctype, $keyfile, $tcnfile, $dontuse_file, $enc, $force_enc, @files, @trash_fields, @req_fields, $use901, $quiet) =
('', 'a', 0, 1, '/openils/conf/opensrf_core.xml', '/openils/conf/fm_IDL.xml', 'USMARC');
my ($db_driver,$db_host,$db_name,$db_user,$db_pw) =
@@ -36,6 +36,7 @@
'encoding=s' => \$enc,
'hard_encoding' => \$force_enc,
'keyfile=s' => \$keyfile,
+ 'tcnfile=s' => \$tcnfile,
'config=s' => \$config,
'file=s' => \@files,
'required_field=s' => \@req_fields,
@@ -220,6 +221,13 @@
}
}
+if ($tcnfile) {
+ open TCNFILE, '>', $tcnfile;
+ print "$_\n" for (keys %dontuse_id);
+}
+
+
+
sub preprocess {
my $rec = shift;
my $id = shift;
More information about the open-ils-commits
mailing list