andy4222 Posted October 28, 2022 Share Posted October 28, 2022 (edited) Workflow that sync one way sync from macOS text snippets to Alfred snippets. (NOTE: Alfred's "macOS" snippets list is overwritten every time) I created this workflow by modifying @deanishe 's script. Their script stopped working after python 3 migration so I made a few changes to make it work. No forum post or github link as I don't upload any of my workflows (I'm lazy, sorry) Need "python3" installed and added to the path https://www.dropbox.com/s/iod0zplbd7i6kdj/Sync macOS Text Snippets with Alfred.alfredworkflow.zip?dl=0 Edited October 30, 2022 by andy4222 jukatz 1 Link to comment Share on other sites More sharing options...
TomBenz Posted October 28, 2022 Share Posted October 28, 2022 10 hours ago, andy4222 said: Workflow that sync one way sync from macOS text snippets to Alfred snippets. (NOTE: Alfred's "macOS" snippets list is overwritten every time) I created this workflow by modifying @deanishe 's script. Their script stopped working after python 3 migration so I made a few changes to make it work. No forum post or github link as I don't upload any of my workflows (I'm lazy, sorry) Need "python3" installed and added to the path https://www.dropbox.com/s/n1zgzxue7q12ks2/Snippets macOS snippets with Alfred with macOS.alfredworkflow.zip?dl=0 in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/Users/ankit' Getting the following error in debugger log: See if you can check and update. it seems some path has got hard-coded. Link to comment Share on other sites More sharing options...
andy4222 Posted October 28, 2022 Author Share Posted October 28, 2022 Ah. let me fix it. I guess I never touched it after it "worked on my machine" 😅 Link to comment Share on other sites More sharing options...
andy4222 Posted October 30, 2022 Author Share Posted October 30, 2022 @TomBenz Fixed and updated link. Can you please check and confirm its working for you? Link to comment Share on other sites More sharing options...
suliveevil Posted October 30, 2022 Share Posted October 30, 2022 It works. Thank you very much. Link to comment Share on other sites More sharing options...
TomBenz Posted October 30, 2022 Share Posted October 30, 2022 12 minutes ago, suliveevil said: It works. Thank you very much. Works good. Thanks. I had made copied macOS keywords with Alfred Snippets one time few months back but can now do one way sync from macOS --> Alfred. Link to comment Share on other sites More sharing options...
andy4222 Posted November 2, 2022 Author Share Posted November 2, 2022 Great to hear it works. I find the very useful as I want to use Alfred expansion on macOS but Apple expansion on iOS Link to comment Share on other sites More sharing options...
setupisanoun Posted December 1, 2022 Share Posted December 1, 2022 Hrm, any ideas on this one? I'm running Ventura which is the Destroyer of Things We've Previously Enjoyed so may be that. 05:19:40.572] STDERR: Sync macOS Text Snippets with Alfred[Run Script] loaded 5 macOS shortcut(s) exporting snippets to '/Users/user/Sync/Application Support/Alfred5/Alfred.alfredpreferences/snippets/macOS' ... Traceback (most recent call last): File "/Users/user/Sync/Application Support/Alfred5/Alfred.alfredpreferences/workflows/user.workflow.754D43AA-91E3-4C11-9CEB-2195DCB32440/sync.py", line 117, in <module> main() File "/Users/user/Sync/Application Support/Alfred5/Alfred.alfredpreferences/workflows/user.workflow.754D43AA-91E3-4C11-9CEB-2195DCB32440/sync.py", line 113, in main export_shortcuts(shortcuts, dirpath) File "/Users/user/Sync/Application Support/Alfred5/Alfred.alfredpreferences/workflows/user.workflow.754D43AA-91E3-4C11-9CEB-2195DCB32440/sync.py", line 95, in export_shortcuts for name in os.listdir(dirpath): PermissionError: [Errno 13] Permission denied: '/Users/user/Sync/Application Support/Alfred5/Alfred.alfredpreferences/snippets/macOS' Link to comment Share on other sites More sharing options...
vitor Posted February 9 Share Posted February 9 I can confirm the error on Ventura. There are also a couple of other issues, namely that the About has this weird section: Inspired by deanishe's script at https://www.deanishe.net/snippet/macos-shortcuts-to-alfred-snippets/#:~:text=The%20default%20location%20(i.e.%20you,Application%20Support%2FAlfred%2FAlfred. And the workflow has no icon or description. We can do without the latter, but an icon is necessary. https://font2png.com is a good source to make an icon quickly (make sure to have a non-transparent background with rounded corners). Link to comment Share on other sites More sharing options...
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