Jump to content

Browse and Manage alfred extension (alf)


Recommended Posts

Posted (edited)

Browse and Manage alfred extension (Download)

 

Search and manage the installed extension.

 

screenshot.png

 

Usage

 

alf :: display the installed extensions
alf <search> :: search extension by title, author name, and keyword

enter :: Browse the installed folder in Alfred
ctrl :: Reveal the installed folder in Finder
shift :: Execute extension with the first keyword
cmd :: Open terminal in the installed folder
opt:: Export the extension for distribusion (Default: ~/Downloads, you can refine it in export.json file)


export.json

 

The file format is as follows:

 

{
"workflow-export" :
{"directory" : "~/git/alfred-extension/managealfredextension",
"enable": true},
"source-export":
{"directory" : "~/git/alfred-extension/managealfredextension",
"enable": false}
}
 

'workflow-export' specifies the directory where .alfredworkflow is exported. 'source-export' specifies the directory where extension source is copied.

 

 

Version History

 

 

2.8 - July 16, 2014

 

  • Handles the title and author having space

 

2.6 - April 11, 2013

  • Handle subdirectory during export

2.5 - April 8, 2013

  • Display hotkey information
    • Hotkey information is borrowed from (com.help.shawn.rice) by Shawn Rice

2.4 - April 1, 2013

  • Fix a bug about pathname with space

2.3 - March 31, 2013

  • Sort title by alphabetically

2.2 - March 29, 2013

  • Export feature : Default directory is ~/Downloads
  • Toggle extensions with fn modifier
  • Fix a bug in export function

2.0 - March 29, 2013

  • Export feature
  • Open terminal
  • Support Alleyoop's auto update plugin
  • Display 'disabled' extension

1.x - March 28, 2013

  • Initial version
Edited by jmjeong
Posted

That's awesome, I will use it very often!

 

However, it is not working on my side. Trying to execute the python script on command line, I get:

 

python main.py "test"
Traceback (most recent call last):
  File "main.py", line 31, in <module>
    keyword = ",".join([o['config']['keyword'] for o in plist['objects'] if 'alfred.workflow.input' in o['type'] ])
KeyError: 'keyword'

 

 

Any idea how to fix this?

 

Cheers

Posted (edited)

That's awesome, I will use it very often!

 

However, it is not working on my side. Trying to execute the python script on command line, I get:

 

python main.py "test"
Traceback (most recent call last):
  File "main.py", line 31, in <module>
    keyword = ",".join([o['config']['keyword'] for o in plist['objects'] if 'alfred.workflow.input' in o['type'] ])
KeyError: 'keyword'

 

 

Any idea how to fix this?

 

Cheers

 

I uploaded the extension again. 

Edited by jmjeong
Posted

Thanks it is working fine now!

This workflow is awesome !

 

It would be great to have also the hotkey, but I don't know if this is easy to get from the plist.

 

Cheers!

Posted

Thanks it is working fine now!

This workflow is awesome !

 

It would be great to have also the hotkey, but I don't know if this is easy to get from the plist.

 

Cheers!

 

You can get hot key information from plist variable in main.py  

 

For example,  Cntl-Command-E is represented as  '{'type': 'alfred.workflow.trigger.hotkey', 'config': {'leftcursor': False, 'argument': 0, 'hotkey': 14, 'action': 0, 'hotstring': 'E', 'hotmod': 1310720, 'modsmode': 0}', but I don't know the whole information how to interpret.

Posted

Great!! I had this kind of extension planned to do, but my idea is to build an extension to browse other installed extensions, see their keywords and basic description, and launch them on enter (re-open Alfred with the keyword typed in). What do you think?

Posted

This is great! especially the option to open the workflow folder directly.  :)

 

If you path.join the workflow folder and "icon.png" and set that as the icon element value in the XML, you can see the icons for each workflow...

 

Nice work!

Posted (edited)

Great!! I had this kind of extension planned to do, but my idea is to build an extension to browse other installed extensions, see their keywords and basic description, and launch them on enter (re-open Alfred with the keyword typed in). What do you think?

 

That's good idea.  I updated the extension.  In version 4, you can launch the selected extension with shift key.

Edited by jmjeong
Posted

This is great! especially the option to open the workflow folder directly.  :)

 

If you path.join the workflow folder and "icon.png" and set that as the icon element value in the XML, you can see the icons for each workflow...

 

Nice work!

Good Idea. I updated the extension to display its icon. 

Posted

Great!! I had this kind of extension planned to do, but my idea is to build an extension to browse other installed extensions, see their keywords and basic description, and launch them on enter (re-open Alfred with the keyword typed in). What do you think?

If you download the new version, you can launch the selected extension with shift modifier.

Posted (edited)

Oh thank god! 3 nights in a row I was going to put in a request for this and 3 times I hit the backspace key and lost my text, thank you so much! So valuable!!

 

I just needed a way to view all my installed workflows without opening the Alfred Preferences pane.

 

I'm a workflow addict.

 

I'm not a developer and this tool has HUGE potential in my opinion.

 

I'm sure you're well booked with other requests but it'd be great if there could be non-developer features added to it..

  • For instance, generating a link to share the creators URL
  • The ability to open Alfred Preferences focused on that workflows, even if it just populates the search box for you
  • It's awesome you got the keywords in, can you do the shortcut keys as well?
  • I could probably go on and on...

Thank you again, this is really so great!

 

Thank you thank you!

 

### EDIT ###

 

I was so excited I didn't even read the other posts. Now I see you can actually launch the workflow with the shift modifier. I don't know what to say. Thank you again, just awesome.

Edited by nick
Posted (edited)

Hmmm, this could be very useful, but for me it's getting stuck on "loading..."

screenshot20130329at131.png

Nothing happens after that. :(

I hope version 5 will solve this problem. This happens when 'info.plist' does not exist.

Edited by jmjeong
Posted

I hope version 5 will solve this problem. This happens when 'info.plist' does not exist.

Still a no go I'm afraid.  I do have some workflows in my list disabled - any chance that might have something to do with it?

Posted (edited)

Okay, when I run that from the command line, I get this:

Traceback (most recent call last):
  File "main.py", line 29, in <module>
    plist = plistlib.readPlist(os.path.join(dirname, d, 'info.plist'))
  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: no element found: line 1, column 0

Hope that's helpful. :huh:

Edited by CarlosNZ
Posted (edited)

Okay, when I run that from the command line, I get this:

Traceback (most recent call last):
  File "main.py", line 29, in <module>
    plist = plistlib.readPlist(os.path.join(dirname, d, 'info.plist'))
  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: no element found: line 1, column 0
Hope that's helpful. :huh:

Try this version : https://github.com/jmjeong/alfred-extension/blob/master/managealfredextension/ManageAlfredExtension.alfredworkflow

Edited by jmjeong
Posted

Hi, it's not working for me.

 

I edited the export.json file to this:

 

{
    "workflow-export" :
	    {"directory" : "~/Desktop",
		 "enable": true},
    "source-export":
		{"directory" : "~/Desktop",
		 "enable": false}
}

 

 

Export always fail and it also created folder src in ~/Downloads. Am I doing something wrong? Thanks.

Posted (edited)

Hi, it's not working for me.

 

I edited the export.json file to this:

 

{
    "workflow-export" :
	    {"directory" : "~/Desktop",
		 "enable": true},
    "source-export":
		{"directory" : "~/Desktop",
		 "enable": false}
}

 

 

Export always fail and it also created folder src in ~/Downloads. Am I doing something wrong? Thanks.

 

 

I tried it in Battery.alfredworkflow, but I can't find any problem about export function. 

Did you tried the new version? You can the latest version from https://github.com/jmjeong/alfred-extension/tree/master/managealfredextension   FYI, export.json file should be located in extension directory where you want to export such as "/user.workflow.DD0D36FD-8588-4FFE-8FC6-XXXXXXX".

Edited by jmjeong
Posted (edited)

If i try to open a workflow in the terminal it says the folder doesn´t exist:

 

DS-iMac:~ DS$ open -a Terminal /Volumes/Macintosh HD 2/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.CC24CD39-4B60-4456-98E0-6B364329EEB0
The files /Volumes/Macintosh, /Users/DS/HD, and /Users/DS/2/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.CC24CD39-4B60-4456-98E0-6B364329EEB0 do not exist.
DS-iMac:~ DS$ 

 I think that´s because of the spaces.

If I paste the path like this:

cd /Volumes/Macintosh\ HD\ 2/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.CC24CD39-4B60-4456-98E0-6B364329EEB0

It works.

 

Could you possibly change this in your workflow?

Would be great!I like this workflow very much!

 

Domenic


edit:

[...]

 I'm not a developer and this tool has HUGE potential in my opinion.

The ability to open Alfred Preferences focused on that workflows, [...]
That would be awesome!
 
offtopic:
Is it possible to edit a post and quote someone inside that edit?(with name, date, time)
Edited by Domenic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...