tessl install tessl/pypi-titlecase@2.4.0Python port of John Gruber's titlecase.pl for intelligent title case conversion with style guide compliance
Agent Success
Agent success rate when using this tile
79%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.92x
Baseline
Agent success rate without this tile
86%
A text formatting utility that converts compound phrases and names to proper title case according to journalistic style guidelines.
@generates
def format_title(text: str) -> str:
"""
Convert text to title case with proper handling of compound constructions.
Handles:
- Hyphenated compounds (e.g., "end-to-end" -> "End-to-End")
- Slash-separated phrases (e.g., "yes/no" -> "Yes/No")
- Scottish/Irish names with Mac/Mc prefixes (e.g., "mcdonald" -> "McDonald")
- Combined patterns requiring nested processing
Small words (a, an, and, as, at, but, by, en, for, if, in, of, on, or,
the, to, v, v., via, vs, vs.) remain lowercase in middle positions of
compound constructions.
Args:
text: The input text to format
Returns:
The text formatted in title case
"""
passProvides title case conversion following journalistic style guidelines.
@satisfied-by