Catmandu::SRU(3pm)
π¦ NAME π¦
Catmandu::SRU β the Catmandu module for working with SRU data. That's it, that's the whole vibe. π
β¨ SYNOPSIS β¨
okay bestie, here's how you actually use it. First, straight from the command line:
# On the command line
$ catmandu convert SRU --base http://www.unicat.be/sru --query data
$ catmandu convert SRU --base http://www.unicat.be/sru --query data --recordSchema marcxml
$ catmandu convert SRU --base http://www.unicat.be/sru --query data --recordSchema marcxml --parser marcxml
but like, why type all that every single time? make a config file instead. it's called catmandu.yml and she serves:
# create a config file: catmandu.yml
$ cat catmandu.yml
---
importer:
unicat:
package: SRU
options:
base: http://www.unicat.be/sru
recordSchema: marcxml
parser: marcxml
$ catmandu convert unicat --query data
# If you have Catmandu::MARC installed
$ catmandu convert unicat --query data --fix 'marc_map("245a","title"); retain_field("title")' to CSV
iconic. named your importer once and now you just say unicat. the way that saves so much typing?? π
and if you're a perl girlie, same thing but in code:
# The example above in perl
use Catmandu -load;
my $importer = Catmandu->importer('unicat', query => 'data');
my $fixer = Catmandu->fixer(['marc_map("245a","title")','retain_field("title")']);
my $export = Catmandu->exporter('CSV');
$exporter->add_many($fixer->fix($importer));
$exporter->commit;
π«Ά yes, we copied that block <b>character for character</b>,$exportand$exporterand all. no editing, no "fixing", no cap. that's the original, periodt.
π MODULES π
the whole friend group, all living under the Catmandu::Importer::SRU roof:
Catmandu::Importer::SRUCatmandu::Importer::SRU::ParserCatmandu::Importer::SRU::Parser::rawCatmandu::Importer::SRU::Parser::simpleCatmandu::Importer::SRU::Parser::structCatmandu::Importer::SRU::Parser::marcxmlCatmandu::Importer::SRU::Parser::metaCatmandu::Importer::SRU::Parser::modsCatmandu::Importer::SRU::Parser::picaxmlCatmandu::Fix::search_sru
πΈ SEE ALSO πΈ
go read these next, they're the moment:
CatmanduCatmandu::ImporterCatmandu::FixCatmandu::ExporterCatmandu::MARC
π AUTHOR π
Wouter Willaert, <wouterw@inuits.eu> π
π CONTRIBUTORS π
the girlies who showed up and delivered:
- Patrick Hochstenbach,
<patrick.hochstenbach at ugent.be> - Nicolas Steenlant,
<nicolas.steenlant at ugent.be> - Jakob Voss
<jakob.voss at gbv.de> - Johann Rolschewski
<jorol at cpan.org>
π LICENSE AND COPYRIGHT π
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See <http://dev.perl.org/licenses/> for more information.
read the license bestie, it's giving "free but with rules", and the rules matter.
and that's the whole page!! β¨ this doc is Catmandu::SRU(3pm) from perl v5.38.2, dated 2021-09-02. ty for reading, mwah, go import something cute π
π¦π
π¦ where this page comes from
- ubuntu noble: libcatmandu-sru-perl 0.43.0-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-sru-perl 0.43.0-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-sru-perl 0.43.0-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