{"id":15894472,"url":"https://github.com/capjamesg/title-prettier","last_synced_at":"2026-01-25T07:01:57.694Z","repository":{"id":245272427,"uuid":"817728914","full_name":"capjamesg/title-prettier","owner":"capjamesg","description":"A Python tool to normalize titles into a consistent format.","archived":false,"fork":false,"pushed_at":"2024-06-21T18:03:06.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T06:15:48.031Z","etag":null,"topics":["web"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capjamesg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-20T10:14:31.000Z","updated_at":"2024-06-21T18:17:38.000Z","dependencies_parsed_at":"2024-06-21T22:31:00.123Z","dependency_job_id":"0e2e5f34-643f-4f44-b3df-3d9fda2d4850","html_url":"https://github.com/capjamesg/title-prettier","commit_stats":null,"previous_names":["capjamesg/title-normalizer","capjamesg/title-prettier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/capjamesg/title-prettier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Ftitle-prettier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Ftitle-prettier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Ftitle-prettier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Ftitle-prettier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capjamesg","download_url":"https://codeload.github.com/capjamesg/title-prettier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capjamesg%2Ftitle-prettier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28741621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T01:40:51.112Z","status":"online","status_checked_at":"2026-01-25T02:00:06.841Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["web"],"created_at":"2024-10-06T08:40:21.562Z","updated_at":"2026-01-25T07:01:57.670Z","avatar_url":"https://github.com/capjamesg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# title-prettier\n\nAn opinionated Python tool to change titles into a consistent format, and to add useful context to titles.\n\nThis tool is ideal for bookmarking tools, where you may want to regularize titles given a specific set of rules.\n\nThis tool applies a few transformations:\n\n- Text after common separators (i.e. ` | `, ` - `) is removed.\n- [video] is appended to titles where the URL is from a listed video site.\n- [code] is appended to titles where the URL is from a listed code sharing site.\n- [podcast] is appended to titles where the URL is from a podcast hosting page.\n- [image] is appended to titles if a source is an image.\n- Titles are turned to lowercase _if_ a URL is provided. See \"Preserving proper nouns in titles\" later in this document for more information.\n\n## Usage\n\nFirst, install the package:\n\n```\npip install title-prettier\n```\n\nThen, import the `get_pretty_title` function and specify either a title or a URL:\n\n```python\nfrom title_prettier import get_pretty_title\ntitle = get_pretty_title(url=\"https://jamesg.blog/2024/06/20/python-packages/\")\n# Python packages I love\ntitle = get_pretty_title(title=\"How the Square Root of 2 Became a Number | Hacker News\")\n# How the square root of 2 became a number\n```\n\n## Examples\n\n```\nBuilding a full-text search engine in 150 lines of Python code · Bart de Goede -\u003e Building a full-text search engine in 150 lines of Python code\nPoets’ Odd Jobs | Academy of American Poets -\u003e Poets’ Odd Jobs\nPython packages I love | James' Coffee Blog -\u003e Python packages I love\n```\n\n## Preserving proper nouns in titles\n\nWhen you provide a URL, `title-prettier` aims to turn the contents of the title to lowercase. But, you may wonder: what about proper nouns?\n\nSuppose a page has the title:\n\n```\nMy Review Of ‘The Tortured Poets Department’\n```\n\n`The Tortured Poets Department` is a proper noun; an album name.\n\nThis package aims to preserve proper nouns with a heuristic. If a word is used more in uppercase than lowercase, its capitalisation is retained.\n\nAfter being run through `titke-prettier`, the title above will become:\n\n```\nMy review of ‘The Tortured Poets Department’\n```\n\n## License\n\nThis project is licensed under an [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapjamesg%2Ftitle-prettier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapjamesg%2Ftitle-prettier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapjamesg%2Ftitle-prettier/lists"}