Skip to content

The Eclectic Light Company

Macs, painting, and more
Main navigation
  • Downloads
  • Mac problems
  • Art
  • Macs
  • Painting
  • General
  • Life
hoakley February 10, 2018 Macs, Technology, xattr

Hazel and SearchKeyLite bring order to your documents

I’ve got thousands of Mac and iOS screenshots on my iMac, many going back fifteen years, and a few even older. I add to them at a rate of knots too, sometimes as many as a hundred in a month. The problem with screenshots is, of course, there is no useful metadata which you can use to search them, or to sort them into folders.

Having discovered that noodlesoft’s superb Hazel can perform actions on the basis of extended attribute (xattr) content, I have been experimenting with the combination of SearchKeyLite (with SearchKey) and Hazel to organise my screenshots for me.

The first, and most tedious, task is to add suitable metadata to each of the screenshots. I did this in two phases: I set some xattrs, such as the Creator and the start of the Keywords, for all the screenshots using SearchKey first.

hazelxattrs01

All I did was dump a copy of all the screenshots into a single folder, then used SearchKey’s batch feature to add the common xattr content, as shown.

hazelxattrs02

I then dragged and dropped batches of those files onto SearchKeyLite, and gave them informative text in each of the xattrs, particularly the Keywords. As I intend sorting them on the basis of Keyword content, that needs careful thought so that Hazel can retrieve the key text from each set of Keywords. For example, I don’t take as many screenshots in iOS, and want them to be tucked away in their own folder. So each iOS screenshot has the characters " iOS " inside its Keywords.

I then built my folder system ready to handle the task: one folder into which to put unsorted files for sorting, then a hierarchy of folders to contain the sorted screenshots, such as that for iOS.

I opened the Hazel pane in System Preferences, added the sorting folder to its list of folders at the left, and added the first rule to be applied to that folder.

To set xattr content as the attribute to be used in a condition, I opened the first popup menu containing Name, and scrolled to the bottom for the Other… item.

hazelxattrs03

This brings up a panel with a white background listing all the available extended attributes. In this case, I was after Keywords, as saved by SearchKeyLite.

hazelxattrs04

I then set up a search for matched text, in my case keywords such as iOS sandwiched between Anything.

hazelxattrs05

The final step is to set up the action on satisfying that condition: in my case, to move the file to one of my sorted folders.

hazelxattrs06

I ended up with four rules to sort my screenshots into four separate folders, according to the text contained within their Keywords xattr.

hazelxattrs07

This is easy to debug interactively, tweaking the rules in Hazel, and adjusting the Keywords xattrs for the files using SearchKeyLite. Once happy that it was working as intended, I threw the first hundred screenshots at the sorting folder, and let Hazel get on with organising them for me.

My screenshots are now tagged with metadata in their xattrs which lets me locate them using Spotlight search. They’re organised into folders, making it much easier for me to browse them when I’m looking for a previous image. And as I add more, provided that I spend a minute or two adding xattrs using SearchKeyLite, I have saved a lot of time when I need to come back to them.

Share this:

  • Twitter
  • Facebook
  • Reddit
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Related

Posted in Macs, Technology, xattr and tagged extended attributes, folder action, Hazel, metadata, SearchKey, SearchKeyLite, xattr. Bookmark the permalink.

2Comments

Add yours
  1. 1
    The Real Nirv on March 22, 2018 at 10:21 pm

    I am curious, are these spotlight attributes that your app can batch populate to files in a folder the same or totally unrelated to exif data?

    Here is why I ask, I would love to find a way to populate images with exif data because some web platforms, like Squarespace can be triggered to read that data and import it. Entering this info one a file by file basis is just out of the question and because I use an app called ImageOptim which strips exif data I am wondering if your app can help.

    I should also ask if ImageOptim’s ability to strip exif data would leave spotlight attributes untouched.

    Hope my message makes sense.

    Thanks for your apps and articles, they are terrific.

    LikeLiked by 1 person

    • 2
      hoakley on March 22, 2018 at 10:27 pm

      They are quite different. EXIF data are stored within the data of the file, within the file format, and remain there no matter what platform the file is on.
      SearchKey and SearchKeyLite store their metadata in extended attributes, which are stored separately from the data of the file.
      An app which strips EXIF data should leave extended attributes untouched.
      Thank you for your kind words too.
      Howard.

      LikeLike

·Comments are closed.

Quick Links

  • Downloads
  • Mac Troubleshooting Summary
  • Mac problem-solving
  • Painting topics
  • Painting
  • Long Reads
  • Life

Search

Monthly archives

  • January 2021 (45)
  • December 2020 (77)
  • November 2020 (84)
  • October 2020 (81)
  • September 2020 (79)
  • August 2020 (103)
  • July 2020 (81)
  • June 2020 (78)
  • May 2020 (78)
  • April 2020 (81)
  • March 2020 (86)
  • February 2020 (77)
  • January 2020 (86)
  • December 2019 (82)
  • November 2019 (74)
  • October 2019 (89)
  • September 2019 (80)
  • August 2019 (91)
  • July 2019 (95)
  • June 2019 (88)
  • May 2019 (91)
  • April 2019 (79)
  • March 2019 (78)
  • February 2019 (71)
  • January 2019 (69)
  • December 2018 (79)
  • November 2018 (71)
  • October 2018 (78)
  • September 2018 (76)
  • August 2018 (78)
  • July 2018 (76)
  • June 2018 (77)
  • May 2018 (71)
  • April 2018 (67)
  • March 2018 (73)
  • February 2018 (67)
  • January 2018 (83)
  • December 2017 (94)
  • November 2017 (73)
  • October 2017 (86)
  • September 2017 (92)
  • August 2017 (69)
  • July 2017 (81)
  • June 2017 (76)
  • May 2017 (90)
  • April 2017 (76)
  • March 2017 (79)
  • February 2017 (65)
  • January 2017 (76)
  • December 2016 (75)
  • November 2016 (68)
  • October 2016 (76)
  • September 2016 (78)
  • August 2016 (70)
  • July 2016 (74)
  • June 2016 (66)
  • May 2016 (71)
  • April 2016 (67)
  • March 2016 (71)
  • February 2016 (68)
  • January 2016 (90)
  • December 2015 (96)
  • November 2015 (103)
  • October 2015 (119)
  • September 2015 (115)
  • August 2015 (117)
  • July 2015 (117)
  • June 2015 (105)
  • May 2015 (111)
  • April 2015 (119)
  • March 2015 (69)
  • February 2015 (54)
  • January 2015 (39)

Tags

Adobe APFS Apple AppleScript App Store backup Big Sur Blake Bonnard bug bugs Catalina Consolation Console diagnosis Disk Utility Doré El Capitan extended attributes Finder firmware Gatekeeper Gérôme HFS+ High Sierra history history of painting iCloud Impressionism iOS landscape LockRattler log logs Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 malware Metamorphoses Mojave Monet Moreau MRT myth narrative naturalism OS X Ovid painting Pissarro Poussin privacy realism riddle Rubens Sargent scripting security Sierra Swift symbolism Time Machine Turner update upgrade van Gogh vulnerability xattr Xcode XProtect

Statistics

  • 7,516,578 hits
Blog at WordPress.com.
Footer navigation
  • About & Contact
  • Macs
  • Painting
  • Language
  • Tech
  • Life
  • General
  • Downloads
  • Mac problem-solving
  • Extended attributes (xattrs)
  • Painting topics
  • Hieronymus Bosch
  • English language
  • LockRattler: 10.12 Sierra
  • LockRattler: 10.13 High Sierra
  • LockRattler: 10.11 El Capitan
  • Updates: El Capitan
  • Updates: Sierra, High Sierra, Mojave, Catalina, Big Sur
  • LockRattler: 10.14 Mojave
  • SilentKnight, silnite, LockRattler, SystHist & Scrub
  • DelightEd & Podofyllin
  • xattred, Metamer, Sandstrip & xattr tools
  • 32-bitCheck & ArchiChect
  • T2M2, Ulbow, Consolation and log utilities
  • Cirrus & Bailiff
  • Taccy, Signet, Precize, Alifix, UTIutility, alisma
  • Revisionist & DeepTools
  • Text Utilities: Nalaprop, Dystextia and others
  • PDF
  • Keychains & Permissions
  • LockRattler: 10.15 Catalina
  • Updates
  • Spundle, Cormorant, Stibium, Dintch, Fintch and cintch
  • Long Reads
  • LockRattler: 11.0 Big Sur
  • Mac Troubleshooting Summary
Secondary navigation
  • Search

Post navigation

The Tables Turned: Painters paint photographers
The Rise of the Clinic: 1, family medicine

Begin typing your search above and press return to search. Press Esc to cancel.

Cancel
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
%d bloggers like this: