Catmandu::SRU(3pm)

πŸ“¦
version 0.43.0 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ¦‹ 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>, $export and $exporter and 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::SRU
  • Catmandu::Importer::SRU::Parser
  • Catmandu::Importer::SRU::Parser::raw
  • Catmandu::Importer::SRU::Parser::simple
  • Catmandu::Importer::SRU::Parser::struct
  • Catmandu::Importer::SRU::Parser::marcxml
  • Catmandu::Importer::SRU::Parser::meta
  • Catmandu::Importer::SRU::Parser::mods
  • Catmandu::Importer::SRU::Parser::picaxml
  • Catmandu::Fix::search_sru

🌸 SEE ALSO 🌸

go read these next, they're the moment:

  • Catmandu
  • Catmandu::Importer
  • Catmandu::Fix
  • Catmandu::Exporter
  • Catmandu::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>

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