Quickly running text through proselint

I found a tool called proselint (http://proselint.com/), which they advertise as a “linter for prose”. It is free, so I checked it out. It seems to complement Grammarly (https://app.grammarly.com/) nicely, as it looks for different types of issues in written text. One feature that got my attention is that the output it produces can be piped into BBEdit’s bbresult tool to display the individual issues found similarly to how compiler errors are listed one by one. To get the whole chain of tools to work together, I used keyboard maestro.

The basic idea was to be able to run any text stored on the clipboard through proselint so I can check input from different places (email, text editors etc.) without having to create a text file. So the best place seemed to be to start with the clipboard. It’s content is fed to proslelint via the “execute shell script action”, the output is placed onto the clipboard again, and then bbresults is executed:

To test, here is a small piece of text, where I created inconsistent spacing after a . and used the word “Hopefully”, which is one of the words proslint frowns upon:

Here is a test example. Too many spaces in front of this sentence.
Hopefully, this will work. Another sentence. And one more.

Highlighting that, then copy to the clipboard, next execute the keyboard maestro macro will open up BBEdit to display (which I would have loved to show, but as a new user I’m only allowed to show one picture)

The two issues I placed in the text are properly outlined. The line numbers are given, and the problems found are described.

Note that I had to use the action gear for the shell script executing proselint to tell keyboard maestro to ignore errors (you can’t see that in the picture of the macro). That is needed since any issues found by proselint will return a non-zero value from the proselint executable, which keyboard maestro interprets as an error during macro executing. The default behavior is to abandon the macro execution. I also turned off error reporting via Notifications, again via the action gear.

I hope someone else finds this interesting.

1 Like

Hi Ottmar,
Thanks for your links and information above. The idea of an advanced prose-checker (better than simply grammar) is intriguing. I’ve installed proselint and installed it for Atom as well. I’m not seeing much feedback, though I am seeing some. Are you getting the feedback you expect?