Small Separated Paragraphs

I'd like to create a macro that transforms a large paragraph of text into several small, fully separated paragraphs. Ballpark about 3 average size sentences.

I have no idea how to do this but I'm thinking maybe something like this or close to it already exists. All ideas very appreciated.

1 Like

The first question becomes how to separate the text into sentences.

The second is how to / whether to balance the chunks.

All this for a "simple" paragraph.

My interest in this is because I'd like a mechanism - in an arbitrary app - to select the current sentence.

Hey Howard,

The magic incantation for this one is very simple. Use an Execute a Shell Script action, and the following script:

#!/usr/bin/env bash
fold -w 80 -s

The appended macro takes its text from a variable, but you can easily change that to the clipboard.

-Chris


Wrap a Long String at a Given Column Width v1.00.kmmacros (5.9 KB)

Macro-Image

Keyboard Maestro Export

I forgot to mention that -w indicates the width in columns.

Change 80 to whatever suites you.

In the Terminal.app use:

man fold

To see the man page for fold.

-Chris