Acidham 33 Posted May 31 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 4 1 askedrelic, baggiohua, joeynotjoe and 2 others reacted to this Quote Share this post Link to post
bk161124 1 Posted June 3 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' Quote Share this post Link to post
Acidham 33 Posted June 3 @bk161124 Which version of Alfred are you using and which version of the Workflow? Quote Share this post Link to post
deanishe 1,067 Posted June 3 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! Quote Share this post Link to post
Acidham 33 Posted June 3 @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! Quote Share this post Link to post
bk161124 1 Posted June 4 (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 by bk161124 Quote Share this post Link to post
deanishe 1,067 Posted June 4 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… Quote Share this post Link to post
Acidham 33 Posted June 4 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. Quote Share this post Link to post
xilopaint 67 Posted June 5 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. Quote Share this post Link to post
Acidham 33 Posted June 6 4 hours ago, Jakub Sypiański said: The icons are missing in my case. Which icons ? Screenshot would help! Quote Share this post Link to post
Jakub Sypiański 4 Posted June 7 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. 1 CuteCat reacted to this Quote Share this post Link to post
Acidham 33 Posted June 7 @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... 1 Jakub Sypiański reacted to this Quote Share this post Link to post
Acidham 33 Posted June 7 Done and released on Git! 4 Jakub Sypiański, CuteCat, JJJJ and 1 other reacted to this Quote Share this post Link to post
deanishe 1,067 Posted June 7 Very nice improvement! 1 CuteCat reacted to this Quote Share this post Link to post
raguay.customct 46 Posted June 10 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? Quote Share this post Link to post
deanishe 1,067 Posted June 10 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. Quote Share this post Link to post
Acidham 33 Posted June 10 @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 Quote Share this post Link to post
raguay.customct 46 Posted June 10 (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 by raguay.customct Quote Share this post Link to post
Acidham 33 Posted June 10 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. Quote Share this post Link to post
Reddibit 0 Posted June 10 I love your workflow, but I'm also wondering how you setup that awesome theme (appearance) in your topic. Quote Share this post Link to post
Acidham 33 Posted June 10 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? Quote Share this post Link to post
Reddibit 0 Posted June 10 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? Quote Share this post Link to post
Acidham 33 Posted June 10 Ah ok. It's the Frosty Dark theme by @LiSongcheng with some minor adjustments: https://db.tt/5o0usLEo7l Quote Share this post Link to post