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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d55c5f8a6cb5c08cbf1b509a5be20099e2ec6cf1a684c6cbaf883407ca02b35
|
|
| MD5 |
389591d1ef73c679a37308eae75770c0
|
|
| BLAKE2b-256 |
44da7d0b016038b56675cce08e30feb001859e29ea5ba1669c37f64260da1ca4
|
File details
Details for the file book_cataloguing-1.0.0-py3-none-any.whl.
File metadata
- Download URL: book_cataloguing-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17ec97946af15dec5b1f7f556e649b158456c87867bc34c05e57f034d19169b5
|
|
| MD5 |
874e49f20c56c961da4d65240dce8094
|
|
| BLAKE2b-256 |
820c4dc860fa2a1dac7cf5ff279212678a54705ab8a36efad7507a4515aac845
|