Jump to content

Search Alfred Workflows (Alfred 4)


Recommended Posts

Search Alfred Workflows

Alfred Workflows help to search in Title, Keyword, Description of a workflow and open it in various actions.

 

Requires Alfred 4!

 

Github: https://github.com/Acidham/search-alfred-workflows

 

Options

  • ENTER - Shows a list of keywords in the workflow and starts the workflow with a keyword
  • CMD - For addtional Actions:
    • Copy path to Clipboard
    • Open WF Folder in Terminal (cd )
    • Reveal in Finder
    • Open in ForkLift (requires ForkLift installed)

Config

  • exclude_disabled: True - ignore disabled workflow in search
  • terminal_path: EMPTY opens in macOS shell or path to custom terminal

Screen Shot 2019-05-31 at 16.16.10.png

Link to post

It’s not working for me:

 

ERROR: Search Alfred Workflows[Script Filter] Code 1: Traceback (most recent call last):
  File "/Users/MyUsername/Dropbox/Sync/Alfred.alfredpreferences/workflows/user.workflow.88E26D31-D3BB-49EB-B363-DFD40BC8BC70/alf.py", line 102, in <module>
    Workflows = Workflows()
  File "/Users/MyUsername/Dropbox/Sync/Alfred.alfredpreferences/workflows/user.workflow.88E26D31-D3BB-49EB-B363-DFD40BC8BC70/Workflows.py", line 23, in __init__
    self.workflows = self._get_workflows_list()
  File "/Users/MyUsername/Dropbox/Sync/Alfred.alfredpreferences/workflows/user.workflow.88E26D31-D3BB-49EB-B363-DFD40BC8BC70/Workflows.py", line 109, in _get_workflows_list
    i = self.get_item(w)
  File "/Users/MyUsername/Dropbox/Sync/Alfred.alfredpreferences/workflows/user.workflow.88E26D31-D3BB-49EB-B363-DFD40BC8BC70/Workflows.py", line 95, in get_item
    if plist_info['disabled'] and self.exclude_disabled:
KeyError: 'disabled'

 

Link to post
36 minutes ago, Acidham said:

Which version of Alfred are you using and which version of the Workflow?

 

I'm getting the same error. The problem appears to be that very old (Alfred 2 vintage) workflows don't necessarily have the disabled key.


I changed the line to if plist_info.get('disabled') and self.exclude_disabled: and everything works great.

 

This workflow is awesome!

Link to post
Quote

Edit: `Press enter to proceed with Keyword:` does not work for me

 

From just the description, it is a feature not a bug ;) 

 

In case a Workflow has no Keyword,ScriptFilter or ListFilter you cannot proceed to the next step because there is nothing to choose. 

 

Otherwise please provide more info. 

Link to post
On 6/4/2019 at 6:19 AM, Acidham said:

 

From just the description, it is a feature not a bug ;) 

 

In case a Workflow has no Keyword,ScriptFilter or ListFilter you cannot proceed to the next step because there is nothing to choose. 

 

Otherwise please provide more info. 

 

Are you sure it's the current behaviour for keywords? I was pretty sure that in my last PR this was changed to not listing blank keywords. It seems to me @bk161124 is running an outdated version of the workflow.

Link to post

I can't get it to work on my system. It is showing this:

[09:59:26.904] ERROR: Search Alfred Workflows[Script Filter] Code 1: Traceback (most recent call last):
  File "/Users/raguay/Dropbox (Personal)/Richard/rag/Alfred/Sync/Alfred.alfredpreferences/workflows/user.workflow.AE1D5FC6-3500-4FA7-8FE2-002FE5D04553/alf.py", line 102, in <module>
    Workflows = Workflows()
  File "/Users/raguay/Dropbox (Personal)/Richard/rag/Alfred/Sync/Alfred.alfredpreferences/workflows/user.workflow.AE1D5FC6-3500-4FA7-8FE2-002FE5D04553/Workflows.py", line 23, in __init__
    self.workflows = self._get_workflows_list()
  File "/Users/raguay/Dropbox (Personal)/Richard/rag/Alfred/Sync/Alfred.alfredpreferences/workflows/user.workflow.AE1D5FC6-3500-4FA7-8FE2-002FE5D04553/Workflows.py", line 109, in _get_workflows_list
    i = self.get_item(w)
  File "/Users/raguay/Dropbox (Personal)/Richard/rag/Alfred/Sync/Alfred.alfredpreferences/workflows/user.workflow.AE1D5FC6-3500-4FA7-8FE2-002FE5D04553/Workflows.py", line 74, in get_item
    plist_info = self._get_plist_info(plist_path)
  File "/Users/raguay/Dropbox (Personal)/Richard/rag/Alfred/Sync/Alfred.alfredpreferences/workflows/user.workflow.AE1D5FC6-3500-4FA7-8FE2-002FE5D04553/Workflows.py", line 45, in _get_plist_info
    return readPlist(plist_path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
    rootObject = p.parse(pathOrFile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
    parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 832, column 12

I'm not a python guru, so I'm not completely sure why it's dying. My workflows are in a sync directory in Dropbox. That might be causing some of the problem?

Link to post

I would say that would be an enhancement request for Alfred Preferences  @Andrew

 

I never discovered a WF where info.plist was malformed and I expected that Alfred will throw an error in case  info.plist is corrupt. 

 

So far we don't know what exactly caused the issue. Can you ( @raguay.customct) figure out which workflow caused the issue and share the WF with me for further investigation?

You can figure it out in case the enabled workflow cannot be found by alf.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...