a little sample script that dump a iso2709 file. call it with :

dumpmarc.pl -file /path/to/your/iso2709.file
This commit is contained in:
tipaul 2003-05-20 15:48:23 +00:00
parent d8551b19c2
commit 327025a79b

23
misc/dumpmarc.pl Executable file
View file

@ -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();
}