Jump to content

How: macOS Text Replacement -> Alfred Snippets


Recommended Posts

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
  • 1 month later...

@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
 
 
 

image.png

image.jpeg

image.png

Link to comment
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.

Link to comment

@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 by Shantni
Added more info
Link to comment
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

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