therockmandolinist Posted February 27, 2016 Share Posted February 27, 2016 (edited) Hello! I wanted to easily quickly browse my workflow files in alfred, but didn't find an easy/satisfactory way of doing so, so I quickly created this workflow. I'm not sure if there's any interest for this or if someone's already made something like this, but I decided to try myself. Usage You can edit the wf/ script filter to input your own option/keyword. Also, I kind of hacked this together and my coding experience is somewhat limited, so any constructive criticism is HIGHLY welcomed/encouraged. I've learned about coding workflows mostly from others' example. This is also basically my first time using GitHub so let me know if things go wrong. Direct Download (Updated to work with dropbox sync) Github repo Edited February 29, 2016 by therockmandolinist Link to comment
raguay.customct Posted February 29, 2016 Share Posted February 29, 2016 It only works with Alfred that isn't synced by dropbox. Instead of working from a fixed directory location, the workflow should start at where the workflow is, go up one directory, and process the directories there. Link to comment
therockmandolinist Posted February 29, 2016 Author Share Posted February 29, 2016 It only works with Alfred that isn't synced by dropbox. Instead of working from a fixed directory location, the workflow should start at where the workflow is, go up one directory, and process the directories there. Thanks for the advice! Does syncing with Dropbox only affect browsing the actual workflow folder, or are the cache and data directories affected as well? Link to comment
raguay.customct Posted February 29, 2016 Share Posted February 29, 2016 (edited) It just affects the location of the Alfred.preferences file (which is actually a directory that contains all the preferences and workflows). The cache and data directories are always in the normal locations. Those directories are not shared. Also, I tried to update the script to take that into effect, but somewhere else in the script it had problems with spaces and parenthesis in the path (My path has both). You might want to thoroughly check the script for that condition. Edited February 29, 2016 by raguay.customct Link to comment
therockmandolinist Posted February 29, 2016 Author Share Posted February 29, 2016 It just affects the location of the Alfred.preferences file (which is actually a directory that contains all the preferences and workflows). The cache and data directories are always in the normal locations. Those directories are not shared. Also, I tried to update the script to take that into effect, but somewhere else in the script it had problems with spaces and parenthesis in the path (My path has both). You might want to thoroughly check the script for that condition. I tried to update it myself as well - Is that still happening? My path has spaces in it too, so I'm not really sure what the cause of the error would be. Link to comment
raguay.customct Posted March 2, 2016 Share Posted March 2, 2016 It might be that my python was wrong (though it error-ed somewhere else in the code). I am not a strong python programmer. My skills are in PHP, Node, Haskell, and go. Link to comment
cands Posted January 1, 2017 Share Posted January 1, 2017 Hi, this seems very useful but it does not work for me (Alfred 3.2.1, macOS 10.12.2). Maybe it has not been updated for Alfred 3? I paste the debug information: Starting debug for 'Workflow File Browser' [2017-01-01 22:52:45][ERROR: input.scriptfilter] Code 1: 22:52:44 workflow.py:2168 ERROR [Errno 2] No such file or directory: '/Users/MyUserName/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.0DDCA8BE-8A51-4A56-8F31-6F719A59B517/info.plist' Traceback (most recent call last): File "/Users/MyUserName/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.68029B36-88D1-478D-AD4D-70BBF9F51856/workflow/workflow.py", line 2161, in run func(self) File "workflowsearch.py", line 68, in main my_workflows=workflow_subdirectories() File "workflowsearch.py", line 58, in workflow_subdirectories name,show=wfFilter(os.path.join(a_dir,folder,'info.plist')) File "workflowsearch.py", line 41, in wfFilter with open(filename) as f: IOError: [Errno 2] No such file or directory: '/Users/MyUserName/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.0DDCA8BE-8A51-4A56-8F31-6F719A59B517/info.plist' 22:52:44 workflow.py:2186 DEBUG Workflow finished in 0.157 seconds. [2017-01-01 22:52:45][ERROR: input.scriptfilter] Code 1: 22:52:45 workflow.py:2168 ERROR [Errno 2] No such file or directory: '/Users/MyUserName/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.0DDCA8BE-8A51-4A56-8F31-6F719A59B517/info.plist' Traceback (most recent call last): File "/Users/MyUserName/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.68029B36-88D1-478D-AD4D-70BBF9F51856/workflow/workflow.py", line 2161, in run func(self) File "workflowsearch.py", line 68, in main my_workflows=workflow_subdirectories() File "workflowsearch.py", line 58, in workflow_subdirectories name,show=wfFilter(os.path.join(a_dir,folder,'info.plist')) File "workflowsearch.py", line 41, in wfFilter with open(filename) as f: IOError: [Errno 2] No such file or directory: '/Users/MyUserName/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.0DDCA8BE-8A51-4A56-8F31-6F719A59B517/info.plist' 22:52:45 workflow.py:2186 DEBUG Workflow finished in 0.012 seconds. Link to comment
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