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:
parent
d8551b19c2
commit
327025a79b
1 changed files with 23 additions and 0 deletions
23
misc/dumpmarc.pl
Executable file
23
misc/dumpmarc.pl
Executable 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();
|
||||
}
|
Loading…
Reference in a new issue