subt


Namesubt JSON
Version 0.0.0 PyPI version JSON
download
home_pagehttps://github.com/eggplants/subt
SummaryTranslate a subtitle file
upload_time2024-07-27 23:53:37
maintainerNone
docs_urlNone
authoreggplants
requires_python<4.0,>=3.12
licenseMIT
keywords subtitle translate
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # subt

[![PyPI version](
  <https://badge.fury.io/py/subt.svg>
  )](
  <https://badge.fury.io/py/subt>
) [![Maintainability](
  <https://api.codeclimate.com/v1/badges/a41545d7775b010ad9b2/maintainability>
  )](
  <https://codeclimate.com/github/eggplants/subt/maintainability>
) [![pre-commit.ci status](
  <https://results.pre-commit.ci/badge/github/eggplants/subt/master.svg>
  )](
  <https://results.pre-commit.ci/latest/github/eggplants/subt/master>
)

[![Test Coverage](
  <https://api.codeclimate.com/v1/badges/a41545d7775b010ad9b2/test_coverage>
  )](
  <https://codeclimate.com/github/eggplants/subt/test_coverage>
) [![Test](
  <https://github.com/eggplants/subt/actions/workflows/test.yml/badge.svg>
  )](
  <https://github.com/eggplants/subt/actions/workflows/test.yml>
)

[![ghcr latest](
  <https://ghcr-badge.deta.dev/eggplants/subt/latest_tag?trim=major&label=latest>
 ) ![ghcr size](
  <https://ghcr-badge.deta.dev/eggplants/subt/size>
)](
  <https://github.com/eggplants/subt/pkgs/container/subt>
)

Translate a subtitle file

## Install

```sh
pip install subt
# or
pipx install subt
```

## Run

<!-- markdownlint-disable MD033 -->
<details>

<summary> Generate `.srt` file from [Me at the zoo](https://www.youtube.com/watch?v=jNQXAC9IVRw) </summary>

```shellsession
$ yt-dlp 'https://www.youtube.com/watch?v=jNQXAC9IVRw'
$ whisper-ctranslate2 'Me at the zoo [jNQXAC9IVRw].mp4'
$ cat 
1
00:00:00,000 --> 00:00:05,000
Alright, so here we are, one of the elephants.

2
00:00:05,000 --> 00:00:13,000
The cool thing about these guys is that they have really, really, really long trunks.

3
00:00:13,000 --> 00:00:16,000
And that's cool.

4
00:00:16,000 --> 00:00:19,000
And that's pretty much all there is to say.
```

</details>
<!-- markdownlint-enable MD033 -->

```shellsession
$ subt 'Me at the zoo [jNQXAC9IVRw].srt' -d ja
Saved: './Me at the zoo [jNQXAC9IVRw].translated.srt'
$ cat 'Me at the zoo [jNQXAC9IVRw].translated.srt'
1
00:00:00,000 --> 00:00:05,000
さて、ここに私たちは象の一人です。

2
00:00:05,000 --> 00:00:13,000
これらの人のクールなことは、彼らが本当に、本当に、本当に長い幹を持っているということです。

3
00:00:13,000 --> 00:00:16,000
そして、それはクールです。

4
00:00:16,000 --> 00:00:19,000
そして、それはほとんどすべてです。
```

## Help

```shellsession
$ subt -h
usage: subt [-h] [-S SERVICE] [-s LANG] [-d LANG] [-V] sub_file

Translate a subtitle file

positional arguments:
  sub_file

options:
  -h, --help     show this help message and exit
  -S SERVICE     service to translate (default: google)
  -s LANG        source language (default: auto)
  -d LANG        destination language (default: en)
  -V, --version  show program's version number and exit
```

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eggplants/subt",
    "name": "subt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "subtitle, translate",
    "author": "eggplants",
    "author_email": "w10776e8w@yahoo.co.jp",
    "download_url": "https://files.pythonhosted.org/packages/80/91/edbe4537bf3fe5de2a66d193877f2fb8315da1f0d764595f172ccb295ed8/subt-0.0.0.tar.gz",
    "platform": null,
    "description": "# subt\n\n[![PyPI version](\n  <https://badge.fury.io/py/subt.svg>\n  )](\n  <https://badge.fury.io/py/subt>\n) [![Maintainability](\n  <https://api.codeclimate.com/v1/badges/a41545d7775b010ad9b2/maintainability>\n  )](\n  <https://codeclimate.com/github/eggplants/subt/maintainability>\n) [![pre-commit.ci status](\n  <https://results.pre-commit.ci/badge/github/eggplants/subt/master.svg>\n  )](\n  <https://results.pre-commit.ci/latest/github/eggplants/subt/master>\n)\n\n[![Test Coverage](\n  <https://api.codeclimate.com/v1/badges/a41545d7775b010ad9b2/test_coverage>\n  )](\n  <https://codeclimate.com/github/eggplants/subt/test_coverage>\n) [![Test](\n  <https://github.com/eggplants/subt/actions/workflows/test.yml/badge.svg>\n  )](\n  <https://github.com/eggplants/subt/actions/workflows/test.yml>\n)\n\n[![ghcr latest](\n  <https://ghcr-badge.deta.dev/eggplants/subt/latest_tag?trim=major&label=latest>\n ) ![ghcr size](\n  <https://ghcr-badge.deta.dev/eggplants/subt/size>\n)](\n  <https://github.com/eggplants/subt/pkgs/container/subt>\n)\n\nTranslate a subtitle file\n\n## Install\n\n```sh\npip install subt\n# or\npipx install subt\n```\n\n## Run\n\n<!-- markdownlint-disable MD033 -->\n<details>\n\n<summary> Generate `.srt` file from [Me at the zoo](https://www.youtube.com/watch?v=jNQXAC9IVRw) </summary>\n\n```shellsession\n$ yt-dlp 'https://www.youtube.com/watch?v=jNQXAC9IVRw'\n$ whisper-ctranslate2 'Me at the zoo [jNQXAC9IVRw].mp4'\n$ cat \n1\n00:00:00,000 --> 00:00:05,000\nAlright, so here we are, one of the elephants.\n\n2\n00:00:05,000 --> 00:00:13,000\nThe cool thing about these guys is that they have really, really, really long trunks.\n\n3\n00:00:13,000 --> 00:00:16,000\nAnd that's cool.\n\n4\n00:00:16,000 --> 00:00:19,000\nAnd that's pretty much all there is to say.\n```\n\n</details>\n<!-- markdownlint-enable MD033 -->\n\n```shellsession\n$ subt 'Me at the zoo [jNQXAC9IVRw].srt' -d ja\nSaved: './Me at the zoo [jNQXAC9IVRw].translated.srt'\n$ cat 'Me at the zoo [jNQXAC9IVRw].translated.srt'\n1\n00:00:00,000 --> 00:00:05,000\n\u3055\u3066\u3001\u3053\u3053\u306b\u79c1\u305f\u3061\u306f\u8c61\u306e\u4e00\u4eba\u3067\u3059\u3002\n\n2\n00:00:05,000 --> 00:00:13,000\n\u3053\u308c\u3089\u306e\u4eba\u306e\u30af\u30fc\u30eb\u306a\u3053\u3068\u306f\u3001\u5f7c\u3089\u304c\u672c\u5f53\u306b\u3001\u672c\u5f53\u306b\u3001\u672c\u5f53\u306b\u9577\u3044\u5e79\u3092\u6301\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\n\n3\n00:00:13,000 --> 00:00:16,000\n\u305d\u3057\u3066\u3001\u305d\u308c\u306f\u30af\u30fc\u30eb\u3067\u3059\u3002\n\n4\n00:00:16,000 --> 00:00:19,000\n\u305d\u3057\u3066\u3001\u305d\u308c\u306f\u307b\u3068\u3093\u3069\u3059\u3079\u3066\u3067\u3059\u3002\n```\n\n## Help\n\n```shellsession\n$ subt -h\nusage: subt [-h] [-S SERVICE] [-s LANG] [-d LANG] [-V] sub_file\n\nTranslate a subtitle file\n\npositional arguments:\n  sub_file\n\noptions:\n  -h, --help     show this help message and exit\n  -S SERVICE     service to translate (default: google)\n  -s LANG        source language (default: auto)\n  -d LANG        destination language (default: en)\n  -V, --version  show program's version number and exit\n```\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Translate a subtitle file",
    "version": "0.0.0",
    "project_urls": {
        "Homepage": "https://github.com/eggplants/subt",
        "Repository": "https://github.com/eggplants/subt"
    },
    "split_keywords": [
        "subtitle",
        " translate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c5b62bd8fea8737ddbb0ab8168f0e95dc92c093dd020fb2ec2d43217e459a00",
                "md5": "a025f4660975ab8419c1b46e84330e90",
                "sha256": "ae13c7b0f74a4d7b9b719d0b59e76d9e9dd539b5083ad312721b72d51ac34f90"
            },
            "downloads": -1,
            "filename": "subt-0.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a025f4660975ab8419c1b46e84330e90",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 4732,
            "upload_time": "2024-07-27T23:53:35",
            "upload_time_iso_8601": "2024-07-27T23:53:35.681939Z",
            "url": "https://files.pythonhosted.org/packages/6c/5b/62bd8fea8737ddbb0ab8168f0e95dc92c093dd020fb2ec2d43217e459a00/subt-0.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8091edbe4537bf3fe5de2a66d193877f2fb8315da1f0d764595f172ccb295ed8",
                "md5": "ff72c7a427ac94b9796b2004f3f4a10e",
                "sha256": "bfdab45e33060876929db664379af203f9c3f82d5dfb6b460e087598f124a43b"
            },
            "downloads": -1,
            "filename": "subt-0.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ff72c7a427ac94b9796b2004f3f4a10e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 4368,
            "upload_time": "2024-07-27T23:53:37",
            "upload_time_iso_8601": "2024-07-27T23:53:37.165906Z",
            "url": "https://files.pythonhosted.org/packages/80/91/edbe4537bf3fe5de2a66d193877f2fb8315da1f0d764595f172ccb295ed8/subt-0.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-27 23:53:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eggplants",
    "github_project": "subt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "subt"
}
        
Elapsed time: 8.58718s