Fargo Script to Make a Headline Accord With AP Style Guide

Tweet This Post

I've written a script that will transform any headline into one that follows these rules:

  • Capitalize the first word of every letter except articles, coordinating conjunctions, and prepositions of three letters or fewer. There’s one exception: Any word that is the first word in the headline or the last word should be capitalized, regardless of its part of speech.

The script isn't perfect: it won't keep acronyms upcapped (e.g., NSA will turn into Nsa). But it will lowercase the following words:

a, an, and, at, but, by, for, in, nor, of, off, on, or, out, so, the, to, up, yet

View the outline here. If you copy the headline to your clipboard, you can paste it into your menubar.

Visit the Fargo scripting page in the docs to learn how to install this script, or watch this video.

I've also published a regular javascript version of the script here.

Update (December 18)

I've rewritten the script to compare each word in the headline to an array of words to keep lowercase using a for loop within a for loop. You can view that version here.


Last built: Tue, Mar 31, 2015 at 2:05 PM

By Jeffrey Kishner, Monday, December 16, 2013 at 4:52 PM.