Welcome to the lab.

PopClip extensions update

I’ve updated my PopClip Extensions to v1.44. This update includes a revised nvUltra extension (that actually works), and a new SearchLink extension.

The nvUltra extension allows you to set a permanent notebook to use, and then whenever it’s run it will add a new note with the selected text. Simple, convenient. I may eventually incorporate Gather into this and allow selecting rich (HTML) text and converting to Markdown, but for now it’s designed for plain text.

The SearchLink extension requires that SearchLink be installed, but if it doesn’t locate it in the expected location when it runs, it will install it automatically.

In case you missed it, I also recently updated the WebMarkdown extension to use Gather, and if Gather isn’t installed when you run it, it will download the package for you and walk you through installation.

I’ve noticed lately that some of my extensions that have alternate behaviors when holding Option are acting strangely, showing the result in the popup and putting it in the clipboard instead of pasting it. I need to talk to Pilot Moon about why that’s happening, but will update as needed once I get some answers.

Download the latest versions of all of the extensions below.

Brett's PopClip Extensions v1.44

A few PopClip extensions for Markdown writing and other useful tools

Published 11/30/14.

Updated 01/24/23. Changelog

DonateMore info…

SearchLink – better searches, better results

Here’s another short video for SearchLink.

The better your search, the better your results. You’re a web professional, you know how to Google, so put your query-crafting skills to use to harness the convenience of SearchLink. By adding the right keywords to a search, you’re guaranteed to get the link you were hoping for without leaving your editor.

YouTube Video

Find out more about SearchLink on the project page, and check out the wiki for all of the documentation.

SearchLink – browser history, bookmarks, and Pinboard

I made you a video with some SearchLink tips. Note that I’m using SearchLink 2.3.15+ in these videos.

First up, how would you like to be able to instantly access any page you’ve visited in any browser? Or be able to instantly recall pages you’ve bookmarked in your browser or on Pinboard? Here you go:

YouTube Video

As always, find out more about SearchLink on the project page, and check out the wiki for all of the documentation.

SearchLink 2.3 – improved inline search for Markdown writers

I’ve bumped SearchLink up to v2.3, with a whole bunch of new features. I’m going to continue the SearchLink tips series as I have time, but for now, here’s a rundown of what’s new.

I’ve moved the entire project into a GitHub repository where you can view the code and download the codesigned Services, and I’ve split the documentation up from the beast of a single-page document into a wiki that should be more manageable moving forward. This also allowed for some automation in testing and deployment, which should prevent mishaps.

Read on for all the new shiny.

SearchLink goes to the movies (and other updates)

I had a rough week last week, stomach issues kept me in bed for almost six days. Finally got some relief yesterday, and am now catching up on work and pumping out some ideas I had while I was out of action (starting with SearchLink).

As a regular part of doing show notes for Overtired, I need authoritative links for TV, movie, and actor information. I always create links in my show notes using SearchLink, so having an accurate search for a given link type saves me a lot of time.

Thus far I’ve always used a custom search (!imdb) that just did a site-specific search of IMDb (this is included as an example custom search in default installs). This works well enough, but I recently discovered an alternative database that provides an actual API for more accurate results.

The Movie Database (TMDb) provides a complete search API, and it’s free for non-commercial use. And believe me, as cool as I think SearchLink is, it definitely fits the non-revenue-generating clause of the agreement. So I’ve added 4 new searches to SearchLink.

A Quick Tip Before We Roll

Just in case you’ve been using SearchLink (or want to get started) but didn’t know about this handy trick: you can quickly see a list of all available searches, including any custom searches you’ve defined, by typing help, selecting it, and running SearchLink on it. A popup will be displayed listing all your options.

Marked 2.6.18 with 100% less jitter

The latest version of Marked 2, 2.6.18, is released for direct customers and in review for Setapp and Mac App Store customers. It has two things that I think will be of interest to many.

Too much coffee? Not enough?

First, I finally figured out a way to stop the Table of Contents and other fixed-position elements from jittering when the preview scrolls. That started with the last OS as a result of new rubber-banding in web views. I could set the body to fixed position and scroll the containing div, but that broke all of the positioning that Marked needs to do for things like bookmarking and header navigation. After months of experimenting, I decided, just for giggles, to try other positioning values on the body element. Eventually found that temporarily setting it to sticky would stop the jitter and not break my ability to get document-relative positions. In my testing I haven’t found any notable repercussions to this, so I’m releasing it. Using Marked is significantly better now, what without elements jumping around and such.

Mermaid users will love this…

Second, over the last couple of years, many users have run into complications when embedding their own scripts. It used to be that every time the preview updated, Marked did a full page load, which would then run scripts triggered by onload. But a few versions back I modified the page load such that new content is injected into the container div without requiring a reload. This was a major step forward in usability, but it meant that those custom scripts wouldn’t trigger again after the initial load. So I worked up a solution that allows you to “hook” the update function, triggering any function whenever the preview updates. It’s a simple script block you can embed along with your custom script, e.g. Mermaid. If you use it on every document, you can injected the scripts with a custom preprocessor. See Embedding Scripts for details on Marked.hooks.

A few other fixes showed up in this release as well. Visit the changelog for a full list.

Comment Flags Service with long options

I’ve updated the Comment Flags Service to handle long options. Comment Flags takes a terminal command and adds markup so you can comment on each flag/switch in the command for the purposes of documentation:

The previous version of this Service could only handle short options, like -d or combined short options like -ltR. It ignored long options like --format=markdown because I assumed that long options were verbose enough to make sense. I recently changed my mind on that, so now the Service includes comment markers for long options as well.

Here’s a quick video of running the Service in TextBuddy.

(Aside: to run macOS Services in TextBuddy, you need to run a little defaults write command in Terminal.. Also, I don’t know why my Services are showing up twice, as seen in the video, right now. Mysterious.)

Hope this is of use to those writing about terminal commands or documenting their own tools!

Comment Flags Service v1.0.1

A Service to make pretty comments for switches/flags in command line examples

Published 03/25/21.

Updated 12/31/22. Changelog

DonateMore info…