Catman...rch_sru(3pm)
β¨ NAME β¨
okay bestie, so Catmandu::Fix::search_sru is the moment π
β it takes a value, treats it as an SRU query, and swaps it out for the SRU search result. literally a glow-up for your field, no cap.
π¦ SYNTAX π¦
here's the base vibe:
search_sru( <path>, <url> )
and with all the optional garnish on top:
search_sru( <path>, <url>, [recordschema:<SCHEMA>], [parser:<PARSER>], [limit:<INTEGER>], [total:<INTEGER>], [fixes:<STRING|FILE>] )
now the part where we do it from the command line, because that's the main character energy π
# From the command line
$ echo '{"issn":"1940-5758"}' | catmandu convert JSON to YAML --fix 'search_sru(issn,"http://services.dnb.de/sru/zdb")'
$ echo '{"issn":"dnb.iss = 1164-5563"}' | catmandu convert JSON to YAML --fix 'search_sru(issn, "http://services.dnb.de/sru/zdb", recordschema:MARC21-xml, parser:marcxml, fixes:"marc_map(245a,dc_title);remove_field(record)")'
look at her go ππ
πΈ PARAMETERS πΈ
path
this is where in the perl hash your query is chillin'. like, the exact address of it.
peep "PATHS" in Catmandu::Fix if you wanna know more about how paths work π«Ά
url
the base URL of the SRU server. that's it, that's the whole thing β¨
recordschema
the SRU record schema, bestie. if you don't know what's on the menu, hit up the SRU Explain operation to look up which schemas are actually available.
default? 'oai_dc' π«
parser
this one controls how the records get parsed before they're imported. very "let me handle this" of it.
available parsers: 'marcxml', 'meta', 'mods', 'picaxml', 'raw', 'simple', 'struct'.
default is 'simple' π§
limit
maximum number of records to fetch per request. don't be greedy π
default is 10.
total
maximum number of records to fetch from a result set. also a cap, but a bigger-picture cap π
fixes
a Catmandu::Fix to transform the parsed records of the SRU response. basically you get to restyle the fit after it arrives π
π SEE ALSO π
Catmandu::FixCatmandu::SRU
π AUTHOR π
Johann Rolschewski "<jorol at cpan.org>" β icon, legend, the blueprint fr fr π
and that's the whole page, bestie!! this was perl v5.38.2, dated 2021-09-02, served up as User Contributed Perl Documentation π go forth and slay your SRU queries πβ¨
π¦ 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