1. Maripat says:

    Hi Carl,
    I am really enjoying all of your information for using Photo Mechanic. I’ve started by using PM 6 on my new machine this year.

    I am keyboarding a LOT of photos. I have structured keywords for family members. Is there a way to keep the structured keyword dialog box open? At present after I hit apple (or command A), the box disappears. I would love for it to remain open so I can use it for the next photo.

    Thanks for doing all of your hard work. Your information is my “go to”!

    • Carl Seibert says:

      Hi, This has come up a couple of times and it always leaves me in a quandary. On my copy on PM6+, the dialog stays open until I close it. When I read your comment, I thought “Ah, maybe entering the contents of the collection with the keystroke instead of the mouse like I do is the issue.” But no, I just tried it that way and it still works fine. So, maybe you should make sure your copy of Photo Mechanic is at the latest version, close it and restart, maybe even restart your machine, and after all that see if the problem persists. If it does, pop over to the Camera Bits forums and post. Camera Bits’ forums are terrific. The actual developers are there and more often than not the person who responds is lead developer Kirk Baker himself. Please let me know when you get this figured out!

      On a side note, the keystroke [keystroke] opens (and closes) the structured keywords dialog. I realize that’s not responsive to your issue, but it is still good to know.

  2. Graham Prentice says:

    I suspect that Maripat is using the version of Structured Keywords panel that is called from the Metadata Info panel applicable to a single image. This is dismissed on pressing enter because it only affects the single selected image. Calling it from the main menu bar or pressing [keystroke] produces the main Structured Keywords panel which should be persistent, the contents being separately applied to the selected images using one of the three alternative Apply to…. buttons at the bottom right of the panel. The version called from the Metada Info panel dropdown button does not have these Apply to… buttons because the contents are automatically applied when Enter is pressed. You can see which version you are using from the nature of the buttons at the bottom right of the panel.

    Hope that helps.


    • Carl Seibert says:

      BINGO! Give that man a cigar! That’s it! – Maripat and others who land here from Google, Graham has the answer. The one-at-a-time version of the Structured Keywords panel only affects a single image. Thus, it closes when you apply, just like the Metadata Editor panel. Using the “main” version of the panel solves the problem.

      Graham – I’m waiting a moment to post your Lightroom keywords cleaning tip until I’ve tested it. It looks exactly on-target to me. I’ll have to build some test samples in Lightroom and go from there. It’ll take a couple of days. (I have gotten away from Lightroom’s catalog – by using ON1 🙂 So. I’m not in Lightroom much anymore.) When I approve the comment, I’ll put an update in the blog post itself, pointing to the comment.

  3. Graham Prentice says:

    A tip for tidying up the keywords duplicated by Lightroom. You need to get rid of the duplicates, which Photo Mechanic does for you if you replace the spacer bar in Lightroom’s output with a comma (or semi-colon if this is your keyword separator). You can easily do this with Find and Replace using Grep.

    I have all my non-exporting Lightroom categories enclosed in square brackets.

    If you use Find and Replace, with “Grep” and “Treat repeating fields as a single string” both checked, you can tidy up the keywords immediately. The Find box string is ([\|]{1})|(\[(.*?)\]) The Replace box should contain a single comma. Make sure that only Keywords are selected in the list of metadata to be affected.

    Running Find and Replace, which can be on as many images as you care to select at once, with differing keywords if you wish, will delete all text within square brackets (including the brackets themselves) and replace all separators with commas. The result is that the keywords are duplicated, but Photo Mechanic automatically deletes the duplicates, leaving you with a single complete set of keywords for each image, comma separated, without the additional messy hierarchical strings introduced by Lightroom.

    Note that this means you now have a single set of flat keywords, but Photo Mechanic does not not add these back into its Structured Keywords panel. Your structured keywords in Photo Mechanic are therefore untainted by the output from Lightroom. If you later update the metadata for the image(s) in Lightroom, the keywords will show up in Lightroom’s catalogue as additional flat keywords. This kind of forces you to commit to one or the other for maintaining your DAM, as it now gets messy in Lightroom, but PM seems to me to be better for keywords. You unfortunately cannot get away from Lightroom’s catalogue for retaining Lightroom’s edits, but you do not have to use it for keywords.


    • Carl Seibert says:

      I have made a sidebar to this post, just about dealing with Lightroom-induced keyword weirdness. You can read it here: https://www.carlseibert.com/clean-up-lightroom-keywords-in-photo-mechanic/

      I tried to add an update to this post with a link to the new sidebar. But sadly, I’m experiencing some instability on my site, particularly on this post. Basically, if I try to edit this particular post, I crash my site. I’m limited to what I can say in this comment.

      You can also check out Graham’s comments here. I tested his methods and they work. Do be sure to have backups in hand, though, as always! If you haven’t used the non-exporting-keywords-as-category-labels hack in Lightroom, Graham’s basic plan can be executed in an even simpler way. If all you need to do is unpack those ugly pipe-separated Lightroom node strings, it’s likely that you can just do a simple Find and Replace without even having to use Grep. Find “space-pipe”, replace with a comma. Or, simpler yet, just leave them. They’re ugly, but not harmful!

      On the other hand, if you are afflicted with non-exporting keywords giving you unexpected search results, well then, the method in Graham’s two comments will fix your situation right up.

      I’m not able at the moment to predict whether Graham’s comments will appear above or below this one. Please accept my apologies and scroll until you find him.

      Thanks Graham!

  4. Graham Prentice says:

    Thanks for the response – sadly, I don’t smoke! 🙂

    The keywords cleaning up tip should work. My grep string relies on there being an opening and closing square bracket for non-exporting categories inherited from Lightroom that I want to strip out. I see from the examples given in your article that your categories commence with a tilde, but have no standard terminating character.

    The revised grep string ([\|]{1})|(~(.*?)\,) works for your system, so far as I can see from a few test keywords I have created in your format. This looks for a string commencing with a tilde (~) and ending with a comma. The only caveat is that if (somehow) you had a category as a final keyword, PM would strip out the final comma and Find and Replace using this grep string would not remove that final category. This should be entirely theoretical, however, since Lightroom should not be including a top level keyword with no child keyword, meaning that in real life the string commencing with a tilde would always terminate with a comma.

    There are other ways of achieving the same thing. If you use Find and Replace in PM, you have then to open the image after applying Find and Replace to see the effect, and whether you like it or not, the changes have been saved. An alternative is to use a clipboard manager to achieve the same thing, while working with the metadata itself (per image) in the Metadata (IPTC) Info panel. I use the excellent ClipboardFusion from Binary Fortress (free, or very reasonable licence fee).

    I have created for ClipboardFusion both a trigger (which can run on selected text copied to the clipboard) and a macro, either of which will apply the grep string to the selected keywords and copy the result to the clipboard. Select the keywords, copy to clipboard, run the trigger or macro and paste the result back into the keywords field in the Metadata (IPTC) Info panel. You will then see exactly how the grep command has affected your keywords (which will be duplicated) with the Metadata (IPTC) Info panel still open, so that you can accept and save if you are happy with the result, or reject the changes if you are not. Once the changes have been saved, PM will automatically delete the duplicates and any surplus commas and spaces. This is quite a good way of testing the concept on individual files to build up confidence that it always works, before using the grep command via PM’s built-in Find and Replace on a large selection of images for which there is no immediate Undo available. Triggers for ClipboardFusion can operate as simple text replacement (with the grep string as the “Match” string, a comma as the “replace” string, and set to “Regular Expression” mode). If anyone would like my very simple ClipboardFusion macro which does the same thing, I can happily supply this.

  5. Hi Carl,
    thanks for the great & helpful article on keywording with Photo Mechanic. I’ve got a question: When I update my structured keyword list with synonyms (for example translations in different languages) is there an easy opportunity to update the existing keyword collection of an image with all the new synonyms in one or two clicks? Or do I have to update the pathes to the new synonyms individually?

    Thanks a lot, Kilian

    • Carl Seibert says:

      One approach I can think of would be to re-keyword the image with the Structured Keywords tool. If your hierarchical string was something like “ships > sailing > corvette”, and now you have synonyms that are the Spanish and Ukrainian translations of those keywords, double-clicking on “corvette” should fill the keyword collection field with those three keywords and six more translated synonyms. Make sure that the “Append” tickbox is selected to protect any keywords you added to the image manually, and apply. When Photo Mechanic applies the new keywords, you’ll have three duplicates. But Photo Mechanic automatically skips duplicate keywords, so your keywords will be nice and tidy. Actually, duplicate keywords don’t do any harm at all. But since PM does tidy them up, that’s a good thing.

      So, how many clicks is that? One double-click once you have found the deepest keyword, which seems like a bit of work.

      A way to do it in batches would be to use Find and Replace. In the corvette example, you could gather up your corvette pictures by whatever means you have available (In Photo Mechnic Plus, if the images are already cataloged, you could just search. On a Mac, you could use the Spotlight feature in Photo Mechanic, or if the corvette pictures were in a certain folder, you could just let Find and Replace find them.) Then, specifying the keywords field, replace the string “ships, sailing, corvette” with something like “ships, sailng, corvette, buques, navegar, corbeta, корвет, плавання, кораблі” and you can update a bunch of images in one go. It’s a little trickier to do in real life, so be sure to make a backup and practice on a few sacrificial copies to make sure you have all the syntax right.

      Yet another way would be to use the Template Editor to append the new keywords into selected images. (Be careful to use the “Append” tickmark, lest you accidentally delete your existing keywords!)

      I hope that helps.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.