koha-ark - Manage ARK identifiers in a Koha Catalog
version 1.0.2
Process biblio records from a Koha Catalog in order to update its ARK identifiers. See The ARK Identifier Scheme. The processing is driven by ARK_CONF Koha system preference. It's a json variable. For example:
{ "ark": { "NMHA": "myspecial.institution.fr", "NAAN": "12345", "ARK": "http://{NMHA}/ark:/{NAAN}/catalog{id}", "koha": { "id": { "tag": "099", "letter": "a" }, "ark": { "tag": "003" } } } }
ARK_CONF system preference must contains several elements:
NMHA — Name Mapping Authority Hostport. Usually it's a hostname, the hostname of the Koha system itself, or the hostname of a proxy server (or link resolver).
NAAN — Name Assigning Authority Number. It's a number identifying the institution, ie the Library using Koha. This number is provided for example by the California Digital Library (CDL),
ARK — It's a template used to build the ARK. Three placeholders can be used in the template: NMHA and NAAN from ARK_CONF, and id (Koha biblio record unique identifier extracted from koha.id field).
NMHA
NAAN
id
koha.id — The biblio record field which contains Koha unique id (biblionumber or another id). Contains 2 variables: tag and letter, si it could be a control or a standard field. For example, {"tag": "001"} or {"tag": "099", "letter": "a"}.
tag
letter
{"tag": "001"}
{"tag": "099", "letter": "a"}
koha.ark — The biblio record field used to store the ARK. It could be a control or standard field. That's this field in which this script will store the generated field. This is also the field that this script can clear entirely.
There are two commands: clear and update
koha-ark clear clears the ARK field (koha.ark variable) in all biblio records of the Catalog.
koha-ark clear
koha.ark
koha-ark update processes all biblio that have an empty ARK field. The ARK field is created with the appropriate ARK identifier. The ARK is build based on ARK variable from ARK_CONF. For the above ARK_CONF, the biblio record that has 9877 biblionumber will have this in 003 field:
koha-ark update
ARK
9877
http://myspecial.institution.fr/ark:/12345/biblio9877
koha-ark clear --doit koha-ark update --noverbose --doit koha-ark update --log debug
Without this parameter biblio records are not modified in Koha Catalog.
Enable script verbose mode. Verbose by default. --noverbose disable verbosity. In verbose mode, a progress bar is displayed.
The log level. Info about processing is sent to a file named 'koha-ark.log' in the current directory. This parameter controls the log level of the info sent to this file. Values: debug, info, error. By default, 'info'. With 'error', nothing is logged except fatal errors, like ARK_CONF bad syntax. With 'debug', a lot of information is produced, like biblio records before/after processing.
Print this help page.
Frédéric Demians <f.demians@tamil.fr>
This software is Copyright (c) 2018 by Fréderic Demians.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
To install Koha::Contrib::ARK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Koha::Contrib::ARK
CPAN shell
perl -MCPAN -e shell install Koha::Contrib::ARK
For more information on module installation, please visit the detailed CPAN module installation guide.