Skip to main content

Python Port of John Gruber's titlecase.pl

Project description

This filter changes all words to Title Caps, and attempts to be clever about unSMALL 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’.

This is a fork of Stuart Colville’s titlecase.py, which was in turn a port of John Gruber’s titlecase.pl.

The purpose of this fork is to update the package to support Python 3 as well as provide a maintained version of this utility. Issues or better pull requests are welcome.

Usage

To use it is as simple as:

>>> from titlecase import titlecase
>>> titlecase('a thing')
'A Thing'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

titlecase-0.6.0.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file titlecase-0.6.0.tar.gz.

File metadata

  • Download URL: titlecase-0.6.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for titlecase-0.6.0.tar.gz
Algorithm Hash digest
SHA256 02693d8f1a8f5e18205a8a249e4d148f441ca3bb1c3e846c8b86106015898af4
MD5 26b5f58c739fde9e76d441c01b018de0
BLAKE2b-256 52d0dcebee82699359bbc252c4681d37317ab59a5042fb1ab3f8fd746e163759

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page