Catman...::MARC(3pm)
β¨ NAME β¨
Catmandu::Exporter::MARC β the exporter for MARC records, bestie π
Ok so real talk, this whole page is Catman...::MARC (that's the Catmandu::Exporter::MARC manual, third-party Perl docs, section 3pm) and it's literally just here to tell you how to write MARC out. Let's go π¦
πΈ SYNOPSIS πΈ
Like, here's the vibe, copy-paste ready:
# 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
Slay. That's it, that's the whole mood β¨
π DESCRIPTION π
Catmandu::Exporter::MARC is a Catmandu::Exporter β which is the fancy way of saying it serializes (aka writes) MARC records out to a file or straight to standard output. No cap. That's its whole job and it does it gorgeously π
π CONFIGURATION π
π file
Write the output to a local file, given by its path or by a file handle. But wait, there's more β you can also pass a scalar reference to write into a string instead, or a code reference to write to a callback function. Choose your own adventure, periodt π«
π¦ fh
Write the output to an IO::Handle. If you don't specify one, Catmandu::Util::io swoops in and builds the output handle for you β either from the file argument or by using STDOUT. It's giving helpful π
π fix
An ARRAY of one or more fixes, or file scripts, that get applied to the exported items. Basically your glow-up pass before things ship π
π type
The MARC format you want to export. Here are the MARC exporters you can pick from:
ISO:Catmandu::Exporter::MARC::ISO(default) β a strict ISO 2709 exporterALEPHSEQ:Catmandu::Exporter::MARC::ALEPHSEQβ an exporter for Ex Libris Aleph sequential filesLine:Catmandu::Exporter::MARC::Lineβ an exporter for Index Data's MARC Line formatMARCMaker:Catmandu::Exporter::MARC::MARCMakerβ an exporter for MARCMaker/MARCBreaker recordsMiJ:Catmandu::Exporter::MARC::MiJ(MARC in JSON) β an export for the MARC-in-JSON formatXML:Catmandu::Exporter::MARC::XMLβ an exporter for the MARC XML format
Pick one, any one π§
π skip_errors
If you set this, then any errors that pop up while parsing MARC output get skipped and ignored. Lowkey risky, but if you wanna see every single error message, turn on the debug setting of catmandu:
$ catmandu -D convert MARC to MARC --skip_errors 1 --fix myfixes.txt < /foo/bar.mrc
Bestie, it literally says skipped and ignored β errors just vanish into the void. The -D debug flag is how you actually get receipts on what went wrong π₯
π«Ά <other>
Every MARC importer can have its own options, fr fr. So go check the documentation of that specific importer for the full tea π
β SEE ALSO β
Catmandu::Importer::MARC
Ok that's the whole page, you ate it π
This was the Catman...::MARC page, Perl v5.38.2, dated 2024-08-03 β love that for us. Now go export some MARC records, main character ππ¦π
π¦ where this page comes from
- debian trixie: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms