JBAS-1437 Backstage process bib/auth file names update
authorBill Erickson <berickxx@gmail.com>
Mon, 26 Sep 2016 14:29:09 +0000 (07:29 -0700)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Handle inconsistencies in BS results file naming.

* Process files ending in .UTF8 or .MRC
* Treat file with name AUTH as new/modified authority records.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/backstage/process-backstage-files.pl

index 7fb0aee..de0fa64 100755 (executable)
@@ -153,7 +153,7 @@ sub process_zip_file {
 
     # Avoid processing XLS and HTM files.  
     # All of the MARC files end in .UTF8.
-    for my $member ($zip->membersMatching('.*\.UTF8')) {
+    for my $member ($zip->membersMatching('.*(\.UTF8|\.MRC)')) {
 
         my $basename = basename($member->fileName());
 
@@ -175,7 +175,7 @@ sub process_zip_file {
 
             handle_deleted_auths($marc_batch);
 
-        } elsif ($basename =~ /CHG|NEW/) {
+        } elsif ($basename =~ /CHG|NEW|AUTH/) {
 
             handle_modified_auths($marc_batch);