Stephen_C Posted July 28, 2024 Posted July 28, 2024 I apologise for the length of this post but there is a reasonable amount to explain about this workflow. This is very much a first release and I am interested to know if it works, and is helpful, for others. Prerequisites for using this workflow 1. You must have installed the free command line utility ExifTool. 2. With version 1.0 of this workflow you must be using either .cr2 or .dng image files—and either: be using .xmp sidecar files to store the image metadata; or be embedding the metadata in the RAW file (there is an option for that in the workflow configuration). Note that production of the results is faster when searching for sidecar files than it is when searching for metadata embedded in the RAW files. Warning This workflow works for me using .xmp data created in sidecar files by Photo Mechanic and/or Capture One. However, when viewing historic .cr2 files processed in Lightroom the description field (although it appears in the initial search results) does not appear when displaying the metadata for an individual file. Be aware there may be oddities displaying that field depending on the software you use to create the sidecar files. What this workflow does The primary purpose of this workflow (designed for photographers) is to allow you to search for, and list, sidecar .xmp files in a given folder that is within Alfred's default search scope. It then displays each found filename and the description field extracted from the .xmp file, like this: Note that you can search the results either by the filename or the description. If, on a selected filename, you press: ⏎ you can (according to the setting in the workflow configuration) view the related image file either in Alfred's Image View (the default) or in your default app for that file; ⌥⏎ you can view a selection of the image metadata ⇧⏎ you can reveal the related image file in Finder. Here's an example of the viewed metadata for a file: Note that if you view an image in Alfred's Image View or view an image's metadata pressing Esc will take you back to the list of results. Searching for embedded metadata Searching for metadata embedded in RAW files (see the option in the workflow configuration) is slower than searching for metadata contained in .xmp files. I recommend you use it only as a fallback if you have not used sidecar files or if searching the sidecar files does not produce the expected results. Why this workflow works as it does 1. It is very much faster to read the initial metadata from .xmp files than it is to retrieve metadata which might (or might not) be embedded in the RAW files. 2. The only link between an .xmp file and its linked image file (so far as I am aware) is the identical pre-extension name (e.g. A mountain scene.dng is linked to A mountain scene.xmp simply because both share A mountain scene in the filename). 3. As a result of 2 if we scan all .xmp files in a folder we do not know if they all relate to RAW image files of an identical kind (e.g., all .dng files)—or whether there could be mixed among them other files of a different kind (e.g., .cr2, .jpg, .tiff, etc.). 4. When we are dealing with .xmp files we have to substitute for the .xmp extension the appropriate RAW file extension in order to view the file or extract all of the relevant metadata. That is why the workflow creates a temporary list of all of the relevant files (i.e., those specifically linked to the RAW file extension set in the configuration)—and why you may not see all of the files in a particular folder. In other words, for example, if a folder contains both .dng and .cr2 images you will see only those for which you have set the relevant RAW file type in the configuration. You have to run the workflow again, changing the RAW file configuration, to see the other set of RAW files in the folder. Adding other RAW file types It should be possible relatively easily to add other RAW file types to the workflow if there is sufficient interest. In order to do so I would need to know the extension for the RAW file type and also have a sample image file to test. GitHub download link Stephen Floating.Point 1
FireFingers21 Posted July 29, 2024 Posted July 29, 2024 That was fast! Nice to see you got everything working.
Stephen_C Posted July 29, 2024 Author Posted July 29, 2024 (edited) Version 0.2 substantially improves extraction of the description field when using .xmp files. Stephen Edited July 29, 2024 by Stephen_C Forgot board does not do markdown <sigh>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now