Skip to content

Instantly share code, notes, and snippets.

@jorol
Created May 5, 2023 15:13
Show Gist options
  • Save jorol/989ea5dd464fb85bd99b4733710d2890 to your computer and use it in GitHub Desktop.
Save jorol/989ea5dd464fb85bd99b4733710d2890 to your computer and use it in GitHub Desktop.
SRU & OAI-PMH client examples

SRU & OAI-PMH clients

SRU

Catmandu::Importer::SRU

$ catmandu convert -v SRU \
--base https://services.dnb.de/sru/zdb \
--recordSchema MARC21-xml \
--query 'tit = soil biology' \
--parser marcxml \
to MARC --type XML --pretty 1 > zdb-soil-biology.xml

Index Data yaz-client

https://software.indexdata.com/yaz/doc/yaz-client.html

Datei gvk-sru.txt mit den notwendigen Kommandos:

open http://sru.k10plus.de/gvk
set_marcdump gvk-perl.xml
find pica.sw=Perl
show 1+50
exit

SRU-Suche ausführen:

$ yaz-client -f gvk-sru.txt

OAI-PMH

Catmandu::Importer::OAI

https://metacpan.org/pod/Catmandu::Importer::OAI

$ catmandu convert -v OAI \
--url https://services.dnb.de/oai/repository \
--metadataPrefix MARC21-xml \
--set zdb \
--from 2023-03-08 \
--until 2023-03-08 \
--handler marcxml \
to MARC --type XML --pretty 1 > zdb-oai.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment