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 command-line tool that formats blog post titles for a tech blogging platform. The tool needs to handle titles that contain domain names and URLs while ensuring they remain properly formatted and clickable when rendered.
Create a Python script that reads blog post titles and formats them according to title case rules while preserving domain names and URLs exactly as they appear. The tool should:
The formatter should handle various types of web addresses within titles:
example.com, github.io)api.example.com, www.site.org)del.icio.us, my.site.co.uk)http://example.com, https://api.site.com)When processing titles:
Input:
visit example.com for more information
how to use api.github.com in your projects
check out del.icio.us and other services
tutorial: working with http://example.com endpointsExpected output:
Visit example.com for More Information
How to Use api.github.com in Your Projects
Check Out del.icio.us and Other Services
Tutorial: Working With http://example.com Endpoints@generates
def format_title(title: str) -> str:
"""
Format a blog post title to title case while preserving domain names and URLs.
Args:
title: The blog post title to format
Returns:
The formatted title with proper capitalization and preserved domains/URLs
"""
pass
def main():
"""
Read titles from stdin, format them, and write to stdout.
"""
pass
if __name__ == "__main__":
main()Provides intelligent title case conversion with domain preservation support.