<source srcset="https://cdn3.brettterpstra.com/uploads/2012/10/SearchLink_tw.jpg 1x, https://cdn3.brettterpstra.com/uploads/2012/10/SearchLink@2x.jpg 2x" /> <img class="alignright" loading="lazy" data-original="https://cdn3.brettterpstra.com/uploads/2012/10/SearchLink_tw.jpg" data-at2x="https://cdn3.brettterpstra.com/uploads/2012/10/SearchLink@2x.jpg" src="https://cdn3.brettterpstra.com/uploads/2012/10/SearchLink.jpg" /> </noscript> </picture>][searchlink]
I just updated SearchLink to v2.2.8. Yes, if you’re paying attention, I did skip a few increments there since the 2.2.5 release. I’ve added a few features and then kept holding release off until I had tested, and then life gets busy. You know.
This version adds a
!imov search for movie links from the iTunes store (credit to Sebastian Szwarc for the contribution), as well as the ability to search all Pinboard bookmarks for a phrase (with limited fuzzy matching). To use the Pinboard search, you’ll need to get your API token from the Pinboard settings page. Add
pinboard_api_key: 'YOUR_USER:TOKEN' to your
It currently searches your tags and “description,” which is generally the title of the site. I don’t have it combing the url or the extended description at this point, but I’ll see what issues I run into over time. The Pinboard searches currently download your entire bookmark collection every time it runs (doesn’t take an excessively long time, but it’s highly inefficient). I’m working on caching those and only updating as needed, but I’m running into trouble with writing large cache files to disk. Eventually I’ll figure that out, I promise.
I also added a utility dependency for
!spell searches. It now uses
aspell locally rather than relying on APIs. You can install it with
brew install aspell or download it from aspell.net. A search on a word or a string with
!spell will take an educated guess at the best possible result and replace words inline. For example, running SearchLink on
!spell harber will result in “harbor.” If you never use SearchLink for spelling correction, you don’t have to install
aspell to use everything else.
I also switched the
!def (definition) search to use Wordnik directly. It will return the first definition provided on the site, with a link to the definition page and the definition itself in a title string.
!def forces titles to show in the output even if your preferences have them disabled in other cases. This one’s kind of a silly feature anyway, so I won’t put a lot more time into figuring out ideal ways to handle it.
As a side note, I’m at a point where I really want to turn this into an app. A PopClip style popup on selected text, the ability to select from multiple results, and an option to preview (URL Preview style).
You can download the latest version below, but check the project page for more details and documentation.