neil on the web!

traveling in style

2008 Oct 06

When I write I try to check the readability of my work. I use GNU style for this task. Style analyses a document, including sentence length and other readability measures. It comes with the program diction that identifies wordy and commonly misused phrases.

Install MacPorts by downloading the Mac OS X package and running the installer.

Install diction using the port command.

Use:

/opt/local/bin/style [/path/to/the/file/you/want/check]

If you want to avoid using the full path to style each time then you could add /opt/local/bin: to the path in .bash_login in your home folder.

I use a UNIX filter in TextWrangler to send either the whole document or selected text to style for checking. Put it in the Unix Filter folder of TextWrangler and access it from the #!@ shebang menu. Hold down the [Apple] key when you click on a Unix Filter to view filter options.

#!/bin/sh@<br>
# TextWrangler sends the whole document or selected text to style@<br>
# -p outputs passive sentences@<br>
/opt/local/bin/style -p "$1"@