OAI_PMH(1)

πŸ“¦
version 4.13 Β· 2 versions
, in fedora 43

πŸ’– 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 for GetRecord or ListMetadataFormats.
  • --metadataPrefix <mdp> β€” specify the format of the metadata you wanna retrieve.
  • -X, --request <command> β€” the verb you're requesting. defaults to ListRecords.
  • --set <oai set> β€” request only those records that live in a set.
  • --until <ISO datetime>
not me noticing that --from and --until got 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