pgsrip


Namepgsrip JSON
Version 0.1.11 PyPI version JSON
download
home_pagehttps://github.com/ratoaq2/pgsrip
SummaryRip your PGS subtitles
upload_time2024-06-23 06:46:06
maintainerNone
docs_urlNone
authorRato
requires_python<4.0.0,>=3.9.0
licenseMIT
keywords video mkv subtitles rip 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.
            # PGSRip

Rip your PGS subtitles.

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

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

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

**PGSRip** is a command line tool that allows you to extract and convert
PGS subtitles into SRT format. This tool requires MKVToolNix and
tesseract-ocr and tessdata (<https://github.com/tesseract-ocr/tessdata>
or <https://github.com/tesseract-ocr/tessdata_best>)

## Installation

pgsrip:

    $ pip install pgsrip

MKVToolNix:

    [Linux/WSL - Ubuntu/Debian]
    $ sudo apt-get install mkvtoolnix

    [Windows/Chocolatey]
    $ choco install mkvtoolnix

tesseract:

PPA is used to install latest tesseract 5.x. Skip PPA repository if you decide to stick with latest official Debian/Ubuntu package

    [Linux/WSL - Ubuntu/Debian]
    $ sudo add-apt-repository ppa:alex-p/tesseract-ocr5
    $ sudo apt update
    $ sudo apt-get install tesseract-ocr

    [Windows/Chocolatey]
    $ choco install tesseract-ocr


tessdata:

    $ git clone https://github.com/tesseract-ocr/tessdata_best.git
    export TESSDATA_PREFIX=~/tessdata_best

If you prefer to build the docker image Build Docker:

    $ git clone https://github.com/ratoaq2/pgsrip.git
    cd pgsrip
    docker build . -t pgsrip

## Usage

### CLI

Rip from a .mkv:

    $ pgsrip mymedia.mkv
    3 PGS subtitles collected from 1 file
    Ripping subtitles  [####################################]  100%  mymedia.mkv [5:de]
    3 PGS subtitles ripped from 1 file

Rip from a .mks:

    $ pgsrip mymedia.mks
    3 PGS subtitles collected from 1 file
    Ripping subtitles  [####################################]  100%  mymedia.mks [3:pt-BR]
    3 PGS subtitles ripped from 1 file

Rip from a .sup:

    $ pgsrip mymedia.en.sup
    1 PGS subtitle collected from 1 file
    Ripping subtitles  [####################################]  100%  mymedia.en.sup
    1 PGS subtitle ripped from 1 file

Rip from a folder path:

    $ pgsrip -l en -l pt-BR ~/medias/
    11 PGS subtitles collected from 9 files / 2 files filtered out
    Ripping subtitles  [####################################]  100%  ~/medias/mymedia.mkv [4:en]
    11 PGS subtitles ripped from 9 files

Using docker:

    $ docker run -it --rm -v /medias:/medias -u $(id -u username):$(id -g username) ratoaq2/pgsrip -l en -l de -l pt-BR -l pt /medias
    11 PGS subtitles collected from 9 files / 2 files filtered out
    Ripping subtitles  [####################################]  100%  /medias/mymedia.mkv [4:en]
    11 PGS subtitles ripped from 9 files

### API

``` python
from pgsrip import pgsrip, Mkv, Options
from babelfish import Language

media = Mkv('/subtitle/path/mymedia.mkv')
options = Options(languages={Language('eng')}, overwrite=True, one_per_lang=False)
pgsrip.rip(media, options)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ratoaq2/pgsrip",
    "name": "pgsrip",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.9.0",
    "maintainer_email": null,
    "keywords": "video, mkv, subtitles, rip, srt, pgs, sup, sub, metadata, movie, episode, tv, shows, series",
    "author": "Rato",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/40/63/0301da494ddb17ed72c093aabab4fc41f6e5dff9af6a40acb1525491f141/pgsrip-0.1.11.tar.gz",
    "platform": null,
    "description": "# PGSRip\n\nRip your PGS subtitles.\n\n[![Latest\nVersion](https://img.shields.io/pypi/v/pgsrip.svg)](https://pypi.python.org/pypi/pgsrip)\n\n[![License](https://img.shields.io/github/license/ratoaq2/pgsrip.svg)](https://github.com/ratoaq2/pgsrip/blob/master/LICENSE)\n\n  - Project page  \n    <https://github.com/ratoaq2/pgsrip>\n\n**PGSRip** is a command line tool that allows you to extract and convert\nPGS subtitles into SRT format. This tool requires MKVToolNix and\ntesseract-ocr and tessdata (<https://github.com/tesseract-ocr/tessdata>\nor <https://github.com/tesseract-ocr/tessdata_best>)\n\n## Installation\n\npgsrip:\n\n    $ pip install pgsrip\n\nMKVToolNix:\n\n    [Linux/WSL - Ubuntu/Debian]\n    $ sudo apt-get install mkvtoolnix\n\n    [Windows/Chocolatey]\n    $ choco install mkvtoolnix\n\ntesseract:\n\nPPA is used to install latest tesseract 5.x. Skip PPA repository if you decide to stick with latest official Debian/Ubuntu package\n\n    [Linux/WSL - Ubuntu/Debian]\n    $ sudo add-apt-repository ppa:alex-p/tesseract-ocr5\n    $ sudo apt update\n    $ sudo apt-get install tesseract-ocr\n\n    [Windows/Chocolatey]\n    $ choco install tesseract-ocr\n\n\ntessdata:\n\n    $ git clone https://github.com/tesseract-ocr/tessdata_best.git\n    export TESSDATA_PREFIX=~/tessdata_best\n\nIf you prefer to build the docker image Build Docker:\n\n    $ git clone https://github.com/ratoaq2/pgsrip.git\n    cd pgsrip\n    docker build . -t pgsrip\n\n## Usage\n\n### CLI\n\nRip from a .mkv:\n\n    $ pgsrip mymedia.mkv\n    3 PGS subtitles collected from 1 file\n    Ripping subtitles  [####################################]  100%  mymedia.mkv [5:de]\n    3 PGS subtitles ripped from 1 file\n\nRip from a .mks:\n\n    $ pgsrip mymedia.mks\n    3 PGS subtitles collected from 1 file\n    Ripping subtitles  [####################################]  100%  mymedia.mks [3:pt-BR]\n    3 PGS subtitles ripped from 1 file\n\nRip from a .sup:\n\n    $ pgsrip mymedia.en.sup\n    1 PGS subtitle collected from 1 file\n    Ripping subtitles  [####################################]  100%  mymedia.en.sup\n    1 PGS subtitle ripped from 1 file\n\nRip from a folder path:\n\n    $ pgsrip -l en -l pt-BR ~/medias/\n    11 PGS subtitles collected from 9 files / 2 files filtered out\n    Ripping subtitles  [####################################]  100%  ~/medias/mymedia.mkv [4:en]\n    11 PGS subtitles ripped from 9 files\n\nUsing docker:\n\n    $ docker run -it --rm -v /medias:/medias -u $(id -u username):$(id -g username) ratoaq2/pgsrip -l en -l de -l pt-BR -l pt /medias\n    11 PGS subtitles collected from 9 files / 2 files filtered out\n    Ripping subtitles  [####################################]  100%  /medias/mymedia.mkv [4:en]\n    11 PGS subtitles ripped from 9 files\n\n### API\n\n``` python\nfrom pgsrip import pgsrip, Mkv, Options\nfrom babelfish import Language\n\nmedia = Mkv('/subtitle/path/mymedia.mkv')\noptions = Options(languages={Language('eng')}, overwrite=True, one_per_lang=False)\npgsrip.rip(media, options)\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Rip your PGS subtitles",
    "version": "0.1.11",
    "project_urls": {
        "Homepage": "https://github.com/ratoaq2/pgsrip",
        "Repository": "https://github.com/ratoaq2/pgsrip"
    },
    "split_keywords": [
        "video",
        " mkv",
        " subtitles",
        " rip",
        " srt",
        " pgs",
        " sup",
        " sub",
        " metadata",
        " movie",
        " episode",
        " tv",
        " shows",
        " series"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e0d1ce5ae5d6efd45ae1a6c1cb7b4387b490b54ae443ebe9117fa061a8c8ce3",
                "md5": "15fed08fbbdbb4506989f9bec38dec5a",
                "sha256": "807cbbf315ee3698d261af660dd89efe62f992149b68fe86f47caff3bb581e8e"
            },
            "downloads": -1,
            "filename": "pgsrip-0.1.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "15fed08fbbdbb4506989f9bec38dec5a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.9.0",
            "size": 20790,
            "upload_time": "2024-06-23T06:46:05",
            "upload_time_iso_8601": "2024-06-23T06:46:05.022840Z",
            "url": "https://files.pythonhosted.org/packages/3e/0d/1ce5ae5d6efd45ae1a6c1cb7b4387b490b54ae443ebe9117fa061a8c8ce3/pgsrip-0.1.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "40630301da494ddb17ed72c093aabab4fc41f6e5dff9af6a40acb1525491f141",
                "md5": "3aa0bdaa8d89c1cd8aad8eaef9015585",
                "sha256": "0029e8e70c225e7fcfeeb190e30fb3452107e486ba80c5c279907ef2ea9d5195"
            },
            "downloads": -1,
            "filename": "pgsrip-0.1.11.tar.gz",
            "has_sig": false,
            "md5_digest": "3aa0bdaa8d89c1cd8aad8eaef9015585",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.9.0",
            "size": 16899,
            "upload_time": "2024-06-23T06:46:06",
            "upload_time_iso_8601": "2024-06-23T06:46:06.238114Z",
            "url": "https://files.pythonhosted.org/packages/40/63/0301da494ddb17ed72c093aabab4fc41f6e5dff9af6a40acb1525491f141/pgsrip-0.1.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-23 06:46:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ratoaq2",
    "github_project": "pgsrip",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pgsrip"
}
        
Elapsed time: 0.26969s