Jump to content
pochemuto

Alfred Keyword Help - find available keyword

Recommended Posts

Hi there! It's my first public workflow. It helps to forget keyword for workflow which was not used long time. Just type ? and the name of the action and you will see a list of available actions.

 

I hope that workflow will be useful  :)

 

Download

 

Github

Packal

 

Current version: 1.0.2

 

HfixeVO.jpg

CcOUKLf.jpg

Screenshot 1 Screenshot 2

Edited by pochemuto

Share this post


Link to post

Looks like a great idea, but it doesn't work for me (I'm on 10.6). As soon as I type ?, I get Alfred's default web search :(

After looking at the workflow source code, the problem is almost certainly that the workflow isn't compatible with 10.6. It uses the Python argparse module, which isn't present in Python 2.6 (the version on Snow Leopard).

When reporting errors in the future, could you follow the steps in this thread?

As a rule, stating your OS version and "it doesn't work" isn't generally enough information to fix a bug.

 

Edited by deanishe

Share this post


Link to post

Looks like a great idea, but it doesn't work for me (I'm on 10.6). As soon as I type ?, I get Alfred's default web search :(

 

I'll test workflow with python 2.6 and remove argparse dependency as deanishe suggests. Thanks for feedback :)

Share this post


Link to post

Looks like a great idea, but it doesn't work for me (I'm on 10.6). As soon as I type ?, I get Alfred's default web search :(

 

I upload updated version, test please  :)

Share this post


Link to post

Hi - the Packal link in the top post gets a 404 error

 

Ohh, it's true. I don't know why and I can't login in packal to do something. You can use download link in the top post or direct link in packal repo:

https://github.com/packal/repository/raw/master/com.pochemuto.alfred.workflow.AlfredHelp/alfred-keywords-help-1.0.1.alfredworkflow

In the Packal link follow to 1.0.0 version  :(

Share this post


Link to post

I upload updated version, test please  :)

 

I downloaded the newest version, but now I get a different type of error, as you can see in this image. As soon as I type ?, it says it's already scanning for files. After I type whatever I'm looking for, it still stays like that and no results are shown.

 

esAM9BE.png

 

And, as deanishe suggested, here's more info:

 

 

Starting debug for 'Alfred Keywords Help'

 

[STDERR: alfred.workflow.input.scriptfilter] 11:14:17 workflow.py:2140 DEBUG    Workflow version : 1.0.1

11:14:17 workflow.py:1543 DEBUG    Reading settings from `/Users/Name/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...

11:14:17 workflow.py:2401 DEBUG    Update check not due

11:14:17 workflow.py:1778 DEBUG    Loading cached data from : /Users/Name/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle

11:14:17 workflow.py:2349 DEBUG    update_data : {u'available': False}

11:14:17 background.py:188 DEBUG    Command arguments cached to `/Users/Name/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache`

11:14:17 background.py:192 DEBUG    Calling [u'/usr/bin/python', '/Users/Name/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B48DA96B-CCAD-4D18-B617-16EBE6AEEE5E/workflow/background.pyc', u'scan'] ...

11:14:18 workflow.py:2140 DEBUG    Workflow version : 1.0.1

11:14:18 workflow.py:2176 DEBUG    Workflow finished in 0.018 seconds.

11:14:18 workflow.py:2176 DEBUG    Workflow finished in 0.019 seconds.

11:14:18 background.py:197 DEBUG    Executing task `scan` in background...

11:14:18 workflow.py:2331 DEBUG    Set last run version : 1.0.1

11:14:18 workflow.py:2176 DEBUG    Workflow finished in 0.146 seconds.

[sTDERR: alfred.workflow.input.scriptfilter] 11:14:18 workflow.py:2140 DEBUG    Workflow version : 1.0.1

11:14:18 workflow.py:1543 DEBUG    Reading settings from `/Users/Name/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...

11:14:18 workflow.py:2401 DEBUG    Update check not due

11:14:18 workflow.py:1778 DEBUG    Loading cached data from : /Users/Name/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle

11:14:18 workflow.py:2349 DEBUG    update_data : {u'available': False}

11:14:18 background.py:188 DEBUG    Command arguments cached to `/Users/Name/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache`

11:14:18 background.py:192 DEBUG    Calling [u'/usr/bin/python', '/Users/Name/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B48DA96B-CCAD-4D18-B617-16EBE6AEEE5E/workflow/background.pyc', u'scan'] ...

11:14:18 workflow.py:2140 DEBUG    Workflow version : 1.0.1

11:14:18 workflow.py:2176 DEBUG    Workflow finished in 0.022 seconds.

11:14:18 workflow.py:2176 DEBUG    Workflow finished in 0.027 seconds.

11:14:18 background.py:197 DEBUG    Executing task `scan` in background...

11:14:18 workflow.py:2331 DEBUG    Set last run version : 1.0.1

11:14:18 workflow.py:2176 DEBUG    Workflow finished in 0.233 seconds.

[sTDERR: alfred.workflow.input.scriptfilter] 11:14:19 workflow.py:2140 DEBUG    Workflow version : 1.0.1

11:14:19 workflow.py:1543 DEBUG    Reading settings from `/Users/Name/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...

11:14:19 workflow.py:2401 DEBUG    Update check not due

11:14:19 workflow.py:1778 DEBUG    Loading cached data from : /Users/Name/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle

11:14:19 workflow.py:2349 DEBUG    update_data : {u'available': False}

11:14:19 background.py:188 DEBUG    Command arguments cached to `/Users/Name/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache`

11:14:19 background.py:192 DEBUG    Calling [u'/usr/bin/python', '/Users/Name/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B48DA96B-CCAD-4D18-B617-16EBE6AEEE5E/workflow/background.pyc', u'scan'] ...

11:14:19 workflow.py:2140 DEBUG    Workflow version : 1.0.1

11:14:19 workflow.py:2176 DEBUG    Workflow finished in 0.023 seconds.

11:14:19 workflow.py:2176 DEBUG    Workflow finished in 0.022 seconds.

11:14:19 background.py:197 DEBUG    Executing task `scan` in background...

11:14:19 workflow.py:2331 DEBUG    Set last run version : 1.0.1

11:14:19 workflow.py:2176 DEBUG    Workflow finished in 0.182 seconds.

[sTDERR: alfred.workflow.input.scriptfilter] 11:14:19 workflow.py:2140 DEBUG    Workflow version : 1.0.1

11:14:19 workflow.py:1543 DEBUG    Reading settings from `/Users/Name/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...

11:14:19 workflow.py:2401 DEBUG    Update check not due

11:14:19 workflow.py:1778 DEBUG    Loading cached data from : /Users/Name/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle

11:14:19 workflow.py:2349 DEBUG    update_data : {u'available': False}

11:14:19 background.py:188 DEBUG    Command arguments cached to `/Users/Name/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache`

11:14:19 background.py:192 DEBUG    Calling [u'/usr/bin/python', '/Users/Name/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.B48DA96B-CCAD-4D18-B617-16EBE6AEEE5E/workflow/background.pyc', u'scan'] ...

11:14:19 workflow.py:2140 DEBUG    Workflow version : 1.0.1

11:14:19 workflow.py:2176 DEBUG    Workflow finished in 0.019 seconds.

11:14:19 workflow.py:2176 DEBUG    Workflow finished in 0.020 seconds.

11:14:19 background.py:197 DEBUG    Executing task `scan` in background...

11:14:19 workflow.py:2331 DEBUG    Set last run version : 1.0.1

11:14:19 workflow.py:2176 DEBUG    Workflow finished in 0.149 seconds.

Share this post


Link to post

The problem is line 127 of alfredhelp.py:

log.debug('scanning {}'.format(workflows_dir))

needs to be: 

log.debug('scanning {0}'.format(workflows_dir))

 
In Python 2.6, the format method requires placeholders to be indexed (i.e. {0} {1}…, not just {} {}…).
 
@pochemuto: You can test Snow Leopard compatibility of your workflows by using python2.6 in the workflow. It's also available on newer OS versions. There is a list of Python 2.6 gotchas in Alfred-Workflow docs.

Edited by deanishe
Fix link

Share this post


Link to post

I just downloaded 1.0.2 and have the same issue Southgirl described.  I checked the source and it contains line 126:

 log.debug('scanning {0}'.format(workflows_dir))
as deanishe prescribes.  
 
I'd post my logs but they are more or less the same as Southgirl's.

Share this post


Link to post

Southgirl, sorry. Please check new 1.0.2 version. Download by link on top of the topic, I can't login in Packal to update there.

 

 

 

Ahhh, works like a charm now! Thanks :)

 

eta: just tested it on a MacBook running on 10.9 and it works great too.

Edited by Southgirl

Share this post


Link to post

Nice work, nice workflow, work very well on Maverick.

except maybe a little thing :
it keep old and deleted worflows keywords… why ?

Share this post


Link to post

Yeah deanishe I don't get an error, just no response.  Here's what the log looks like -- I had just restarted Alfred before running this workflow, then waiting for a bit at the Scanning Alfred keywords... message, and eventually hitting esc.

 

Starting debug for 'Alfred Keywords Help'

[STDERR: alfred.workflow.input.scriptfilter] 17:53:45 workflow.py:2140 DEBUG    Workflow version : 1.0.2
17:53:45 workflow.py:1543 DEBUG    Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...
17:53:45 workflow.py:2401 DEBUG    Update check not due
17:53:45 workflow.py:1778 DEBUG    Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle
17:53:45 workflow.py:2349 DEBUG    update_data : {u'available': False}
17:53:45 background.py:188 DEBUG    Command arguments cached to `/Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache`
17:53:45 background.py:192 DEBUG    Calling [u'/usr/bin/python', '/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2FA1D3D8-2549-4EA0-AAD5-C717B541BC1C/workflow/background.pyc', u'scan'] ...
17:53:45 workflow.py:2140 DEBUG    Workflow version : 1.0.2
17:53:45 workflow.py:2176 DEBUG    Workflow finished in 0.044 seconds.
17:53:45 workflow.py:2176 DEBUG    Workflow finished in 0.041 seconds.
17:53:45 background.py:197 DEBUG    Executing task `scan` in background...
17:53:45 workflow.py:2331 DEBUG    Set last run version : 1.0.2
17:53:45 workflow.py:2176 DEBUG    Workflow finished in 0.340 seconds.
[STDERR: alfred.workflow.input.scriptfilter] 17:53:49 workflow.py:2140 DEBUG    Workflow version : 1.0.2
17:53:49 workflow.py:1543 DEBUG    Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...
17:53:49 workflow.py:2401 DEBUG    Update check not due
17:53:49 workflow.py:1778 DEBUG    Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle
17:53:49 workflow.py:2349 DEBUG    update_data : {u'available': False}
17:53:49 background.py:188 DEBUG    Command arguments cached to `/Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache`
17:53:49 background.py:192 DEBUG    Calling [u'/usr/bin/python', '/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2FA1D3D8-2549-4EA0-AAD5-C717B541BC1C/workflow/background.pyc', u'scan'] ...
17:53:50 workflow.py:2140 DEBUG    Workflow version : 1.0.2
17:53:50 workflow.py:2176 DEBUG    Workflow finished in 0.039 seconds.
17:53:50 workflow.py:2176 DEBUG    Workflow finished in 0.037 seconds.
17:53:50 background.py:197 DEBUG    Executing task `scan` in background...
17:53:50 workflow.py:2331 DEBUG    Set last run version : 1.0.2
17:53:50 workflow.py:2176 DEBUG    Workflow finished in 0.270 seconds.
[STDERR: alfred.workflow.input.scriptfilter] 17:53:51 workflow.py:2140 DEBUG    Workflow version : 1.0.2
17:53:51 workflow.py:1543 DEBUG    Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...
17:53:51 workflow.py:2401 DEBUG    Update check not due
17:53:51 workflow.py:1778 DEBUG    Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle
17:53:51 workflow.py:2349 DEBUG    update_data : {u'available': False}
17:53:51 background.py:188 DEBUG    Command arguments cached to `/Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/scan.argcache`
17:53:51 background.py:192 DEBUG    Calling [u'/usr/bin/python', '/Users/username/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.2FA1D3D8-2549-4EA0-AAD5-C717B541BC1C/workflow/background.pyc', u'scan'] ...
17:53:51 workflow.py:2140 DEBUG    Workflow version : 1.0.2
17:53:51 workflow.py:2176 DEBUG    Workflow finished in 0.049 seconds.
17:53:51 workflow.py:2176 DEBUG    Workflow finished in 0.048 seconds.
17:53:51 background.py:197 DEBUG    Executing task `scan` in background...
17:53:51 workflow.py:2331 DEBUG    Set last run version : 1.0.2
17:53:51 workflow.py:2176 DEBUG    Workflow finished in 0.391 seconds.
[STDERR: alfred.workflow.input.scriptfilter] 17:53:52 workflow.py:2140 DEBUG    Workflow version : 1.0.2
17:53:52 workflow.py:1543 DEBUG    Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...
17:53:52 workflow.py:2401 DEBUG    Update check not due
17:53:52 workflow.py:1778 DEBUG    Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle
17:53:52 workflow.py:2349 DEBUG    update_data : {u'available': False}
17:53:52 background.py:180 INFO     Task `scan` is already running
17:53:52 workflow.py:2331 DEBUG    Set last run version : 1.0.2
17:53:52 workflow.py:2176 DEBUG    Workflow finished in 0.049 seconds.
[STDERR: alfred.workflow.input.scriptfilter] 17:53:52 workflow.py:2140 DEBUG    Workflow version : 1.0.2
17:53:52 workflow.py:1543 DEBUG    Reading settings from `/Users/username/Library/Application Support/Alfred 2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/settings.json` ...
17:53:52 workflow.py:2401 DEBUG    Update check not due
17:53:52 workflow.py:1778 DEBUG    Loading cached data from : /Users/username/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/com.pochemuto.alfred.workflow.AlfredHelp/__workflow_update_status.cpickle
17:53:52 workflow.py:2349 DEBUG    update_data : {u'available': False}
17:53:52 background.py:180 INFO     Task `scan` is already running
17:53:52 workflow.py:2331 DEBUG    Set last run version : 1.0.2
17:53:52 workflow.py:2176 DEBUG    Workflow finished in 0.038 seconds.

Share this post


Link to post

That's because the error is occurring in a background process. To see the error, you'll need to run the background script in the foreground in your shell.

Share this post


Link to post

On Mac OS X 10.11.1 Beta (15B22c) newly added (after I installed Keyword-help) workflows are not available when searching. Is there a way to trigger manual update?

Share this post


Link to post

On Mac OS X 10.11.1 Beta (15B22c) newly added (after I installed Keyword-help) workflows are not available when searching. Is there a way to trigger manual update?

 

Workflow uses cache which updates not often than 12 hours. Also you can manually delete cache. Type:

? workflow:delcache

Share this post


Link to post

Could it be possible to add those shortcuts we set for Alfred itself ? Or those set by default ? Sometimes I meet difficulties to find 

One could already add a link to this page: https://www.alfredapp.com/help/getting-started/cheatsheet/ :)
But even this page isn't complete. For example, one could press Maj to see a Quick Look.
What do think about it ?

 

Idea that add Alfred internal keywords looks fine. Default and custom search keywords can be added to results. I will try to implement this feature :)

Share this post


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...