Catman...EPHSEQ(3pm)

πŸ“¦
version 1.320 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Catmandu::Exporter::MARC::ALEPHSEQ πŸ’–

okay bestie so this is a page from the User Contributed Perl Documentation (perl v5.38.2, dated 2024-08-03, keep that in your notes πŸ“) and it's all about the Catmandu::Exporter::MARC::ALEPHSEQ module β€” an exporter that takes MARC records and spits them out in Ex Libris' Aleph sequential format. that's it. that's the whole vibe. πŸ¦‹


✨ NAME ✨

Catmandu::Exporter::MARC::ALEPHSEQ β€” Exporter for MARC records to Ex Libris' Aleph sequential. no cap, that's literally what it does πŸ’…


🌸 SYNOPSIS 🌸

okay so first, from the command line, look how easy this is:

# From the command line
$ catmandu convert MARC to MARC --type ALEPHSEQ < /foo/data.mrc

and from Perl, if that's your thing (it is, we're built different 🫢):

# From Perl
use Catmandu;

my $importer = Catmandu->importer('MARC', file => "/foo/bar.mrc" , type => 'ISO');
my $exporter = Catmandu->exporter('MARC', file => "marc.txt", type => 'ALEPHSEQ' );

$exporter->add($importer);
$exporter->commit;

see? importer in, exporter out, add, commit, done. the way that just works 😭✨


πŸŽ€ CONFIGURATION πŸŽ€

these are the lil knobs you can turn, and every single one of them matters so pay attention bestie:

  • 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. so like, path? handle? scalar ref for string life? coderef for callback era? your choice, queen πŸ‘‘
  • 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. so if you don't hand it a handle, it'll build one from file, and if there's no file, it's STDOUT time 🌈
  • fix β€” An ARRAY of one or more fixes or file scripts to be applied to exported items. this is where you do your little transformations before things go out the door, slay πŸ’…
  • encoding β€” Binmode of the output stream fh. Set to ":utf8" by default. the default is literally ":utf8", we love an encoding that's already handled πŸ₯°
  • default_fmt β€” Set the value of the default FMT field when none is given. Set to "BK" by default. so no FMT? it's "BK". iconic behaviour, honestly πŸ‘‘

πŸ‘‘ METHODS πŸ‘‘

See Catmandu::Exporter, Catmandu::Addable, Catmandu::Fixable, Catmandu::Counter, and Catmandu::Logger for a full list of methods. like, don't ask me for the whole menu, the menu is right there in those modules, go read them bestie πŸ“šβœ¨


πŸ¦‹ SEE ALSO πŸ¦‹

  • Catmandu::Exporter

and that's the whole page, fr fr πŸ’– this was pulled from the perl v5.38.2 docs, page dated 2024-08-03, filed under User Contributed Perl Documentation β€” so if you ever need to cite it, that's your receipt πŸ§ΎπŸŽ€ bye bestie, go export some ALEPHSEQ πŸ’œ

πŸ“¦ where this page comes from