Catman...klight(3pm)

✨ NAME ✨

Catmandu::Importer::Blacklight β€” bestie, it imports records from a Blacklight catalog πŸ’– (yes, this is that Catman...klight(3pm) page you were looking for, she's right here, hi)


🌸 SYNOPSIS 🌸

Okay so like, two ways to do this. Pick your fighter:

# From the command line
$ catmandu convert Blacklight --url http://lib.ugent.be/catalog -q Schopenhauer

# In perl
use Catmandu::Importer::Blacklight;

my $importer = Catmandu::Importer::Blacklight->new(
                url => "...",
                q   => "..."
  );

my $n = $importer->each(sub {
    my $hashref = $_[0];
    # ...
});

Like, that's it. That's the whole vibe. ✨


πŸŽ€ CONFIGURATION πŸŽ€

Two things you literally have to give her, no skips, no "I'll do it later":

  • url β€” the Blacklight catalog Base URL. Required, bestie. She will not run without it. 🫢
  • q β€” the Query string to search with. Also Required. Same energy. No query, no records, periodt. πŸ’…

πŸ’– DESCRIPTION πŸ’–

So every Catmandu::Importer is also a Catmandu::Iterable, which means all its methods are inherited β€” you get the whole iterable toolbox for free, iykyk. πŸ‘‘

BUT. And this is the important part so lean in:

The Catmandu::Importer::Blacklight methods are not idempotent. Blacklight feeds can only be read once. Like, one shot, one read, that's it. Don't come back expecting a second pass, because she is NOT doing encores. πŸ˜­πŸ’€

🌈 SEE ALSO 🌈

Go be nosy, she loves that for you:


Okay that's the whole page!! πŸ¦‹ This little gem lives in the User Contributed Perl Documentation, running on perl v5.36.0, and it was last touched on 2023-02-02. Mwah, bye bestie πŸ’œβœ¨

πŸ“¦ where this page comes from