Catman...search(3pm)

πŸ’– Catmandu::Fix::viaf_match β€” aka the Catman...search(3pm) page, but make it cute πŸ’–

okay bestie, listen up, because this one is a whole moment. It lives in the User Contributed Perl Documentation corner of the Catman...search(3pm) universe, and it's literally just "go find this person's name in VIAF" energy. Obsessed. πŸ¦‹


🌸 NAME 🌸

Catmandu::Fix::viaf_match β€” perform a search for a name in VIAF πŸŽ€

✨ SYNOPSIS ✨

like, this is how you'd actually call it:

viaf_search(authorName, -lang:'nl-NL', -fallback_lang:'en-US')

that's it. that's the vibe. πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

So what this fix does is it goes and performs a search for a name, no cap. And not just one place β€” it queries both mainHeadingEl and the local.personalNames. Like, thorough. It checks everywhere. Queen behavior. πŸ‘‘

Then it hands you back the prefLabel in whatever lang you asked for, orrrr it falls back to fallback_lang if there's no label in your lang. And if fallback_lang also isn't there? Yeah, the prefLabel comes back empty. tragic, but that's the rules. 😭

And the fix returns a list, where each element is shaped like this:

{
  'dcterms:identifier' => 'The identifier',
  'guid'               => 'The VIAF URL',
  'schema:birthDate'   => 'Birth date, if provided',
  'schema:deathDate'   => 'Death date, if provided',
  'schema:description' => 'Description, if provided',
  'skos:prefLabel'     => 'prefLabel, in lang or fallback_lang'
}

look at those keys. so structured. so slay. ✨

πŸŽ€ PARAMETERS πŸŽ€

Required parameters (you gotta, bestie)

  • path β€” the path to the name. that's the whole thing. no path, no search. πŸ™ˆ

Optional parameters (nice to have, not mandatory)

  • lang β€” the language of the returned skos:prefLabel. If it can't find one, it falls back to fallback_lang. Use IETF language tags for this one β€” here's the link so you can be that girl who cites her sources: <https://en.wikipedia.org/wiki/IETF_language_tag> 🌈
  • fallback_lang β€” the fallback language. the backup bestie. the one who shows up when nobody else does. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Pieter De Praetere <pieter at packed.be > β€” icon, legend, the moment. πŸ’–

Copyright 2017- PACKED vzw β€” respect the legacy, fr fr. ✨

πŸ’… LICENSE πŸ’…

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, go off, but follow the rules. πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

  • Catmandu
  • Catmandu::VIAF
  • Catmandu::Store::VIAF
  • Catmandu::Fix::viaf_match

iykyk. the whole family tree. πŸ”₯


and that's the page, bestie! πŸ₯° this masterpiece was brought to you by perl v5.36.0, dated 2023-02-04, and it's the Catman...search(3pm) page β€” so if you ever forget where you read it, you know exactly where to look. mwah. πŸ’‹πŸŒΊβ­