Skip to content

vitorgalvao/mdscriptfilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdScriptFilter

mdScriptFilter is a command-line tool to search the macOS Spotlight database, similar to mdfind, and return JSON suitable for Alfred’s Script Filter Input and Grid View.

Installation

Download the latest release and include it in your Alfred workflow. The executable is signed and notarised.

Usage

Queries in mdScriptFilter use the same syntax as metadata queries in mdfind. Run mdscriptfilter --help to see available options and defaults.

A couple of examples of doing the same search with both tools:

Finding Screenshots on the Desktop

mdfind 'kMDItemIsScreenCapture == 1' -onlyin ~/Desktop
mdscriptfilter 'kMDItemIsScreenCapture == 1' --positive-scope ~/Desktop

Finding PDFs with Specific Text

mdfind 'kMDItemTextContent == "fruits and vegetables" && kMDItemContentType == "com.adobe.pdf"'
mdscriptfilter 'kMDItemTextContent == "fruits and vegetables" && kMDItemContentType == "com.adobe.pdf"'

Build

Use the build in the releases if you want to use mdScripFilter in a workflow. To build it yourself for development:

# Clone the repository
git clone git@github.com:vitorgalvao/mdscriptfilter.git

# Change to directory
cd mdscriptfilter

# Build
swift build --configuration release --arch arm64 --arch x86_64

The output binary will be in the same directory, under .build/apple/Products/Release.

License

3-Clause BSD

About

Search Spotlight database and output result as Script Filter (or Grid View) JSON for Alfred

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages