{"id":13907955,"url":"https://github.com/fedecalendino/pysub-parser","last_synced_at":"2026-01-17T06:37:31.866Z","repository":{"id":42697650,"uuid":"152941622","full_name":"fedecalendino/pysub-parser","owner":"fedecalendino","description":"Library for extracting text and timestamps from multiple subtitle files (.ass, .ssa, .srt, .sub, .txt).","archived":false,"fork":false,"pushed_at":"2024-03-20T16:53:53.000Z","size":87,"stargazers_count":53,"open_issues_count":3,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-11T00:15:55.271Z","etag":null,"topics":["extract","parser","parsing","pysub-parser","srt","ssa","sub","subtitle","subtitles","timestamp"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pysub-parser/","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/fedecalendino.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}},"created_at":"2018-10-14T05:13:26.000Z","updated_at":"2025-08-03T03:02:54.000Z","dependencies_parsed_at":"2024-04-22T22:31:06.966Z","dependency_job_id":null,"html_url":"https://github.com/fedecalendino/pysub-parser","commit_stats":{"total_commits":45,"total_committers":3,"mean_commits":15.0,"dds":0.2222222222222222,"last_synced_commit":"62c5808787a036ae14995fb5469227645b9b5d7b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/fedecalendino/pysub-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedecalendino%2Fpysub-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedecalendino%2Fpysub-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedecalendino%2Fpysub-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedecalendino%2Fpysub-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fedecalendino","download_url":"https://codeload.github.com/fedecalendino/pysub-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedecalendino%2Fpysub-parser/sbom","scorecard":{"id":395236,"data":{"date":"2025-08-11","repo":{"name":"github.com/fedecalendino/pysub-parser","commit":"334af3993a2dd8cd348eba4a95e3608c2e96d0fc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/fedecalendino/pysub-parser/publish.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T18:49:19.099Z","repository_id":42697650,"created_at":"2025-08-18T18:49:19.099Z","updated_at":"2025-08-18T18:49:19.099Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28502674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["extract","parser","parsing","pysub-parser","srt","ssa","sub","subtitle","subtitles","timestamp"],"created_at":"2024-08-06T23:02:20.963Z","updated_at":"2026-01-17T06:37:31.788Z","avatar_url":"https://github.com/fedecalendino.png","language":"Python","funding_links":[],"categories":["HarmonyOS","Python"],"sub_categories":["Windows Manager"],"readme":"## pysub-parser\n\n[![Version](https://img.shields.io/pypi/v/pysub-parser?logo=pypi)](https://pypi.org/project/pysub-parser)\n[![Quality Gate Status](https://img.shields.io/sonar/alert_status/fedecalendino_pysub-parser?logo=sonarcloud\u0026server=https://sonarcloud.io)](https://sonarcloud.io/dashboard?id=fedecalendino_pysub-parser)\n[![CodeCoverage](https://img.shields.io/sonar/coverage/fedecalendino_pysub-parser?logo=sonarcloud\u0026server=https://sonarcloud.io)](https://sonarcloud.io/dashboard?id=fedecalendino_pysub-parser)\n\nUtility to extract the contents of a subtitle file.\n\nSupported types:\n\n* `ass`: [Advanced SubStation Alpha](https://en.wikipedia.org/wiki/SubStation_Alpha#Advanced_SubStation_Alpha)\n* `ssa`: [SubStation Alpha](https://en.wikipedia.org/wiki/SubStation_Alpha)\n* `srt`: [SubRip](https://en.wikipedia.org/wiki/SubRip)\n* `sub`: [MicroDVD](https://en.wikipedia.org/wiki/MicroDVD)\n* `txt`: [Sub Viewer](https://en.wikipedia.org/wiki/SubViewer)\n\n\u003e For more information: http://write.flossmanuals.net/video-subtitling/file-formats\n\n### Usage\n\nThe method parse requires the following parameters:\n\n* `path`: location of the subtitle file.\n* `subtype`: one of the supported file types, by default file extension is used.\n* `encoding`: encoding of the file, `utf-8` by default.\n* `**kwargs`: optional parameters.\n  * `fps`: framerate (only used by `sub` files), `23.976` by default.\n\n```python\nfrom pysubparser import parser\n\nsubtitles = parser.parse('./files/space-jam.srt')\n\nfor subtitle in subtitles:\n    print(subtitle)\n```\n\nOutput:\n```text\n0 \u003e [BALL BOUNCING]\n1 \u003e Michael?\n2 \u003e What are you doing out here, son? It's after midnight.\n3 \u003e MICHAEL: Couldn't sleep, Pops.\n```\n\n___\n\n### Subtitle Class\n\nEach line of a dialogue is represented with a `Subtitle` object with the following properties:\n\n* `index`: position in the file.\n* `start`: timestamp of the start of the dialog.\n* `end`: timestamp of the end of the dialog.\n* `text`: dialog contents.\n\n```python\nfor subtitle in subtitles:\n    print(f'{subtitle.start} \u003e {subtitle.end}')\n    print(subtitle.text)\n    print()\n```\n\nOutput:\n```text\n00:00:36.328000 \u003e 00:00:38.329000\n[BALL BOUNCING]\n\n00:01:03.814000 \u003e 00:01:05.189000\nMichael?\n\n00:01:08.402000 \u003e 00:01:11.404000\nWhat are you doing out here, son? It's after midnight.\n\n00:01:11.572000 \u003e 00:01:13.072000\nMICHAEL: Couldn't sleep, Pops.\n```\n\n### Cleaners\n\nCurrently, 4 cleaners are provided:\n\n* `ascii` will translate every unicode character to its ascii equivalent.\n* `brackets` will remove anything between them (e.g., `[BALL BOUNCING]`)\n* `formatting` will remove formatting keys like `\u003ci\u003e` and `\u003c/i\u003e`.\n* `lower_case` will lower case all text. \n\n```python\nfrom pysubparser.cleaners import ascii, brackets, formatting, lower_case\n\nsubtitles = brackets.clean(\n    lower_case.clean(\n        subtitles\n    )\n)\n\nfor subtitle in subtitles:\n    print(subtitle)\n```\n\n```text\n0 \u003e \n1 \u003e michael?\n2 \u003e what are you doing out here, son? it's after midnight.\n3 \u003e michael: couldn't sleep, pops.\n```\n\n### Writers\n\nGiven any list of `Subtitle` and a path it will output those subtitles in a `srt` format.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedecalendino%2Fpysub-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedecalendino%2Fpysub-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedecalendino%2Fpysub-parser/lists"}