{"id":16874574,"url":"https://github.com/joway/pysubtitle","last_synced_at":"2025-03-18T23:18:46.348Z","repository":{"id":75055883,"uuid":"61102846","full_name":"joway/PySubtitle","owner":"joway","description":"Translation subtitles .","archived":false,"fork":false,"pushed_at":"2019-04-09T10:29:17.000Z","size":817,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T00:36:59.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-06-14T07:50:46.000Z","updated_at":"2016-06-14T09:14:11.000Z","dependencies_parsed_at":"2023-02-24T03:30:22.227Z","dependency_job_id":null,"html_url":"https://github.com/joway/PySubtitle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2FPySubtitle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2FPySubtitle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2FPySubtitle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2FPySubtitle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joway","download_url":"https://codeload.github.com/joway/PySubtitle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244320424,"owners_count":20434092,"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":[],"created_at":"2024-10-13T15:33:19.341Z","updated_at":"2025-03-18T23:18:46.325Z","avatar_url":"https://github.com/joway.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PySubtitle\n---\n\n# About\n\n该项目仅供在观看英美电影时,学习生僻单词使用(以及一些最新美剧暂时没有中文字幕, 可以使用这个勉强生成一个能用的版本).\n\nAPI调用的是百度翻译的, 无法保证翻译正确性与流畅性(即便调用谷歌翻译API也是如此,甚至有些数据下对中文的翻译明显不如百度). 我去除了3000个常用单词的翻译, 如果你需要自己定制个人的词库,只需要更改词库words-3000.txt\n\n程序还有许多小问题, 在翻译过程中也还不够智能,另外由于需要针对每个时间轴都调用一次API进行翻译,所以速度会比较慢(可通过合并查询翻译改进,但是我本身对速度并没有太大的需求,所以暂时还没去改动它).\n\n欢迎提交PR改进这个小玩具.\n\n# Features:\n\n- Support translate in 27 languages\n- Support Interspersed/double-line subtitles\n\n# Snapshots\n\n####  V0.0.1\n\n![](https://dn-joway.qbox.me/1465909608178_1.pic_hd.jpg)\n![](https://dn-joway.qbox.me/1465909620922_2.pic_hd.jpg)\n\n#### V0.0.2\n\nSupport for skip translate common words in 3000 words list .\n\n![](https://dn-joway.qbox.me/1465917259951_1.pic_hd.jpg)\n![](https://dn-joway.qbox.me/1465917299225_2.pic_hd.jpg)\n\nThe subtitle file will be handled like this :\n\n\n    200\n    00:09:10,327 --\u003e 00:09:12,227\n    'Cause that would be a pretty severe signaling(信号) risk.\n\n    201\n    00:09:12,329 --\u003e 00:09:14,763\n    I(我) mean, you don't(别) have to be in PR(PR) know that insiders(业内人士)\n\n    202\n    00:09:14,865 --\u003e 00:09:17,733\n    only dump stock like that when they know something is wrong.\n\n    203\n    00:09:17,835 --\u003e 00:09:19,634\n    The bulk(大量的) of my compensation(补偿) here would be options,(选项，)\n\n\n\n\nYou can also make the text separately in two lines:\n\n\n    127\n    00:05:37,281 --\u003e 00:05:40,115\n    No, let's drive to the\n    one on Forest Avenue.\n    不，让我们开车去\n    森林大道上的一个。\n\n    128\n    00:05:40,217 --\u003e 00:05:42,217\n    It's further from that jacket.\n    它离那件夹克更进一步。\n\n    129\n    00:05:42,319 --\u003e 00:05:45,821\n    Claude, you're on pager\n    duty until we get back.\n    克劳德，你的传呼机\n    等到我们回来。\n\n    130\n    00:05:46,957 --\u003e 00:05:49,558\n    Jared, can I borrow that jacket?\n    贾里德，我能借那件夹克吗？\n\n\n\n## Install\n\n    git clone git@github.com:joway/PySubtitle.git\n    cd PySubtitle\n    pip install -r requirements.txt\n\n## Run\n\n\n- auto translate to zh\n\n    ```python\n    python subtitle.py xxx.srt\n    ```\n\n- specially translate to other languages\n\n    ```python\n    python subtitle.py xxx.srt -t en\n    ```\n\n-  separately in two lines\n\n    ```python\n    python subtitle.py xxx.srt -d\n    ```\n\n    128\n    00:05:40,217 --\u003e 00:05:42,217\n    It's further from that jacket.\n    它离那件夹克更进一步。\n\n\n# Dependence\n\nPython 3.x\n\n\n# How it works\n\nPowered by [Baidu Translate API](http://api.fanyi.baidu.com/api/trans/product/index)\n\n# TODO\n\n- web\n- custom setting\n- speed up","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoway%2Fpysubtitle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoway%2Fpysubtitle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoway%2Fpysubtitle/lists"}