4 Replies Latest reply on Feb 27, 2011 3:58 PM by areohbee

    Lua function to replace metatags in a string?

    DFBurns Level 1

      (Maybe this is a recipe request for the new cookbook site.)

       

      I'd like a function that, given a string and a LrPhoto, will search and replace tags in the string with metadata from the photo. So, given a string 'The title of this photo is {{title}}', it would return a string where {{title}} has been replaced with the LrPhoto.getRawMetadata('title') (or maybe getFormattedMetadata). I'm sure it's been written more than once. Is there one out there to be shared before I write my own?

       

      db