This post shows you how to customise the labels associated with IPTC metadata in Lightroom 3 through to 6. To achieve this you create a file in a specific format using a text editor. Here’s how…
I work on image digitisation projects where we use Adobe’s Lightroom as a metadata entry tool. Our approach is to embed the core metadata in the IPTC fields of each image. When the images are ready for ingestion to the Web site, a script extracts the metadata and populated the database fields. This approach has the advantage that (1) the metadata remains with the image so orphan images issues and database migration should be easier in the future, and (2) metadata entry and ingestion can be divided into more discrete, manageable steps.
Schema
IPTC fields are not designed for an image archive so we first had to map the fields we needed for the project onto the available IPTC fields to produce our in-house schema. This has not always been easy due to character length restrictions in the original IPTC specification. Some programs are more strict than others in applying field lengths, and we’ve found that new programs and even new versions of programs, have to be fully tested to see whether they truncate the data.
Re-labelling metadata field lists
Lightroom is tolerant on field lengths and, when paired with the plugin LR/Transporter, gives us batch manipulation and bulk copying of metadata. Another reason we like Lightroom is the ability to re-label the fields. Although there is a plugin that will help, it is relatively straight-forward to use a text editor for the re-labelling. The main purpose of this blog post is to make some information about this public, so here’s how to change the field labels:
Outline
- Create a folder in your user area called (on Windows 7 machines):
c:\Users\[username]\AppData\Roaming\Adobe\Lightroom\Metadata Field Lists
On Macs:
~/Library/Application Support/Adobe/Lightroom/Metadata Field Lists
- Save the script that tells Lightroom what labels to use into this folder with the extension .lrtemplate
- Run Lightroom (or re-start it if it’s already running) and this template will appear in the drop-down list. Lightroom will remember which template you last used and will start with this next time.
Editing the script
It helps if you have a script to start with so here’s ours for you to copy-and-paste into a text editor:
-- Custom field names for entering SOAS metadata via Lightroom
-- Malcolm Raggett, 2011-06-27
return {
title = "SOAS Fields",
items = {
{
"com.adobe.label",
label = "About this file",
},
"com.adobe.metadataStatus",
"com.adobe.filename",
"com.adobe.filepath",
{
"com.adobe.imageFileDimensions",
label = "Original W x H",
},
{
"com.adobe.imageCroppedDimensions",
label = "Cropped W x H",
},
"com.adobe.separator",
{
"com.adobe.label",
label = "Digitisation Assistant input",
},
{
formatter = "com.adobe.supplementalCategories",
label = "Collection"
},
{
formatter = "com.adobe.intellectualGenre",
label = "Catalogue reference"
},
{
formatter = "com.adobe.source",
label = "Format of original"
},
{
formatter = "com.adobe.creatorState",
label = "Media type"
},
{
formatter = "com.adobe.creatorCountry",
label = "Language"
},
{
formatter = "com.adobe.city",
label = "Original reference"
},
{
height_in_lines = 2,
topLabel = true,
formatter = "com.adobe.headline",
label = "Original caption"
},
"com.adobe.country",
{
formatter = "com.adobe.provider",
label = "Creator of Original"
},
"com.adobe.copyright",
{
formatter = "com.adobe.descriptionWriter",
label = "Publisher"
},
{
formatter = "com.adobe.creator",
label = "Copy taken by"
},
{
formatter = "com.adobe.dateCreated",
label = "Date of copy"
},
{
formatter = "com.adobe.creatorAddress",
label = "For citation use"
},
"com.adobe.separator",
{
"com.adobe.label",
label = "Consultant input",
},
{
formatter = "com.adobe.title",
topLabel = true
},
{
height_in_lines = 5,
allow_newlines = true,
label = "Description",
topLabel = true,
formatter = "com.adobe.caption"
},
{
formatter = "com.adobe.state",
label = "State/Province"
},
"com.adobe.location",
{
formatter = "com.adobe.creatorZip",
label = "Geodata KML"
},
{
formatter = "com.adobe.creatorWorkPhone",
label = "Date of original"
},
{
height_in_lines = 3,
allow_newlines = true,
label = "Cross-reference",
topLabel = true,
formatter = "com.adobe.instructions"
},
{
formatter = "com.adobe.creatorCity",
label = "Ethnic group"
},
{
formatter = "com.adobe.scene",
label = "Sort Order"
}
},
}
The syntax is from the Lua scripting language, which thankfully is not very obscure (there is documentation from Adobe if you have time to burn!). There is very little you can do other than rearrange, re-label and sectionalise the labels. Here are the rules:
- the title in the head section is what will appear in the Lightroom drop-down list, hence
title = “SOAS Fields”, (don’t forget the quotes or the comma) and it will look like this:
- Drop-down list showing standard and custom Metadata Field Lists
- if you want the metadata field to appear with the default label, just put an entry in the script like “com.adobe.metadataStatus”, (again, don’t forget the quotes or the comma)
- the order you put these statements is the order they will appear in the Lightroom Metadata pane
- to change the label use this syntax (you can write it all on one line if you want)
{
"com.adobe.imageFileDimensions",
label = "Original W x H",
},
the most difficult part is working our what comes after the com.adobe. Sometimes you can make an accurate guess based on the IPTC field name but Adobe make subtle changes that make some names difficult to guess. Here’s a list of the ones I’ve found:
"com.adobe.filepath",
"com.adobe.basename",
"com.adobe.filenameExtension",
"com.adobe.originalFilename.ifDiffers",
"com.adobe.originalFilename",
"com.adobe.fileFormat",
"com.adobe.metadataDate",
"com.adobe.audioAnnotation",
"com.adobe.rating.string",
"com.adobe.ratingAndLabel",
"com.adobe.combinedImageFileDimensions",
"com.adobe.filesize",
"com.adobe.megapixels",
"com.adobe.captureDateTime",
"com.adobe.dateTime",
"com.adobe.dateTime.dateOnly",
"com.adobe.dateTime.timeOnly",
"com.adobe.dateTimeOriginal",
"com.adobe.dateTimeOriginal.onlyIfUnique",
"com.adobe.dateTimeDigitized",
"com.adobe.subjectDistance",
"com.adobe.GPSAltitude",
"com.adobe.exposureProgram",
"com.adobe.exposureBiasValue",
"com.adobe.meteringMode",
"com.adobe.lensSetting",
"com.adobe.focalLength35mm",
"com.adobe.maxApertureValue",
"com.adobe.rightsUsageTerms",
"com.adobe.copyrightInfoURL",
"com.adobe.creatorWorkEmail",
"com.adobe.creatorWorkWebsite",
"com.adobe.creatorWorkPhone",
"com.adobe.creatorCountry",
"com.adobe.creatorZip",
"com.adobe.creatorState",
"com.adobe.creatorCity",
"com.adobe.creatorJobTitle",
"com.adobe.creatorAddress",
"com.adobe.filename",
"com.adobe.sidecars",
"com.adobe.copyname",
"com.adobe.folder",
"com.adobe.metadataStatus",
"com.adobe.caption",
"com.adobe.title",
"com.adobe.userComment",
"com.adobe.headline",
"com.adobe.provider",
"com.adobe.instructions",
"com.adobe.descriptionWriter",
"com.adobe.copyright",
"com.adobe.copyrightState",
"com.adobe.creator",
"com.adobe.dateCreated",
"com.adobe.intellectualGenre",
"com.adobe.scene",
"com.adobe.location",
"com.adobe.city",
"com.adobe.state",
"com.adobe.country",
"com.adobe.isoCountryCode",
"com.adobe.supplementalCategories",
"com.adobe.source",
"com.adobe.rating",
"com.adobe.colorLabels",
"com.adobe.captureTime",
"com.adobe.captureDate",
"com.adobe.imageFileDimensions",
"com.adobe.imageCroppedDimensions",
"com.adobe.exposure",
"com.adobe.exposureAndISO",
"com.adobe.focalLength",
"com.adobe.ISOSpeedRating",
"com.adobe.flash",
"com.adobe.make",
"com.adobe.model",
"com.adobe.lens",
"com.adobe.GPS",
"com.adobe.software",
and new in Lightroom 5.0:
"com.adobe.GPSImgDirection",
- if you want to insert a separator, use “com.adobe.separator”,
- and if you want to put a heading under this separator, use
{
"com.adobe.label",
label = "Put wording here",
},
- Save the file into the Metadata Field Lists folder with the extension .lrtemplate
If you make a mistake in the syntax Lightroom won’t tell you what’s wrong, it just won’t put your template into the drop-down list, so make sure your lines end with commas and the opening and closing braces balance.
If you have questions or additional information about metadata field lists, please add them as a comment to this post.
0.000000
0.000000