CMA Posted May 23, 2021 Share Posted May 23, 2021 Hi, I have a lot of text expansion snippets in macOS system preferences and have managed to export these into a plist file. Is there a way to simply import these into Alfred or do I have to manually add them in, one by one? Many thanks. C Link to comment
deanishe Posted May 23, 2021 Share Posted May 23, 2021 Here’s a script that can import your macOS text replacements into an Alfred snippet collection. Alan He and CMA 1 1 Link to comment
CMA Posted May 23, 2021 Author Share Posted May 23, 2021 Brilliant. Thank you. this worked liked a dream and saved me tonne of typing! Link to comment
Shantni Posted July 15, 2021 Share Posted July 15, 2021 @deanishe hi I am trying to get the sun macOs text replacements to alfred snippets using the script but I am not making any progress I am total noob so Please be Patient with me an help me out. First I made a folder called snippets here (Please see image) Then I modified the script as mentioned by replacing SNIPPETS_DIR to snippets(the folder I created) Then finally i ran the script and i get this error any help will be much appreciated Link to comment
deanishe Posted July 15, 2021 Share Posted July 15, 2021 3 hours ago, Shantni said: First I made a folder called snippets here (Please see image) No, the “snippets” folder is inside the Alfred.alfredpreferences bundle. Right-click on it and choose “Show Package Contents" That should be clear from the “Configuration” section on the page linked above. It's important to read carefully if you're a noob. Shantni 1 Link to comment
Shantni Posted July 15, 2021 Share Posted July 15, 2021 (edited) @deanishe Thank you for your reply. I did read that part but I guess I am simply too dumb to understand that. So I just copy the script and run instead of making any changes? I'm getting the same error message still? I tried running the terminal from both snippets directory in the bundle you suggested and also from the macOS sub directory zsh: event not found: /usr/bin/python is the error I get Edited July 15, 2021 by Shantni Added more info Link to comment
deanishe Posted July 15, 2021 Share Posted July 15, 2021 7 hours ago, Shantni said: I tried running the terminal from both snippets directory Just run it from this directory. You seem to be running it wrong. I don’t know what app you’re using in your screenshot, but it isn’t a code editor. The script must be plain text, not some RTF or DOC file. If you haven’t made the script executable with chmod +x shortcuts2alfred.py, you have to run it like in a shell this: /usr/bin/python shortcuts2alfred.py To specify the snippet directory, run SNIPPET_DIR=/path/to/Alfred.preferences/snippets /usr/bin/python shortcuts2alfred.py So if you’re using the standard prefs location (i.e. you aren’t syncing your prefs), the shell command you need would be: SNIPPET_DIR="~/Library/Application Support/Alfred/Alfred.alfredpreferences/snippets" /usr/bin/python shortcuts2alfred.py Link to comment
Shantni Posted July 16, 2021 Share Posted July 16, 2021 @deanishe okay this is what I am doing 1. I copied the text from your blog, 2. opened terminal from the snippets folder in Alfred pref package 3. pasted text in terminal and ran it this is what I get( its my terminal window) Link to comment
deanishe Posted July 16, 2021 Share Posted July 16, 2021 5 hours ago, Shantni said: pasted text in terminal and ran it It’s a script. I explained how to run it. There's a link to download the script on the webpage. If something about my instructions isn't clear, then I'd be happy to clarify. 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