Skip to content

The Eclectic Light Company

Macs, painting, and more
Main navigation
  • Downloads
  • M1 & M2 Macs
  • Mac Problems
  • Mac articles
  • Art
  • Macs
  • Painting
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
  • M1 & M2 Macs
  • Mac problem-solving
  • Painting topics
  • Painting
  • Long Reads

Search

Monthly archives

  • January 2023 (64)
  • December 2022 (74)
  • November 2022 (72)
  • October 2022 (76)
  • September 2022 (72)
  • August 2022 (75)
  • July 2022 (76)
  • June 2022 (73)
  • May 2022 (76)
  • April 2022 (71)
  • March 2022 (77)
  • February 2022 (68)
  • January 2022 (77)
  • December 2021 (75)
  • November 2021 (72)
  • October 2021 (75)
  • September 2021 (76)
  • August 2021 (75)
  • July 2021 (75)
  • June 2021 (71)
  • May 2021 (80)
  • April 2021 (79)
  • March 2021 (77)
  • February 2021 (75)
  • January 2021 (75)
  • 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

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

Statistics

  • 13,727,920 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, Sparsity, 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
  • Mac Troubleshooting Summary
  • LockRattler: 11.0 Big Sur
  • M1 & M2 Macs
  • Mints: a multifunction utility
  • LockRattler: 12.x Monterey
  • VisualLookUpTest
  • Virtualisation on Apple silicon
  • LockRattler: 13.x Ventura
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.

  • Follow Following
    • The Eclectic Light Company
    • Join 3,124 other followers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d bloggers like this: