[Koha-cvs] CVS: koha/misc dumpmarc.pl,1.4,1.5
Paul POULAIN
tipaul at users.sourceforge.net
Wed Apr 14 21:48:15 CEST 2004
Update of /cvsroot/koha/koha/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18973/misc
Modified Files:
dumpmarc.pl
Log Message:
adding -w parameter to have warnings
Index: dumpmarc.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/dumpmarc.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** dumpmarc.pl 24 Nov 2003 17:15:55 -0000 1.4
--- dumpmarc.pl 14 Apr 2004 19:48:13 -0000 1.5
***************
*** 11,20 ****
use Getopt::Long;
! my ( $input_marc_file,$number) = ('',0);
my $version;
GetOptions(
'file:s' => \$input_marc_file,
'n:s' => \$number,
! 'v' => \$version
);
--- 11,21 ----
use Getopt::Long;
! my ( $input_marc_file,$number,$nowarning) = ('',0);
my $version;
GetOptions(
'file:s' => \$input_marc_file,
'n:s' => \$number,
! 'v' => \$version,
! 'w' => \$nowarning,
);
***************
*** 27,30 ****
--- 28,32 ----
\tfile /path/to/file/to/dump : the file to dump
\tn : the number of the record to dump. If missing, all the file is dumped
+ \tw : warning and strict off. If your dump fail, try -w option. It it works, then, the file is iso2709, but a buggy one !
SAMPLE : ./dumpmarc.pl -file /home/paul/koha.dev/local/npl -n 1
EOF
***************
*** 34,39 ****
my $batch = MARC::Batch->new( 'USMARC', $input_marc_file );
! $batch->warnings_off();
! $batch->strict_off();
my $i=1;
while ( my $record = $batch->next() ) {
--- 36,41 ----
my $batch = MARC::Batch->new( 'USMARC', $input_marc_file );
! $batch->warnings_off() unless $nowarning;
! $batch->strict_off() unless $nowarning;
my $i=1;
while ( my $record = $batch->next() ) {
More information about the Koha-cvs
mailing list