X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=emig.d%2Fbin%2Fmig-bibstats;fp=emig.d%2Fbin%2Fmig-bibstats;h=c3629af97362ee34ca667b1645a4a7962ae110e7;hp=cfb382a4f8a8028289ed326ac41908e541d865c6;hb=61545ffa452fa6c95446207b67ce2e7dda704db7;hpb=c16c4d4c903563ce83f4c6df5d6c51a4c6742b2c diff --git a/emig.d/bin/mig-bibstats b/emig.d/bin/mig-bibstats index cfb382a..c3629af 100755 --- a/emig.d/bin/mig-bibstats +++ b/emig.d/bin/mig-bibstats @@ -110,11 +110,14 @@ if ($p_holding_code) { #to do - add a check for exportbarcodes being in @ilses -my $batch = MARC::Batch->new('USMARC', $file); -$batch->strict_off(); my $filetype = `file $file`; -if ($filetype =~ m/MARC21/ or $p_ignore_filetype eq 'true') { print "$filetype.\n" } - else { abort("File is not MARC21."); } +my $batch; +if ($filetype =~ m/MARC21/) { + $batch = MARC::Batch->new( 'USMARC', $file ); +} else { + $batch = MARC::Batch->new( 'XML', $file ); +} +$batch->strict_off(); my $i = 0; my $uri_count = 0;