Author Topic: Keywords in Hot Code Replacement  (Read 1164 times)

Offline jldodge

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Keywords in Hot Code Replacement
« on: November 19, 2023, 03:05:56 AM »
I have a hierarchical keyword structure that I use in Photo Mechanic 6. If I input keywords during the ingesting process inside a Hot Code replacement file, will the hierarchical structure be maintained? In other words, when I look at the metadata for a picture, will the keywords look the same as if I had entered them manually for each image? Thanks in advance for your help.

Offline Bob Russell

  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 258
    • View Profile
    • Camera Bits, Inc.
Re: Keywords in Hot Code Replacement
« Reply #1 on: November 20, 2023, 01:09:14 PM »
Ingest will apply the metadata to the copied files using the IPTC Metadata Template. You can test how the Metadata Template updates a file without Ingesting. Just setup the Metadata Template from the Image menu with your Keywords and Hot Codes in the Keywords field. Click the Close Template button at the bottom to save the updates.

Now open the IPTC Metadata Info dialog for any image you want to update and click the Apply Metadata Template button at the bottom. The Keywords field should be updated to match the Keywords field in the Metadata Template. Any Hot Codes should be expanded including any pipe symbols for the hierarchical keywords. If the Keywords field is updated to your satisfaction, then you can apply the Metadata Template to the selected group or use it during your next Ingest session.

Best regards,

--Bob
« Last Edit: November 20, 2023, 01:25:10 PM by Bob Russell »

Offline jldodge

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: Keywords in Hot Code Replacement
« Reply #2 on: December 05, 2023, 10:51:37 AM »
When I execute a code replacement file during ingest, the keywords are enclosed in quotation marks, e.g. "keyword1, keyword2, keyword3", etc. None of the other replacements are enclosed in quotes. I have edited the txt file to remove the quotes and the quotation marks still show up in the metadata panels. What do I need to do to automate the ingestion process so that the quotation marks do not appear in the keyword section of the metadata? Thanks ...

Offline Bob Russell

  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 258
    • View Profile
    • Camera Bits, Inc.
Re: Keywords in Hot Code Replacement
« Reply #3 on: December 05, 2023, 11:12:42 AM »
Photo Mechanic should not be adding any quotes to any of the fields. When keywords are surrounded by quotes, that typically comes from saving the text file from Excel or similar apps. You can avoid the quotes by selecting all in the spread sheet app and then drag the selection into your Text Editor app. Now save the text file.  You can also batch remove the quotes using the Find and Replace utility from the Edit menu. Just Find the " character and Replace it with an empty field. Check the box to Treat repeating fields as a single string. Select just the Keywords field to search and click the Replace button.  Can you send your Hot Code text file, if you are still having problems?

Best regards,

--Bob

Offline jldodge

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: Keywords in Hot Code Replacement
« Reply #4 on: December 05, 2023, 01:01:46 PM »
I have edited the text file, before ingesting, to remove the quotes. Still, all of the keywords are included in the metadata with quotation marks. I'm confused why it is only occurring on the keywords and not other text cells. Any help would be appreciated. I'm thinking there is something to do with the commas in the text file but I cannot figure how to handle multiple keywords in the excel cell. Thanks again ...

Offline Bob Russell

  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 258
    • View Profile
    • Camera Bits, Inc.
Re: Keywords in Hot Code Replacement
« Reply #5 on: December 05, 2023, 02:23:18 PM »
I did see some quotes in your text file but none were in the Keywords column. I removed the quotes and tested your file with some of my sample images. So far the IPTC fields seem to be updating correctly after Applying the Metadata (IPTC) Template, and without any quotes. I am attaching your updated text file (E_Template_for_Ingesting.txt). Can you try it to see if it fixes the problem you are having with the extra quote characters?

Best regards,

--Bob

Offline jldodge

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: Keywords in Hot Code Replacement
« Reply #6 on: December 05, 2023, 03:25:06 PM »
Very interesting ... The file I sent you did not have ANY quotation marks in it when I viewed it in Notepad. Anyway, your version worked and there were no quotation marks in the keyword field. Can you tell me what you did and what apps you used because I have tried it with Notepad++ and was not successful. Thanks again ... Now I just need to replicate on my end for future ingesting.

Offline jldodge

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: Keywords in Hot Code Replacement
« Reply #7 on: December 06, 2023, 05:10:15 AM »
I performed a "copy-paste" action from Excel to Notepad++ and it worked fine. Not sure what is going on but it's a very acceptable alternative.