Catman...RC::ISO(3pm)

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

πŸ¦‹ Catman...RC::ISO(3pm) πŸ’…

okay bestie, welcome to the manual page for Catman...RC::ISO(3pm) β€” the user contributed perl documentation for this little icon. grab a strawberry πŸ“ and let's get into it.


✨ NAME ✨

Catmandu::Importer::MARC::ISO β€” the package that imports ISO MARC records. it's giving the importer, no cap. πŸ‘‘


🌸 SYNOPSIS 🌸

so here's the vibe. first up, from the command line β€” and lowkey iconic detail: ISO is the default importer for MARC:

# From the command line (ISO is the default importer for MARC)
$ catmandu convert MARC --fix "marc_map('245a','title')" < /foo/bar.mrc

and from perl, the main character way:

# From perl
use Catmandu;

# import records from file
my $importer = Catmandu->importer('MARC',file => '/foo/bar.mrc');
my $fixer    = Catmandu->fixer("marc_map('245a','title')");

$importer->each(sub {
    my $item = shift;
    ...
});

# or using the fixer

$fixer->fix($importer)->each(sub {
    my $item = shift;
    printf "title: %s\n" , $item->{title};
});

not me writing fixes like it's nothing πŸ’… it just works.


πŸŽ€ CONFIGURATION πŸŽ€

these are the settings you can hand over. each one is a whole personality, fr fr.

  • id β€” the MARC field that holds the system id. default? 001. periodt. πŸ†”
  • file β€” read your input from a local file, given by its path. alternatively, you can pass a scalar reference to read from a string instead. versatile queen. πŸ“
  • fh β€” read input from an IO::Handle. if you don't specify it, Catmandu::Util::io is used to build the input stream from the file argument, or by using STDIN. 🫢
  • encoding β€” the binmode of the input stream fh. set to :utf8 by default. bestie stays utf8. ✨
  • fix β€” an ARRAY of one or more fixes, or file scripts, to be applied to imported items. go off, glow up those records. πŸ’–

πŸ”₯ METHODS πŸ”₯

every Catmandu::Importer is a Catmandu::Iterable, so all its methods are inherited. meaning you get the whole family tree of methods for free. iconic behavior, honestly. 🌈


πŸ‘€ SEE ALSO πŸ‘€

go read these next, iykyk:

  • Catmandu::Importer
  • Catmandu::Iterable

reminder: this is perl v5.38.2 documentation, dated 2024-08-03. treat it with the respect it deserves. πŸ’œ

and that's the page bestie β€” perl v5.38.2, 2024-08-03, Catman...RC::ISO(3pm), that's the whole footer, and we ate. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from