The smallcaps package

smallcaps is a pre-processor library for LaTeX files.
The library comes with an executable that makes most
functionality accessible through a command line interface.
The pre-processor formats sequences of uppercase letters
with TeX's \small macro or whatever you configure.
Uppercase letters at the beginning of sentences are not
formatted. Other formatting conditions can be configured by
the user.

The executable can be configured through its command line
arguments as well as through TeX comments. In the default
configuration, lesscase does not change the content of any
macro argument or environment (different from document).
More and less restrictive configuration profiles can be
activated and adapted. Configurations can be stored and
restored at any time, even while processing the input
file.