Skip to content

Cookbook: Using CONTENTdm field nicknames instead of labels

Brandon Weigel edited this page Aug 29, 2018 · 2 revisions

By default, the mods\CdmToMods metadata parser uses the human-readable field labels in mappings files and metadata manipulators. If you would rather use the machine-readable nicknames, you can do so by adding use_nicknames = true to the [METADATA_PARSER] section in your .ini file, e.g.,

[METADATA_PARSER]
class = mods\CdmToMods
... other options go here...
use_nicknames = true

Your mappings file could then look like this:

"author","<name><namePart>%value%</namePart><role><roleTerm type=""text"" authority=""marcrelator"">Author</roleTerm><roleTerm type=""code"" authority=""marcrelator"">aut</roleTerm></role></name>"
"collea","<name><namePart>%value%</namePart><role><roleTerm type=""text"">collector</roleTerm></role></name>"
"determ","<name><namePart>%value%</namePart><role><roleTerm type=""text"">expert</roleTerm></role></name>"

This might be useful if the human-readable field labels contain spaces or other characters that make them difficult to use in mappings.

Cookbook table of contents

Clone this wiki locally