How to maintain a list of metadata mappings outside of the script
The embedded metadata contains keywords that need to be mapped to specific Dublin Core fields. In the process the keyword may need to be transformed into another value. The list of these mappings and transformations needs to be kept in a file outside of the script that a non-technical person can maintain.
Other interested parties
I hope so!
Possible Solution approaches
I think a csv (or tab deliminated) file might b the way to go. It should have 3 columns: 1) keyword from embedded metadata, 2) what the keyword should be transformed to, 3) what Dublin Core field should be used. Bash, python, and php approaches were considered with php winning because of the way exiftool can output data in a php-friendly manner. Example of a configuration file might be:
ec, Binghamton University Events Center, dc:subject
bl, Glen G. Bartle Library, dc:subject
"defleur", "DeFleur, Lous B., 1936-", "dc:contributor"
administration, Binghamton University Administrators Photographs, dcterms:isPartOf
There are over 45,000 photos with this embedded metadata. This can not be done by hand but we want the best descriptive metadata as possible and want to take advantage of the work the photographers put into embedding descriptive metadata,
Having the metadata in the photos from the photographer is a huge benefit, but we need to extract it and remap it. Some code that looks for all keywords in the corpus of photo metadata would be of great help for te people who create the mappings, in our case a metadata librarian. An easy way to extract these from our photos is the following GNU/Linux command: