Ligonier (PA) is Polaris, yes, but Ligonier (IN) is Mandarin.
authorBen Ostrowsky <ben@esilibrary.com>
Tue, 5 Jan 2010 20:17:38 +0000 (20:17 +0000)
committerBen Ostrowsky <ben@esilibrary.com>
Tue, 5 Jan 2010 20:17:38 +0000 (20:17 +0000)
polaris/extract_patrons [deleted file]

diff --git a/polaris/extract_patrons b/polaris/extract_patrons
deleted file mode 100755 (executable)
index 840028d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/perl -w
-
-# Polaris exports patrons in MARC format.  This script turns the data into a TSV that can be imported with \copy.
-
-use strict;
-use MARC::Record; 
-use MARC::File::USMARC; 
-use Equinox::Migration::SubfieldMapper 1.004;
-
-my $file = MARC::File::USMARC->in("PATRONS.mrc"); 
-my $serial = 0;
-my @modlist = qw( multi ignoremulti bib required ); # Not sure what these do, but I'll cargo-cult it for now
-my $mapfile = 'patron.map';
-
-# initialize map and taglist
-my $sfmap = Equinox::Migration::SubfieldMapper->new( file => $mapfile, mods => \@modlist );
-
-my $temp = $sfmap->tags(); # $temp is an arrayref
-my @fields = sort @$temp;
-
-while ( my $marc = $file->next() ) { 
-  # Preliminaries
-  print $serial++ . "\t";
-  print $marc->leader() . "\t";
-       print $marc->field('001')->data() . "\t";
-       print $marc->field('005')->data() . "\t";
-       print $marc->field('008')->data() . "\t";
-  # Fields and subfields beyond the preliminaries
-  foreach my $tag (@fields) {
-    my $temp = $sfmap->subfields($tag);
-    foreach my $sf (sort @$temp) {
-      if ($sfmap->has($tag, $sf)) {
-        print $marc->subfield($tag, $sf);
-      }
-      print "\t";
-    }    
-  }
-  print "\n"; 
-} 
-
-$file->close(); 
-undef $file;