Skip to content

fusionbox/python-titlecase

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python TitleCase

Titlecase is a port of John Gruber's titlecase.pl: http://daringfireball.net/2008/05/title_case

This filter changes all words to Title Caps, and attempts to be clever about uncapitalizing SMALL words like a/an/the in the input.

The list of "SMALL words" which are not capped comes from the New York Times Manual of Style, plus 'vs' and 'v'.

Installation

Using pip:

pip install "git+https://bitbucket.org/raymondwanyoike/python-titlecase.git#egg=titlecase"

Usage

To use it is as simple as:

>>> from titlecase import titlecase
>>> titlecase('it\'s a beautiful thing, the destruction of words')
"It's a Beautiful Thing, the Destruction of Words"

About

TitleCase is a modified Python port of John Gruber's titlecase.pl

Resources

Stars

Watchers

Forks

Packages

No packages published