tweaks
authorShawn Boyette <sboyette@esilibrary.com>
Tue, 6 Jan 2009 21:48:45 +0000 (21:48 +0000)
committerShawn Boyette <sboyette@esilibrary.com>
Tue, 6 Jan 2009 21:48:45 +0000 (21:48 +0000)
marc_cleanup

index e717967..7d09f27 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl
+require 5.10.0;
 
 use strict;
 use warnings;
@@ -174,7 +175,7 @@ sub do_automated_cleanups {
 
         # automatable subfield maladies
         $record[$ptr] =~ s/code=" ">c/code="c">/;
-        $record[$ptr] =~ s/code=" ">\$/code="c">$/;
+        $record[$ptr] =~ s/code=" ">\$/code="c">\$/;
     }
 }
 
@@ -669,10 +670,9 @@ sub initialize {
     show_trashhelp() if ($c->{trashhelp});
 
     # defaults
-    if ($c->{prefix}) {
-        $c->{output} = join('.',$c->{prefix},'clean','marc','xml');
-        $c->{exception} = join('.',$c->{prefix},'marc','ex');
-    }
+    my $pfx = $c->{prefix} // "bibs";
+    $c->{output} = join('.',$c->{prefix},'clean','marc','xml');
+    $c->{exception} = join('.',$c->{prefix},'exception','marc','xml');
     $c->{'renumber-tag'} = 903 unless defined $c->{'renumber-tag'};
     $c->{'renumber-subfield'} = 'a' unless defined $c->{'renumber-subfield'};
     $c->{window} = 5;
@@ -694,8 +694,8 @@ Options
   --output     -o  Cleaned MARCXML output filename
   --exception  -x  Exception (dumped records) MARCXML filename
        or
-  --prefix=<PREFIX>>   -p  Shared prefix for output/exception files. Will
-                           produce PREFIX.clean.marc.xml and PREFIX.ex.xml
+  --prefix=<PREFIX>>   -p  Shared prefix for output/exception files. Will produce
+                           PREFIX.clean.marc.xml and PREFIX.exception.marc.xml
 
   --renumber-from     -rf  Begin renumbering id sequence with this number
   --renumber-tag      -rt  Tag to use in renumbering (default: 903)