3 Replies Latest reply on Jul 6, 2017 7:42 AM by johnrellis

    Keyword tagging - can it be automated through LR called from Powershell?

    SailorGuy57 Level 1

      I have tens of thousands of scanned photos that don't have digital metadata.  I have manually organized them into thousands of date-specific folders with sequential date-specific filenames like 20170101-New_Years_Party-001.jpg and 20170101-New_Years_Party-002.jpg, etc.

       

      I want to catalog these photos with a number of custom keywords (tags) beyond the typical date and location categories (like subject, activity, event, person name, media type, etc.).

       

      I wrote a Powershell-driven script utility to call EXIFTOOL to set some of the date metadata value in the JPG files, but what I really need is a way to programatically define numerous keywords on a batch of image files at one time via LR so I can filter and search based on a complex set of boolean criteria (like "all photos from 1995 through 1997 for Christmas and Halloween events in Chicago with Fred Smith or Amy Jones").

       

      Is there a programming interface / API called via PowerShell that can show/set/change the keywords?

       

      And in a related topic.... Is there any way to run a report on a batch of image files that will list all the keywords assigned to a file?  For example:  I'd like to run a report of a folder of photos to see what keywords are or are not defined on the photos.

       

      Thanks in advance,

       

      Sailor Guy

        • 1. Re: Keyword tagging - can it be automated through LR called from Powershell?
          JimHess Adobe Community Professional & MVP

          There might be a plug-in or two that will do some of the things that you are looking for. But I'm not aware of them. I don't use very many plug-ins myself. As you may be aware, the only file Lightroom opens or modifies is its catalog, which is a SQL database. Images displayed in Lightroom are image objects in that database, and all adjustments made to those images are stored in the catalog or database.

          1 person found this helpful
          • 2. Re: Keyword tagging - can it be automated through LR called from Powershell?
            john beardsworth Adobe Community Professional & MVP

            SailorGuy57  wrote

             

            Is there a programming interface / API called via PowerShell that can show/set/change the keywords?

             

            It's called the SDK , is in Lua, and there's a forum here. It accepts http calls in the format lightroom://pluginname?args which can be interpreted by your Lua code (you have to define a URLHandler), so your Powershell scripts would need to generate these calls.

             

            To be frank, if you don't want to learn Lua you'd be better off learning how to use Lightroom better - its keywording tools are pretty powerful and efficient. Providing you have entered the metadata, the Library Filter can handle "all photos from 1995 through 1997 for Christmas and Halloween events in Chicago with Fred Smith or Amy Jones" and more (you could continue to enter dates in Exiftool if you want - also see this).

             

            Stay away from the SQL - that's why there's an SDK.

            • 3. Re: Keyword tagging - can it be automated through LR called from Powershell?
              johnrellis Most Valuable Participant

              I wrote a Powershell-driven script utility to call EXIFTOOL to set some of the date metadata value in the JPG files, but what I really need is a way to programatically define numerous keywords on a batch of image files at one time via LR so I can filter and search based on a complex set of boolean criteria (like "all photos from 1995 through 1997 for Christmas and Halloween events in Chicago with Fred Smith or Amy Jones").

              ...

              For example:  I'd like to run a report of a folder of photos to see what keywords are or are not defined on the photos.

              Between your Powershell/Exiftool script and the capabilities of LR, from what you've said, you've got the bases covered.  For example, to see what keywords are or are not assigned to the photos of a folder, select the folder as a source, Then select all the photos in the folder.  In the Keywording panel, you'll see all the keywords of those photos, with the ones that appear on some but not all being starred.

               

              If you give a little more detail about in particular LR can't do for you, then we can be more specific about suggestions.

              1 person found this helpful