Typogruby can apply a set of text filters to your HTML documents to make your text look better. It is based on Django’s typogrify.

Quick demonstration

"Typogruby makes HTML look smarter & better, don't you think?"

is turned into:

<span class="dquo">&ldquo;</span>Typogruby makes
<span class="caps">HTML</span> look smarter
<span class="amp">&amp;</span> better,
don&rsquo;t you&nbsp;think?&rdquo;

Compare the difference, given some appropriate styling:

"Typogruby makes HTML look smarter & better, don't you think?"

Typogruby makes HTML look smarter & better, don’t you think?”

Quick start guide

Installation

Typogruby is a Ruby gem and as such requires Ruby installed on your system. Mac OS X and *nix systems usually come with Ruby installed by default.

To install the gem, open a terminal window and run:

gem install typogruby

Usage

You can now use typogruby in two ways. Either apply it to a file in the terminal:

typogruby index.html

Type typogruby -h for more information. Second, you can use it from a Ruby script:

require 'typogruby'
puts Typogruby.improve('Hello, world!')

Included filters

Credits

More information

You can read more usage instructions in the API documentation. Also check out the license and changelog. You can report any bugs in the Github issue tracker.