{"id":13826801,"url":"https://github.com/BufferingIO/PyTitle","last_synced_at":"2025-07-09T01:31:24.918Z","repository":{"id":42062239,"uuid":"473278682","full_name":"BufferingIO/PyTitle","owner":"BufferingIO","description":"Subtitle manipulation library for Python.","archived":false,"fork":false,"pushed_at":"2022-09-01T07:42:10.000Z","size":151,"stargazers_count":20,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-01T21:03:19.507Z","etag":null,"topics":["ass-subtitles","python","srt","srt-subtitles","ssa","substation-alpha","subtitle","vtt","vtt-subtitles"],"latest_commit_sha":null,"homepage":"https://pytitle.readthedocs.io","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/BufferingIO.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-23T16:52:42.000Z","updated_at":"2024-04-28T15:01:51.000Z","dependencies_parsed_at":"2022-08-12T03:50:12.446Z","dependency_job_id":null,"html_url":"https://github.com/BufferingIO/PyTitle","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BufferingIO%2FPyTitle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BufferingIO%2FPyTitle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BufferingIO%2FPyTitle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BufferingIO%2FPyTitle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BufferingIO","download_url":"https://codeload.github.com/BufferingIO/PyTitle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476383,"owners_count":17480215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ass-subtitles","python","srt","srt-subtitles","ssa","substation-alpha","subtitle","vtt","vtt-subtitles"],"created_at":"2024-08-04T09:01:44.446Z","updated_at":"2024-11-20T05:31:07.792Z","avatar_url":"https://github.com/BufferingIO.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Subtitle manipulation library for Python\n\n[![PyPI](https://img.shields.io/pypi/v/pytitle)](https://pypi.org/project/pytitle/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pytitle)](https://pypi.org/project/pytitle/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytitle)](https://pypi.org/project/pytitle/)\n[![Codecov coverage](https://img.shields.io/codecov/c/github/sina-e/PyTitle)](https://app.codecov.io/gh/sina-e/PyTitle/)\n[![PyPI - License](https://img.shields.io/pypi/l/pytitle)](https://pypi.org/search/?c=License+%3A%3A+OSI+Approved+%3A%3A+MIT+License)\n[![Read the Docs](https://img.shields.io/readthedocs/pytitle)](https://pytitle.readthedocs.io)\n[![GitHub issues](https://img.shields.io/github/issues/sina-e/pytitle)](https://github.com/sina-e/PyTitle/issues)\n\nPyTitle is a subtitle manipulation library for python, it's built on top of Pydantic.\n\n**note that development of this project is just started and it's not anywhere near complete or ready for production code. use it at your own risk**\n\nwhat this library can do?\n\nwell, it's able to do a lot of things, and more in the future, but for now:\n\n- search for a text or pattern in a subtitle.\n- shift all the timestaps, or just one timestap to forward or backward.\n- split the subtitle from an index or timestamp.\n- fix common problems in a subtitle, such as:\n    - re-index .srt subtitles.\n    - remove or fix italic, bold and other formatting tags.\n    - add coloring or other formattings to a subtitle.\n    - fix enconding problems.\n    - fix arabic charachters, question marks and other formattings for persian subtitles.\n    - fix overlays in timestamps.\n\n## Installing PyTitle\n\n`pip install pytitle`\n\n## Quick start\n\nFor now, the only supported subtitle format is `.srt`. other formats will be added to the library soon.\n\nOpen a .srt Subtitle:\n\n```python\nfrom pytitle.srt import SrtSubtitle\n\nsubtitle = SrtSubtitle.open(\"~/path/to/subtitle.srt\")\n```\n\nshift all the timestamps for the opened subtitle 2 seconds forward:\n\n```python\nsubtitle.shift_forward(seconds=2)\n```\n\nor you can shift only one line, for example the 10th line(.srt indexes start at 1):\n\n```python\nsubtitle.shift_forward(seconds=2, index=10)\n```\n\nand when you done editing, save the file:\n\n```python\nsubtitle.save()\n```\n\nthe above method will override the existing file, if you want to save the file in a different place or seperately:\n\n```python\nsubtitle.save(path=\"~/path/to/edited_subtitle.srt\")\n```\n\n**Read the full documentation and tutorial [here](https://pytitle.readthedocs.io).**\n\n\n### supported formats:\n\n- [x] srt\n- [ ] ass\n- [ ] vtt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBufferingIO%2FPyTitle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBufferingIO%2FPyTitle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBufferingIO%2FPyTitle/lists"}