Acidham Posted May 31, 2019 Posted May 31, 2019 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 deanishe, baggiohua, joeynotjoe and 3 others 4 2
bk161124 Posted June 3, 2019 Posted June 3, 2019 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'
Acidham Posted June 3, 2019 Author Posted June 3, 2019 @bk161124 Which version of Alfred are you using and which version of the Workflow?
deanishe Posted June 3, 2019 Posted June 3, 2019 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!
Acidham Posted June 3, 2019 Author Posted June 3, 2019 @deanishe yeah I thought the same but I do not have an "vintage" workflow available. I implemented your fix and released on git (0.6.6). Please test. Thx for chiming in!
bk161124 Posted June 4, 2019 Posted June 4, 2019 (edited) Nice it works now 😊Thanks for the fix and the workflow, it’s so easy to forget how to trigger all those nice tools! Edit: `Press enter to proceed with Keyword:` does not work for me Edited June 4, 2019 by bk161124
deanishe Posted June 4, 2019 Posted June 4, 2019 1 hour ago, bk161124 said: Edit: `Press enter to proceed with Keyword:` does not work for me Got the debugger log? "Doesn't work" isn't really an actionable description of a problem…
Acidham Posted June 4, 2019 Author Posted June 4, 2019 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.
xilopaint Posted June 5, 2019 Posted June 5, 2019 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.
Acidham Posted June 6, 2019 Author Posted June 6, 2019 4 hours ago, Jakub Sypiański said: The icons are missing in my case. Which icons ? Screenshot would help!
Jakub Sypiański Posted June 7, 2019 Posted June 7, 2019 I've just realised that your screenshot doesn't show workflows' icons. Sorry, my bad. But I think it could be a nice addition to add them to the workflow, if possible. CuteCat 1
Acidham Posted June 7, 2019 Author Posted June 7, 2019 @Jakub Sypiański got it! You mean you would like to see the icon of the workflow instead of the "hat" icon? Good idea, I will take a look at it... Jakub Sypiański 1
Acidham Posted June 7, 2019 Author Posted June 7, 2019 Done and released on Git! Jakub Sypiański, JJJJ, CuteCat and 1 other 4
raguay.customct Posted June 10, 2019 Posted June 10, 2019 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?
deanishe Posted June 10, 2019 Posted June 10, 2019 It’s an XML parse error. It seems that one of your workflows has an invalid info.plist. Or perhaps a non-XML one. The workflow probably needs a try … except to catch workflows it can’t read.
Acidham Posted June 10, 2019 Author Posted June 10, 2019 @raguay.customct Thx for reporting ! Never thought about malformed Workflow info.plist 😕 Added try/except block when reading plist ... 0.7.2 ... please try since I do not have malformed workflows installed
raguay.customct Posted June 10, 2019 Posted June 10, 2019 (edited) @Acidham That does work. It would be nice to collect the list of malformed workflows and show it to the user or a way to access it. That way I'll know which ones need to be fixed. Edited June 10, 2019 by raguay.customct
Acidham Posted June 10, 2019 Author Posted June 10, 2019 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.
Reddibit Posted June 10, 2019 Posted June 10, 2019 I love your workflow, but I'm also wondering how you setup that awesome theme (appearance) in your topic.
Acidham Posted June 10, 2019 Author Posted June 10, 2019 6 minutes ago, Reddibit said: I love your workflow, but I'm also wondering how you setup that awesome theme (appearance) in your topic. Not sure what you mean?
Reddibit Posted June 10, 2019 Posted June 10, 2019 55 minutes ago, Acidham said: Not sure what you mean? In your main post you show the following theme: Can you share the theme / appearance you are using in Alfred?
Acidham Posted June 10, 2019 Author Posted June 10, 2019 Ah ok. It's the Frosty Dark theme by @LiSongcheng with some minor adjustments: https://db.tt/5o0usLEo7l
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now