Catman...e::VIAF(3pm)

πŸ¦‹ Catmandu::Store::VIAF β€” the manual page, but make it cute

okay bestie, so this is the man page for Catmandu::Store::VIAF, section 3pm, from the User Contributed Perl Documentation (that's the manual name, consider it folded in like a little bookmark πŸ’–). It lives in the Catmandu universe and its whole personality is: go ask the VIAF authority file about a person and come back with a record. Let's get into it.


✨ NAME ✨

Catmandu::Store::VIAF β€” Retrieve items from VIAF 🌸


🌈 SYNOPSIS 🌈

Three ways to use it, bestie. Pick your fighter.

From the command line:

# From the command line
$ catmandu export VIAF --id 102333412 to YAML
---
dcterms:identifier: '102333412'
guid: http://viaf.org/viaf/102333412
schema:birthDate: 1775-12-16
schema:deathDate: 1817-07-18
schema:description: English novelist
skos:prefLabel: Jane Austen
...

From a Catmandu Fix:

# From a Catmandu Fix
lookup_in_store(
    objectName,    # objectName is a field containing the VIAF identifier
    VIAF
)

From Perl code:

# From Perl code
use Catmandu;

my $store = Catmandu->store('VIAF')->bag;

my $item = $store->get('102333412');

print $item->{'skos:prefLabel'} , "\n";  # Jane Austen

πŸ’… DESCRIPTION πŸ’…

A Catmandu::Store::VIAF is a Perl package that can query the VIAF authority file over at http://viaf.org/ β€” yes that's the whole vibe, it's an authority file and this store is obsessed with it.

Real talk though: this store supports only one method, get, to retrieve an AAT record by its identifier. That's it. One method. It's giving minimalist. ✨


πŸŽ€ CONFIGURATION πŸŽ€

lang

The lang parameter is optional and defaults to nl-NL. It sets the language of the returned prefLabel. And listen β€” if no prefLabel for the viaf_id in the provided lang exists, the prefLabel for the fallback_lang is used instead. So you always got a backup, no cap. 🫢

fallback_lang

Optional. Defaults to en-US. 🌸


πŸ‘‘ METHODS πŸ‘‘

new(%configuration)

Create a new Catmandu::Store::VIAF. Fresh out the box, main character energy. πŸ’…

get($id)

Retrieve a VIAF record given an identifier. Returns a record like:

{
  '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'
}

add()

Not supported 😭

delete()

Not supported 😭

each()

Not supported 😭

lowkey tragic that add, delete and each are all "Not supported", but we respect the boundaries. She does one thing and she does it well. periodt.

πŸ’œ AUTHOR πŸ’œ

Pieter De Praetere <pieter at packed.be > πŸ¦‹


Copyright 2017- PACKED vzw


⭐ LICENSE ⭐

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


πŸ”₯ SEE ALSO πŸ”₯

  • Catmandu
  • Catmandu::VIAF
  • Catmandu::Fix::viaf_search
  • Catmandu::Fix::viaf_match

and that's the whole page, bestie πŸ’– this lil doc rode in on perl v5.36.0, dated 2023-02-04, and it's the Catman...e::VIAF(3pm) situation β€” go forth and look up some authors, iykyk πŸŒˆβœ¨πŸŽ€