trakit


Nametrakit JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/ratoaq2/trakit
SummaryGuess additional information from track titles
upload_time2023-01-08 21:02:13
maintainer
docs_urlNone
authorRato
requires_python>=3.8.1,<4.0.0
licenseMIT
keywords video mkv audio subtitles srt pgs sup sub metadata movie episode tv shows series
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TrakIt
Guess additional information from track titles

[![Latest
Version](https://img.shields.io/pypi/v/trakit.svg)](https://pypi.python.org/pypi/trakit)

[![tests](https://github.com/ratoaq2/trakit/actions/workflows/test.yml/badge.svg)](https://github.com/ratoaq2/trakit/actions/workflows/test.yml)

[![License](https://img.shields.io/github/license/ratoaq2/trakit.svg)](https://github.com/ratoaq2/trakit/blob/master/LICENSE)

  - Project page  
    <https://github.com/ratoaq2/trakit>

## Info

**TrakIt** is a track name parser.
It is a tiny library created to solve a very specific problem.
It's very common that video files do not have precise metadata information, 
where you can have multiple subtitle tracks tagged as **Portuguese**, 
but one of them is actually **Brazilian Portuguese**:
```json lines
{
  "codec": "SubRip/SRT",
  "id": 19,
  "properties": {
    "codec_id": "S_TEXT/UTF8",
    "codec_private_length": 0,
    "default_track": false,
    "enabled_track": true,
    "encoding": "UTF-8",
    "forced_track": false,
    "language": "por",
    "language_ietf": "pt",
    "number": 20,
    "text_subtitles": true,
    "track_name": "Português",
    "uid": 160224385584803173
  }
}

{
  "codec": "SubRip/SRT",
  "id": 20,
  "properties": {
    "codec_id": "S_TEXT/UTF8",
    "codec_private_length": 0,
    "default_track": false,
    "enabled_track": true,
    "encoding": "UTF-8",
    "forced_track": false,
    "language": "por",
    "language_ietf": "pt",
    "number": 21,
    "text_subtitles": true,
    "track_name": "Português (Brasil)",
    "uid": 1435945803220205
  }
}
```
Or you have multiple audio tracks in **English**,
but one of them is **British English** (`British English Forced (PGS)`) and others are **American English**
(`American English (PGS)`)

Given a track name, **TrakIt** can guess the language:

```bash
>> trakit "Português (Brasil)"
{
  "language": "pt-BR"
}
```

**TrakIt** is also able to identify:
* SDH: Subtitles for the Deaf or Hard of Hearing
* Forced flag
* Closed captions
* Alternate version tracks
* Commentary tracks

```bash
>> trakit "British English (SDH) (PGS)"
{
  "language": "en-GB",
  "hearing_impaired": true
}

>> trakit "English CC (SRT)"
{
  "language": "en",
  "closed_caption": true
}

>> trakit "Cast and Crew Commentary (English AC3 Stereo)"
{
  "language": "en",
  "commentary": true
}

>> trakit "Français Forced (SRT)"
{
  "language": "fr",
  "forced": true
}
```

**TrakIt** is not a release parser. Use [GuessIt](https://github.com/guessit-io/guessit)

**TrakIt** is not a video metadata extractor.
Use [KnowIt](https://github.com/ratoaq2/knowit).
KnowIt already uses **trakit** to enhance the extracted information

## Installation

**TrakIt** can be installed as a regular python module by running:

    $ [sudo] pip install trakit

For a better isolation with your system you should use a dedicated
virtualenv or install for your user only using the `--user` flag.

## Data
* Available languages are the same supported by [Diaoul/babelfish](https://github.com/Diaoul/babelfish)
* Localized country names were fetched from [mledoze/countries](https://github.com/mledoze/countries)
* Localized language names were fetched from [mozilla/language-mapping-list](https://github.com/mozilla/language-mapping-list)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ratoaq2/trakit",
    "name": "trakit",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0.0",
    "maintainer_email": "",
    "keywords": "video,mkv,audio,subtitles,srt,pgs,sup,sub,metadata,movie,episode,tv,shows,series",
    "author": "Rato",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/fa/68/6bdfd080c187f4d2eaa66c0a4b817962063ec0ad098f4ca4e0561ba1ec74/trakit-0.1.2.tar.gz",
    "platform": null,
    "description": "# TrakIt\nGuess additional information from track titles\n\n[![Latest\nVersion](https://img.shields.io/pypi/v/trakit.svg)](https://pypi.python.org/pypi/trakit)\n\n[![tests](https://github.com/ratoaq2/trakit/actions/workflows/test.yml/badge.svg)](https://github.com/ratoaq2/trakit/actions/workflows/test.yml)\n\n[![License](https://img.shields.io/github/license/ratoaq2/trakit.svg)](https://github.com/ratoaq2/trakit/blob/master/LICENSE)\n\n  - Project page  \n    <https://github.com/ratoaq2/trakit>\n\n## Info\n\n**TrakIt** is a track name parser.\nIt is a tiny library created to solve a very specific problem.\nIt's very common that video files do not have precise metadata information, \nwhere you can have multiple subtitle tracks tagged as **Portuguese**, \nbut one of them is actually **Brazilian Portuguese**:\n```json lines\n{\n  \"codec\": \"SubRip/SRT\",\n  \"id\": 19,\n  \"properties\": {\n    \"codec_id\": \"S_TEXT/UTF8\",\n    \"codec_private_length\": 0,\n    \"default_track\": false,\n    \"enabled_track\": true,\n    \"encoding\": \"UTF-8\",\n    \"forced_track\": false,\n    \"language\": \"por\",\n    \"language_ietf\": \"pt\",\n    \"number\": 20,\n    \"text_subtitles\": true,\n    \"track_name\": \"Portugu\u00eas\",\n    \"uid\": 160224385584803173\n  }\n}\n\n{\n  \"codec\": \"SubRip/SRT\",\n  \"id\": 20,\n  \"properties\": {\n    \"codec_id\": \"S_TEXT/UTF8\",\n    \"codec_private_length\": 0,\n    \"default_track\": false,\n    \"enabled_track\": true,\n    \"encoding\": \"UTF-8\",\n    \"forced_track\": false,\n    \"language\": \"por\",\n    \"language_ietf\": \"pt\",\n    \"number\": 21,\n    \"text_subtitles\": true,\n    \"track_name\": \"Portugu\u00eas (Brasil)\",\n    \"uid\": 1435945803220205\n  }\n}\n```\nOr you have multiple audio tracks in **English**,\nbut one of them is **British English** (`British English Forced (PGS)`) and others are **American English**\n(`American English (PGS)`)\n\nGiven a track name, **TrakIt** can guess the language:\n\n```bash\n>> trakit \"Portugu\u00eas (Brasil)\"\n{\n  \"language\": \"pt-BR\"\n}\n```\n\n**TrakIt** is also able to identify:\n* SDH: Subtitles for the Deaf or Hard of Hearing\n* Forced flag\n* Closed captions\n* Alternate version tracks\n* Commentary tracks\n\n```bash\n>> trakit \"British English (SDH) (PGS)\"\n{\n  \"language\": \"en-GB\",\n  \"hearing_impaired\": true\n}\n\n>> trakit \"English CC (SRT)\"\n{\n  \"language\": \"en\",\n  \"closed_caption\": true\n}\n\n>> trakit \"Cast and Crew Commentary (English AC3 Stereo)\"\n{\n  \"language\": \"en\",\n  \"commentary\": true\n}\n\n>> trakit \"Fran\u00e7ais Forced (SRT)\"\n{\n  \"language\": \"fr\",\n  \"forced\": true\n}\n```\n\n**TrakIt** is not a release parser. Use [GuessIt](https://github.com/guessit-io/guessit)\n\n**TrakIt** is not a video metadata extractor.\nUse [KnowIt](https://github.com/ratoaq2/knowit).\nKnowIt already uses **trakit** to enhance the extracted information\n\n## Installation\n\n**TrakIt** can be installed as a regular python module by running:\n\n    $ [sudo] pip install trakit\n\nFor a better isolation with your system you should use a dedicated\nvirtualenv or install for your user only using the `--user` flag.\n\n## Data\n* Available languages are the same supported by [Diaoul/babelfish](https://github.com/Diaoul/babelfish)\n* Localized country names were fetched from [mledoze/countries](https://github.com/mledoze/countries)\n* Localized language names were fetched from [mozilla/language-mapping-list](https://github.com/mozilla/language-mapping-list)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Guess additional information from track titles",
    "version": "0.1.2",
    "split_keywords": [
        "video",
        "mkv",
        "audio",
        "subtitles",
        "srt",
        "pgs",
        "sup",
        "sub",
        "metadata",
        "movie",
        "episode",
        "tv",
        "shows",
        "series"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25f0aa5e2475ed4600a6b0f90fd045dfc270ba13d1892c9af1d3ad599eaf7047",
                "md5": "59e8674d44ff70ef61217f37b2df6d26",
                "sha256": "d7c6a3ac4ab85090aacb4556c4d32fe2713ccdf4d2bf15650eb31c4c619e6fce"
            },
            "downloads": -1,
            "filename": "trakit-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "59e8674d44ff70ef61217f37b2df6d26",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 16653,
            "upload_time": "2023-01-08T21:02:12",
            "upload_time_iso_8601": "2023-01-08T21:02:12.515789Z",
            "url": "https://files.pythonhosted.org/packages/25/f0/aa5e2475ed4600a6b0f90fd045dfc270ba13d1892c9af1d3ad599eaf7047/trakit-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa686bdfd080c187f4d2eaa66c0a4b817962063ec0ad098f4ca4e0561ba1ec74",
                "md5": "3cfe42be876bdcab89cf0c8a58e2a70e",
                "sha256": "b949a259e4ebdd94e47835891535cde104829c64d3a9b5a91b9256b089295d0a"
            },
            "downloads": -1,
            "filename": "trakit-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3cfe42be876bdcab89cf0c8a58e2a70e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 16406,
            "upload_time": "2023-01-08T21:02:13",
            "upload_time_iso_8601": "2023-01-08T21:02:13.951984Z",
            "url": "https://files.pythonhosted.org/packages/fa/68/6bdfd080c187f4d2eaa66c0a4b817962063ec0ad098f4ca4e0561ba1ec74/trakit-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-08 21:02:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ratoaq2",
    "github_project": "trakit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "trakit"
}
        
Elapsed time: 0.03895s