4 Replies Latest reply on Sep 28, 2016 10:29 AM by alanterra

    Help with custom metadata

    alanterra Level 1

      Hi

       

      I have some custom metadata in my database, and I would like to fill it out using text in the Instructions IPTC field. For instance here is the value of the Instructions field and the custom metadata I want to fill in.

      Screen Shot 2016-09-26 at 15.53.37.jpg

      Screen Shot 2016-09-26 at 15.53.47.jpg

      Any thoughts about how to automate this? I am quite willing to purchase a plugin if there is one that would make this easy, but I haven't found that plugin yet.

       

      A

        • 1. Re: Help with custom metadata
          johnrellis Most Valuable Participant

          You need a plugin to set custom metadata fields, and I don't know of any plugin that can set arbitrary custom fields. 

           

          So you'd have to write you own.  If you're an experienced programmer, it would probably take you 6-8 hours minimum, probably longer, to learn the Lua programming language and the LR SDK before you finally had something adequate.

          • 2. Re: Help with custom metadata
            john beardsworth Adobe Community Professional & MVP

            johnrellis wrote:

             

            You need a plugin to set custom metadata fields, and I don't know of any plugin that can set arbitrary custom fields.

             

            So you'd have to write you own. If you're an experienced programmer, it would probably take you 6-8 hours minimum, probably longer, to learn the Lua programming language and the LR SDK before you finally had something adequate.

            And the plugin must be the same plugin that defined those fields. One plugin cannot update another plugin's custom fields.

             

            And 6-8 hours? Maybe that is true for "experienced programmers" but depending on your starting point, it seems way under what I'd suggest would be needed.

            • 3. Re: Help with custom metadata
              john beardsworth Adobe Community Professional & MVP

              This looks like a case of asking how to reach the top of a mountain and getting the answer "you don't start from here"....

               

              My Capture Time to Exif plugin is designed to update the EXIF metadata fields which your custom fields have (partly) duplicated, and its main use is for scans like in your example. But it is designed so you enter the data directly in the plugin, not parsing it from another field. So it might be helpful if you are still entering the original metadata.

              • 4. Re: Help with custom metadata
                alanterra Level 1

                Thanks, you two heros of plugin development. The fields were defined using Rob Cole's Custom Metadata Plugin, so I have the defining constants for the fields, and I have (by necessity) done a little programming in Lua. But honestly, I don't want to go down this path. I think the 8-hour estimate is low by my own self-assessment.

                 

                Thinking more about this, I see two ways forward (although there are many other alternatives).

                 

                One is to write a script (perhaps in bash) that uses exiftool to parse the Instructions field and sets various keywords, then use the metadata panel to separate by keywords and set the custom metadata for each value, and then clear the keywords. I have more experience in bash than Lua, but I never feel comfortable working in it.

                 

                The other is to do text searches in the "IPTC metadata" fields in Grid view, and then use John Beardsworth's Search-Replace-Transfer to remove those strings after each pass. So I would search for, e.g., "Searchable IPTC" "Contains All" "Focal Length: 90", set the custom data to that field, and then remove the string "Focal Length: 90<CR>" from the Instructions field, and continue until all values of "Focal Length:" are consumed. Thank you, John, for allowing one to replace carriage returns in your Search-Replace-Transfer, as that allows me to clear out the string completely. This solution relies on the strings being unique across all IPTC fields, but I think that this is true. It will be a boring day to do this, but I have good music.

                 

                Oh, and btw, I thought about putting these data in the EXIF fields, but since things like pushing and pulling can't be put there, it seemed pointless to put just some of the data in these fields, and leave the rest as "the same problem, but reduced in size".

                 

                Alan