Jump to content

Robert Hartshorn

Member
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Robert Hartshorn

  1. Hello, 

     

    I am using Alfred 4 along with a custom python script filter that utilizes mdfind to search our company's file shares that are hosted over AFP on a Windows server via a third party tool (Acronis File Connect). Alfred file filters cannot tap into the emulated spotlight index, likely for some good reason that is beyond me, and so with some kind advice from the Alfred team, I went this way instead with a custom implementation of mdfind.

     

    The script filter works great and the results show in Alfred as expected.

     

    My question is: is it possible to pass a workflow variable via the args/vars utility to a script filter?

     

    The reason is: We now need to replace each file filter with a script filter. ATM, that means hardcoding the search scope into the script filter. I would prefer to pass the search scope to the script filter via an upstream variable. I considered Workflow Environment Variables in lieu of the args/var utility, but that got messy quick.

     

    Any advice will be greatly appreciated. One consideration was loading a workflow env variable with key value pairs, casting that to json in the script, and pulling the entry where key = script filter keyword. That seems beefy and I wanna avoid slowing down the script where possible.

×
×
  • Create New...