I've poked around with the options in Jeffrey Friedl's “Metadata Wrangler” Export Filter for Adobe Lightroom Classic. I created an export filter for when I export images to WordPress directly from Adobe Lightroom Classic. My filter adds camera information to the Title field of the image while becomes the image caption in WordPress. For example, the export filter template below creates an image caption like in example image that follows:{CameraName?{CameraName} | } {LensInfo?{LensInfo} | } {Aperture?{Aperture} | } {ISO?{ISO}}FujiFilm X-T2 | XF16-55mmF2.8 R LM WR @ 55 mm | f/2.8 | ISO 200I noticed right away that the lens name was not what I had expected. It was missing the Fujinon branding. This omission is not a limitation of Jeffrey’s export filter. The Metadata Wrangler Export Filter uses the information stored in Adobe Lightroom, which does not have the lens manufacturer information. The Metadata Wrangler can not extract information that isn't available. However, I wanted a solution.While reading the Template Token help page for Jeffrey’s plugins, I learned that a solution was possible if I used the special {LUA} token. This token allows you to execute arbitrary Lua code in Metadata Wrangler. I don't know Lua, but I learned enough from Jeffrey's examples on the help page and the Patterns tutorial on the Lua wiki to get some working code. All Fujinon images either start with XF or XC but I have XF lenses only. To test out my code, I downloaded Lua to my Linux server. The code snippet below is all I needed.{LUA= if Lens ~= 'XF*' then return sprintf("%s", "Fujinon") end }I combined that snippet with my existing filter template.{CameraName?{CameraName} | } {LUA= if Lens ~= 'XF*' then return sprintf("%s", "Fujinon") end } {LensInfo?{LensInfo} | } {Aperture?{Aperture} | } {ISO?{ISO}}FujiFilm X-T2 | Fujinon XF16-55mmF2.8 R LM WR @ 55 mm | f/2.8 | ISO 200All Fujinon images either start with XF or XC but I have XF lenses only. When or if the need arises, I may update the code to account for that.
Share:

Twitter
Facebook

Like this:

Like Loading...


Related