OAI_PMH(1)
π OAI_PMH(1) π
okay so bestie, gather round, because today we're talking about oai_pmh.pl, aka the little Perl script that pipes OAI-PMH straight to your command line like it's nothing. no cap. she's giving "User Contributed Perl Documentation" energy and honestly? iconic.
πΈ NAME πΈ
oai_pmh.pl β pipe OAI-PMH to the command-line π«Ά
that's it. that's the whole elevator pitch. short, sweet, slays.
β¨ SYNOPSIS β¨
oai_pmh.pl <options> [baseURL]
yes, baseURL is optional in the brackets sense, and <options> is where all the fun lives. let's get into it π
π OPTIONS π
--help--man--verboseβ be more verbose. and because it's repeatable, you can just keep saying it over and over like you're hyping yourself up in the mirror π more repeats, more verbosity.--forceβ force a non-conformant OAI request. bestie. this is the "I know what I'm doing" button. it does not make it conformant, it just forces it through. respect the chaos π--from<ISO datetime>--identifier<identifier>β the OAI identifier you wanna use forGetRecordorListMetadataFormats.--metadataPrefix<mdp>β specify the format of the metadata you wanna retrieve.-X,--request<command>β the verb you're requesting. defaults toListRecords.--set<oai set>β request only those records that live in a set.--until<ISO datetime>
not me noticing that--fromand--untilgot no description in the source β that's not me being lazy, that's just canon, i'm not about to make stuff up about them π
π₯ DESCRIPTION π₯
so the whole point: retrieve data from OAI-PMH endpoints π
and the output format? lowkey specific, so listen up:
<headers>
<content>
<FORMFEED>
where <headers> are in HTTP header format. the content will be the raw XML as exposed by the repository β no glow-up, no reformatting, straight off the shelf, periodt. and every single record is separated by a FORMFEED character. every one. no skipping. π¦
π example time π
for example:
oai_pmh.pl -X GetRecord --metadataPrefix oai_dc \
--identifier oai:eprints.soton.ac.uk:20 http://eprints.soton.ac.uk/cgi/oai2
look at her go. -X GetRecord for the verb, --metadataPrefix oai_dc for the format, --identifier oai:eprints.soton.ac.uk:20 for the record, and the baseURL riding along at the end. main character energy fr fr π
β reminder bestie: the content you get back is the raw XML as exposed by the repository, and records are separated by FORMFEED characters. that's the deal. iykyk.
and that's the whole page, my love π this little gem comes to you as User Contributed Perl Documentation from perl v5.42.0, dated 2025-07-25 β so go forth, harvest that metadata, and stay iconic β¨π
π¦ where this page comes from
- fedora 43: perl-HTTP-OAI 4.13-7.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms