Skip to main content

Correctly capitalize and sort the titles and authors of books.

Project description

Correctly capitalize and sort the titles and authors of books.

Basic Usage

To capitalize the title of a book:

>>> from book_cataloguing import capitalize_title
>>> capitalize_title("the lord of the rings")
'The Lord of the Rings'
>>> capitalize_title("the hobbit: or, there and back again")
'The Hobbit: Or, There and Back Again'

To capitalize the author of a book:

>>> from book_cataloguing import capitalize_author
>>> capitalize_author("HILDA VAN STOCKUM")
'Hilda van Stockum'
>>> capitalize_author("pope john paul ii")
'Pope John Paul II'

To sort some book titles case-insensitively:

>>> from book_cataloguing import title_sort
>>> titles = [
...     "the restaurant at the end of the universe",
...     "so long, and thanks for all the fish",
...     "Mostly Harmless"
... ]
>>> title_sort(titles)
['Mostly Harmless', 'the restaurant at the end of the universe', 'so long, and thanks for all the fish']
>>> title_sort(titles, reverse=True)
['so long, and thanks for all the fish', 'the restaurant at the end of the universe', 'Mostly Harmless']

Please see the online documentation at http://book-cataloguing.readthedocs.io for complete details on these functions and many others.

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

book_cataloguing-1.0.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

book_cataloguing-1.0.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file book_cataloguing-1.0.0.tar.gz.

File metadata

  • Download URL: book_cataloguing-1.0.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for book_cataloguing-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9d55c5f8a6cb5c08cbf1b509a5be20099e2ec6cf1a684c6cbaf883407ca02b35
MD5 389591d1ef73c679a37308eae75770c0
BLAKE2b-256 44da7d0b016038b56675cce08e30feb001859e29ea5ba1669c37f64260da1ca4

See more details on using hashes here.

File details

Details for the file book_cataloguing-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for book_cataloguing-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17ec97946af15dec5b1f7f556e649b158456c87867bc34c05e57f034d19169b5
MD5 874e49f20c56c961da4d65240dce8094
BLAKE2b-256 820c4dc860fa2a1dac7cf5ff279212678a54705ab8a36efad7507a4515aac845

See more details on using hashes here.

Supported by

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