NAME¶
Catmandu::Exporter::MARC - Exporter for MARC records
SYNOPSIS¶
# Convert MARC to MARC
$ catmandu convert MARC to MARC < /foo/bar.mrc > /foo/output.mrc
# Add fixes
$ catmandu convert MARC to MARC --fix myfixes.txt < /foo/bar.mrc > /foo/output.mrc
# Convert on format to another format
$ catmandu convert MARC --type ISO to MARC --type ALEPHSEQ < /foo/bar.mrc > /foo/bar.aleph
DESCRIPTION¶
Catmandu::Exporter::MARC is a Catmandu::Exporter to serialize (write) MARC
records to a file or the standard output.
CONFIGURATION¶
- file
- Write output to a local file given by its path or file handle.
Alternatively a scalar reference can be passed to write to a string and a
code reference can be used to write to a callback function.
- fh
- Write the output to an IO::Handle. If not specified, Catmandu::Util::io is
used to create the output handle from the
"file" argument or by using STDOUT.
- fix
- An ARRAY of one or more fixes or file scripts to be applied to exported
items.
- type
- The MARC format to parse. The following MARC parsers are available:
ISO: L<Catmandu::Importer::MARC::ISO> (default) - a strict ISO 2709 exporter
ALEPHSEQ: L<Catmandu::Importer::MARC::ALEPHSEQ> - an exporter for Ex Libris Aleph sequential files
MARCMaker: L<Catmandu::Importer::MARC::MARCMaker> - an exporter for MARCMaker/MARCBreaker records
MiJ: L<Catmandu::Importer::MARC::MiJ> (MARC in JSON) - an export for the MARC-in-JSON format
XML: L<Catmandu::Importer::MARC::XML> - an exporter for the MARC XML format
- skip_errors
- If set, then any errors when parsing MARC output will be skipped and
ignored. Use the debug setting of catmandu to view all error messages:
$ catmandu -D convert MARC to MARC --skip_errors 1 --fix myfixes.txt < /foo/bar.mrc
- <other>
- Every MARC importer can have its own options. Check the documentation of
the specific importer.
SEE ALSO¶
Catmandu::Importer::MARC