{"id":26804414,"url":"https://github.com/leawind/srt-parser-ts","last_synced_at":"2026-05-16T01:32:41.669Z","repository":{"id":283632451,"uuid":"952405970","full_name":"Leawind/srt-parser-ts","owner":"Leawind","description":"SubRip Text (SRT) parser","archived":false,"fork":false,"pushed_at":"2025-03-24T14:53:06.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T15:44:37.287Z","etag":null,"topics":["deno","srt","subrip","subtitle","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://jsr.io/@leawind/srt-parser","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Leawind.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":"2025-03-21T08:22:59.000Z","updated_at":"2025-03-24T14:53:10.000Z","dependencies_parsed_at":"2025-03-21T09:41:31.420Z","dependency_job_id":null,"html_url":"https://github.com/Leawind/srt-parser-ts","commit_stats":null,"previous_names":["leawind/srt-parser","leawind/srt-parser-ts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leawind%2Fsrt-parser-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leawind%2Fsrt-parser-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leawind%2Fsrt-parser-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leawind%2Fsrt-parser-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leawind","download_url":"https://codeload.github.com/Leawind/srt-parser-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246249216,"owners_count":20747168,"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":["deno","srt","subrip","subtitle","typescript","typescript-library"],"created_at":"2025-03-29T22:16:38.718Z","updated_at":"2026-05-16T01:32:41.624Z","avatar_url":"https://github.com/Leawind.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SubRip Text (SRT) Parser\n\n[![GitHub License](https://img.shields.io/github/license/Leawind/srt-parser-ts)](https://github.com/LEAWIND/srt-parser-ts)\n[![JSR Version](https://jsr.io/badges/@leawind/srt-parser)](https://jsr.io/@leawind/srt-parser)\n[![deno score](https://jsr.io/badges/@leawind/srt-parser/score)](https://jsr.io/@leawind/srt-parser/doc)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Leawind/srt-parser-ts/deno-test.yaml?branch=main\u0026logo=github-actions\u0026label=test)](https://github.com/Leawind/srt-parser-ts/actions/workflows/deno-test.yaml)\n\nA parser for reading and manipulating [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) format.\n\n## Features\n\n- Parse SRT files into structured data.\n- Manipulate subtitle nodes.\n- Convert subtitle data back into SRT format.\n- Find subtitles that should be displayed at a specific time.\n- Shift subtitle timing by a specified offset.\n- Support for negative time values.\n- Support for multiple time formats (`hh:mm:ss,mmm`, `hh:mm:ss.mmm`, `mm:ss,mmm`, `mm:ss`, `hh:mm:ss`).\n\n## Usage\n\nFor example, we have a SRT file `example.srt` with the following content:\n\n```srt\n1\n00:00:01,000 --\u003e 00:00:04,000\nHello, world!\n```\n\nWe can write a script to read the SRT file and manipulate the subtitle nodes:\n\n```typescript\nimport { type SrtNode, SubRipText } from '@leawind/srt-parser';\n\n// Reformat SRT content\nconst reformatted: string = SubRipText.reformatFile('example.srt');\n\n// Load SRT from file\nconst srt: SubRipText = SubRipText.fromFile('./example.srt');\n\n// Manipulate subtitles\nsrt.shiftTime(1000); // Shift by 1 second\nconst nodes: SrtNode[] = srt.getNodesAt(3000); // Find all subtitles nodes at 3 seconds\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleawind%2Fsrt-parser-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleawind%2Fsrt-parser-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleawind%2Fsrt-parser-ts/lists"}