PopClip 2021.11 introduced a new, simple way to create and share your own extensions, which I am calling Extension Snippets.
It is easiest to show with examples, so without further ado, here is an extension snippet:
# popclip name: Emojipedia url: https://emojipedia.org/search/?q=***
Select that text above, and you’ll see an “Install Extension” action in PopClip:
You installed a new extension in PopClip just by selecting some text! This particular extension will search Emojipedia for the selected text.
Hopefully you are starting to realise the possibilities. You can now create your own extensions just by typing text in a text field and selecting it. You can do it anywhere you can type text — in the TextEdit app, in your favourite notes app, anywhere you like.
For example, you can go ahead and change the name and the URL from the example above to anything you like, to create your own search extension (keeping the
*** as the search query placeholder).
Extension snippets are also easy to share with others, since you can put them anywhere you can put text.
NOTE: When typing a snippet in this forum, you’ll need to format it as Preformatted Text (using the toolbar button, or use three backticks ``` on the lines before and after)
The format of an extension snippet is actually the same as for a regular extension — which is all documented in detail here.
A snippet must start with the first line
# popclip (with or without the space) and must be no more than 1000 characters.
The snippet uses a format called YAML to define the extension’s properties such as its name, icon, and to define its action. If that sounds complicated, don’t worry. Usually you can just copy one of the examples and edit it.
Let’s go back to the Emojipedia example. Let’s say we want to give it an icon. We can do this as follows:
# popclip name: Emojipedia icon: search filled E url: https://emojipedia.org/search/?q=***
You’ll see I added the line
icon: search filled E. This gives the action a magnifying glass icon with an E in it:
Instead of a magnifying glass you can put it in a circle or a square, filled or not filled. And using
symbol:<symbol name> you can use macOS’s built in SF Symbols icons. Here are some examples:
Rather than make this post really long, I’m going to be posting in this forum some “How To” guides with examples of various types of extension (see below).
I’ve also created a new forum category - Show and Tell - where people can post their own snippets that might be of use to others.
Hopefully that has whet your appetite for the possibilities of Extension Snippets. Stay tuned for more to come.