https://github.com/vinodbaste/python_headline_style
This filter changes a given text to Title Caps, and attempts to be clever about SMALL 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 some others like 'vs' and 'v'.
https://github.com/vinodbaste/python_headline_style
library package python pythonpackage
Last synced: 11 months ago
JSON representation
This filter changes a given text to Title Caps, and attempts to be clever about SMALL 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 some others like 'vs' and 'v'.
- Host: GitHub
- URL: https://github.com/vinodbaste/python_headline_style
- Owner: vinodbaste
- License: mit
- Created: 2023-01-20T21:14:02.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-21T12:29:10.000Z (about 3 years ago)
- Last Synced: 2025-03-01T23:19:27.964Z (12 months ago)
- Topics: library, package, python, pythonpackage
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
headline_style
=========
This filter changes a given text to Title Caps, and attempts to be clever
about SMALL 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 some others like 'vs' and 'v'.
The filter employs some heuristics to guess abbreviations that don't need conversion.
+------------------+----------------+
| Original | Conversion |
+==================+================+
| this is a test | This Is a Test |
+------------------+----------------+
| THIS IS A TEST | This Is a Test |
+------------------+----------------+
| this is a TEST | This Is a TEST |
+------------------+----------------+
More examples and expected behavior for corner cases are available in the
`package test suite `__.
Issues, updates, pull requests, etc should be directed
`to github