Catman...AlephX(3pm)
π Catman...AlephX(3pm) π
okay bestie, buckle up β this is Catmandu::Importer::AlephX, aka the package that pulls metadata records straight out of an AlephX service. she's giving β¨library dataβ¨ and honestly? iconic. π
πΈ NAME πΈ
Catmandu::Importer::AlephX β the package that imports metadata records from the AlephX service. yes that's literally her whole job and she does it flawlessly π
β¨ SYNOPSIS β¨
use Catmandu::Importer::AlephX;
my $importer = Catmandu::Importer::AlephX->new(
url => 'http://ram19:8995/X' ,
query => 'WRD=(art)' ,
base => 'usm01' ,
);
my $n = $importer->each(sub {
my $r = $_[0];
# ...
say Dumper($r->{record});
say Dumper($r->{items});
});
like. look at her. three lil params and she's cooking π
π¦ METHODS π¦
π new(url => '...' , base => '...' , query => '...')
spawn a brand new AlephX importer, bestie. the required params are:
- the
urlβ the base url of the AlephX service - an Aleph
baseβ the catalog name - and a
query
no skipping any of those three, okay? π
π common parameters
urlβ base url of the alephx service (e.g."http://ram19:8995/X")include_itemsβ0|1. when you set it to'1', the items of every bibliographical record are retrieved π«Ά
π alephx parameters
baseβ name of catalog in Aleph where you want to searchqueryβ the query, of course π
π output
and this is what you get back, bestie β it's giving structured data:
{
record => [
[
'FMT',
'',
'',
'_',
'MX'
],
[
'LDR',
'',
'',
'_',
'01236npca^22001937|^4500'
]
..
],
items => [
{
'sub-library' => 'WID',
'chronological-k' => '',
'chronological-i' => '',
'library' => 'USM50',
'collection' => 'HD',
'call-no-1' => '$$2ZHCL$$hH 810.80.20',
'chronological-j' => '',
'requested' => 'N',
'expected' => 'N',
'barcode' => 'HWM4M4',
'description' => '',
'note' => '',
'item-status' => '01',
'rec-key' => '000048762000010',
'enumeration-a' => '',
'call-no-2' => '',
'enumeration-b' => '',
'enumeration-c' => '',
'on-hold' => 'N'
}
]
}
β count
β each(&callback)
β ...
every Catmandu::Importer is a Catmandu::Iterable, so all its methods are inherited β you get the whole family tree for free, no cap π§
β οΈ okay this part matters: the Catmandu::Importer::AlephX methods are not idempotent: Twitter feeds can only be read once. likeβ¦ read it once and it's gone, bestie. no re-runs. π
π AUTHOR π
Patrick Hochstenbach β "patrick dot hochstenbach at ugent dot be" π§
π SEE ALSO π
- Catmandu::Iterable
and that's the whole page, bestie!! π this was perl v5.36.0, dated 2023-02-02, and it's part of the User Contributed Perl Documentation β mwah, go read some records, you got this πβ¨π¦
π¦ where this page comes from
- debian bookworm: libcatmandu-alephx-perl 1.073-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-alephx-perl 1.073-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-alephx-perl 1.073-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-alephx-perl 1.073-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-alephx-perl 1.073-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