Lightroom - batch captions for photos

markrichardson

Judge Judy
Suspended / Banned
Messages
1,852
Name
Mark
Edit My Images
Yes
Hi everyone,

Bit of an odd request.

I'm about to try a new shopping cart for online sales, and the text in the Cart uses the caption.

All I want to do is to be able to give each image a unique (sequential) Caption (e.g. Photo 1, Photo 2), but Lightroom doesn't seem to be able to do this for anything other than filename.

Anyone have a suggestion?
 
Are you doing this with the Lightroom Web galleries or trying to write the caption into the metadata?
 
I was trying to do it with metadata (though the final output is through a custom web gallery)
 
If you are using the Lightroom Export function to get your images out then Mogrify may be your answer.
It allows the watermark text to include metadata.
This gallery is an example where three separate photographers have contributed and I've pulled the watermark from the image copyright metadata. It works really well!
 
If you are using the Lightroom Export function to get your images out then Mogrify may be your answer.
It allows the watermark text to include metadata.
This gallery is an example where three separate photographers have contributed and I've pulled the watermark from the image copyright metadata. It works really well!

Thanks Duncan but I think you've missed what I'm trying to do - I'm trying to create the metadata rather than use the metadata.

Is it possible to edit the cart instead?

I'm looking into that, but its actionscript which I have no experience with. I contacted the author, but no response yet.
 
You can do this in Bridge very easily, here is an example script that puts the caption in the Headline field with sequence number for CS3 or CS4...
Code:
#target bridge 
addSequenceCaptionToHeadline(); 
function addSequenceCaptionToHeadline(){ 
if( xmpLib == undefined ) { 
      if( Folder.fs == "Windows" ) 
      {var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.dll";} 
      else {var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";} 
      var libfile = new File( pathToLib ); 
      var xmpLib = new ExternalObject("lib:" + pathToLib ); 
} 
var Caption = "Photo Test ";
var sels = app.document.selections; 
for(var a =0; a<sels.length;a++){ 
var thumb = sels[a]; 
   if(thumb.hasMetadata && sels[a].type == "file"){ 
      var selectedFile = thumb.spec;    
      var myXmpFile = new XMPFile( selectedFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);       
      var myXmp = myXmpFile.getXMP();       
      myXmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "Headline"); 
      myXmp.setProperty(XMPConst.NS_PHOTOSHOP, "Headline", Caption+(a+1), 0); 
      if (myXmpFile.canPutXMP(myXmp)) { 
		  myXmpFile.putXMP(myXmp);
         myXmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY); 
         } 
      } 
   } 
}
 
I wonder if that script could be used in Lightroom? I keep meaning to download the SDK to see if I can play with things like that.
 
Back
Top