</td>
</tr>
<tr valign="top">
- <td>Character encoding (USMARC or UNIMARC)</td>
+ <td>Character encoding (MARC21 or UNIMARC)</td>
<td>
- <select name="syntax"/><option value="USMARC">USMARC</option><option value="UNIMARC">UNIMARC</option></select><br/>
+ <select name="syntax"/><option value="MARC21">MARC21</option><option value="UNIMARC">UNIMARC</option></select><br/>
</td>
</tr>
<tr valign="top">
</td>
</tr>
<tr valign="top">
- <td>Character encoding (USMARC or UNIMARC)</td>
+ <td>Character encoding (MARC21 or UNIMARC)</td>
<td>
- <select name="syntax"><option value="USMARC">USMARC</option><option value="UNIMARC">UNIMARC</option></select><br/>
+ <select name="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC">UNIMARC</option></select><br/>
</td>
</tr>
<tr valign="top">
\tv : verbose mode. 1 means "some infos", 2 means "MARC dumping"
\tn : the number of the record to import. If missing, all the file is imported
\tt : test mode : parses the file, saying what he would do, but doing nothing.
-\tc : the char encoding. At the moment, only USMARC and UNIMARC supported. USMARC by default.
+\tc : the char encoding. At the moment, only MARC21 and UNIMARC supported. MARC21 by default.
\d : delete EVERYTHING related to biblio in koha-DB before import :tables :
\t\tbiblio, \t\tbiblioitems, \t\tsubjects,\titems
\t\tadditionalauthors, \tbibliosubtitles, \tmarc_biblio,
if ($test_parameter) {
print "TESTING MODE ONLY\n DOING NOTHING\n===============\n";
}
-$char_encoding = 'USMARC' unless ($char_encoding);
+$char_encoding = 'MARC21' unless ($char_encoding);
print "CHAR : $char_encoding\n" if $verbose;
my $starttime = gettimeofday;
my $batch = MARC::Batch->new( 'USMARC', $input_marc_file );
my $version;
GetOptions(
'file:s' => \$input_marc_file,
- 'n' => \$number,
+ 'n:s' => \$number,
'v' => \$version
);
+warn "NUM : $number\n";
if ($version || ($input_marc_file eq '')) {
print <<EOF
small script to dump an iso2709 file.
$batch->strict_off();
my $i=1;
while ( my $record = $batch->next() ) {
- print "\n".$record->as_formatted() if ($i eq $number || $number eq 0);
+ print "\nNUMBER $i =>\n".$record->as_formatted() if ($i eq $number || $number eq 0);
$i++;
}
print "\n==================\n$i record parsed\n";