Catman...::Z3950(3pm)
π Catmandu::Importer::Z3950 β the manual page, bestie edition β¨
okay so welcome to Catmandu...::Z3950(3pm), aka the perl manpage you're reading at 2am because the library catalogue isn't gonna query itself π«Ά
πΈ NAME πΈ
Catmandu::Importer::Z3950 β the package that imports Z3950 data. that's it. that's the whole job. it pulls Z3950 records into your Catmandu world and it does it flawlessly π
β¨ SYNOPSIS β¨
lowkey the fastest way to get it: straight from the command line, no code, no stress π
# On the command line
$ catmandu convert Z3950 --host z3950.loc.gov --port 7090 --databaseName Voyager --query "(title = dinosaur)"
and if you're a perl girlie and you wanna do it ~properly~, here's the whole vibe from inside your script π
# From Perl
use Catmandu;
my $importer = Catmandu->importer('Z3950'
host => 'z3950.loc.gov',
port => 7090,
databaseName => "Voyager",
preferredRecordSyntax => "USMARC",
queryType => 'PQF', # CQL or PQF
query => '@attr 1=4 dinosaur'
);
my $n = $importer->each(sub {
my $hashref = $_[0];
...
});
see that each? every record comes through as a $hashref and you get to do whatever your heart desires with it. main character energy fr fr π
π CONFIGURAION π
(yes bestie the typo is literally canon, i don't make the rules π)
these are all the lil knobs you can turn. every single one, no skips:
hostβ the Z3950 host name. where your data lives, basically its home address πportβ the Z3950 port. the specific door you're knocking on πͺuserβ a user name. gotta introduce yourself β¨passwordβ a password. the secret handshake, keep it cute, keep it secret πdatabaseNameβ the database to connect to. which one are we raiding today πpreferredRecordSyntaxβ the preferred response format (default:USMARC). if you don't say anything it just goes withUSMARC, iconic behaviour πΈqueryTypeβ the queryType (CQLorPQF). pick your language π¦queryβ the query. the actual thing you're asking for, the moment of truth π₯handlerβ the Perl handler that parses the response content. examples are'USMARC'and'UNIMARC'π
and here's a full real example where basically every option shows up to the party, including the --handler:
$ catmandu convert Z3950 \
--user 'XXX' \
--password 'XXX' \
--host z3950.bnf.fr \
--port 2211 \
--databaseName TOUT-ANA1-UTF8 \
--preferredRecordSyntax Unimarc \
--queryType PQF \
--query '@attr 1=7 9782744024191' \
--handler UNIMARC
like??? she's doing the absolute most and i'm obsessed πβ¨
π REQUIREMENTS π
this package uses the ZOOM package internally. for more info visit:
http://search.cpan.org/~mirk/Net-Z3950-ZOOM-1.28/lib/ZOOM.pod
and heads up β the ZOOM package has a hard dependency on the YAZ toolkit. not a soft lil suggestion, a hard one. for more info about YAZ, visit:
https://www.indexdata.com/yaz
installing YAZ:
- (osx, using homebrew):
brew install yaz - (linux, using yum):
yum install yaz libyaz
π AUTHOR π
- Wouter Willaert,
<wouterw@inuits.eu> - Patrick Hochstenbach,
<patrick.hochstenbach@ugent.be>
π¦ CONTRIBUTORS π¦
- Emmanuel Di Pretoro,
edipretoro at gmail.com
π SEE ALSO π
Catmandu::Iterable
and that's the whole page bestie, you're officially certified in Z3950 importing πβ¨ this absolute gem of a manpage comes from perl v5.36.0 and was dated 2023-02-04 β go forth and query, and remember: the vibe check is USMARC by default π
π
π¦ where this page comes from
- debian bookworm: libcatmandu-z3950-perl 0.06-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-z3950-perl 0.06-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-z3950-perl 0.06-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-z3950-perl 0.06-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-z3950-perl 0.06-2 Β· 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