From 327025a79bf7228095cef54b5bb9de3a63c261f8 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 20 May 2003 15:48:23 +0000 Subject: [PATCH] a little sample script that dump a iso2709 file. call it with : dumpmarc.pl -file /path/to/your/iso2709.file --- misc/dumpmarc.pl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 misc/dumpmarc.pl diff --git a/misc/dumpmarc.pl b/misc/dumpmarc.pl new file mode 100755 index 0000000000..272d39d38d --- /dev/null +++ b/misc/dumpmarc.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl +# small script that dumps an iso2709 file. + +use strict; + +# Koha modules used +use MARC::File::USMARC; +use MARC::Record; +use MARC::Batch; + +use Getopt::Long; +my ( $input_marc_file); +GetOptions( + 'file:s' => \$input_marc_file +); + +my $batch = MARC::Batch->new( 'USMARC', $input_marc_file ); +$batch->warnings_off(); +$batch->strict_off(); + +while ( my $record = $batch->next() ) { + print $record->as_formatted(); +} -- 2.39.5