napi-py


Namenapi-py JSON
Version 1.2.4 PyPI version JSON
download
home_pagehttps://github.com/emkor/napi-py
SummaryCLI tool for downloading subtitles from napiprojekt.pl
upload_time2024-09-08 17:15:30
maintainerNone
docs_urlNone
authoremkor93
requires_python<4.0,>=3.7
licenseGPL-3.0 License
keywords napiprojekt subs subtitles movie film
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # napi-py ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/napi-py) ![CI](https://github.com/emkor/napi-py/workflows/CI/badge.svg)
CLI tool for downloading subtitles from napiprojekt.pl, fork of [gabrys/napi.py](https://github.com/gabrys/napi.py)

## prerequisites
- Python 3.7 or newer

## installation
- `pip install napi-py` for user-wide installation

## usage as CLI tool
- `napi-py ~/Downloads/MyMovie.mp4` will download and save subtitles under `~/Downloads/MyMovie.srt`

## usage as lib
```python
from napi import NapiPy

movie_path = "~/Downloads/MyMovie.mp4"

napi = NapiPy()
movie_hash = napi.calc_hash(movie_path)
source_encoding, target_encoding, tmp_file = napi.download_subs(movie_hash)
subs_path = napi.move_subs_to_movie(tmp_file, movie_path)
print(subs_path)
```

## in case of issues
- if there are no subs for your movie, there's still hope:
    - open the movie web page on `napiprojekt.pl` in your browser, as in example: `https://www.napiprojekt.pl/napisy1,1,1-dla-55534-Z%C5%82odziejaszki-(2018)`
    - choose subtitles that might match your movie, right-click them and select "Copy link" on link containing hash, which looks like this `napiprojekt:96edd6537d9852a51cbdd5b64fee9194`
    - use flag `--hash YOURHASH` in this tool, i.e. `--hash 96edd6537d9852a51cbdd5b64fee9194` or `--hash napiprojekt:96edd6537d9852a51cbdd5b64fee9194`

## development
- `make install` installs poetry virtualenv
- `make test` runs tests
- `make build` creates installable package

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/emkor/napi-py",
    "name": "napi-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.7",
    "maintainer_email": null,
    "keywords": "napiprojekt, subs, subtitles, movie, film",
    "author": "emkor93",
    "author_email": "emkor93@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/16/c8/da6cdc6afdcdfcdb78626972a3ee6e099587505ca309dbb56255fbd561b3/napi_py-1.2.4.tar.gz",
    "platform": null,
    "description": "# napi-py ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/napi-py) ![CI](https://github.com/emkor/napi-py/workflows/CI/badge.svg)\nCLI tool for downloading subtitles from napiprojekt.pl, fork of [gabrys/napi.py](https://github.com/gabrys/napi.py)\n\n## prerequisites\n- Python 3.7 or newer\n\n## installation\n- `pip install napi-py` for user-wide installation\n\n## usage as CLI tool\n- `napi-py ~/Downloads/MyMovie.mp4` will download and save subtitles under `~/Downloads/MyMovie.srt`\n\n## usage as lib\n```python\nfrom napi import NapiPy\n\nmovie_path = \"~/Downloads/MyMovie.mp4\"\n\nnapi = NapiPy()\nmovie_hash = napi.calc_hash(movie_path)\nsource_encoding, target_encoding, tmp_file = napi.download_subs(movie_hash)\nsubs_path = napi.move_subs_to_movie(tmp_file, movie_path)\nprint(subs_path)\n```\n\n## in case of issues\n- if there are no subs for your movie, there's still hope:\n    - open the movie web page on `napiprojekt.pl` in your browser, as in example: `https://www.napiprojekt.pl/napisy1,1,1-dla-55534-Z%C5%82odziejaszki-(2018)`\n    - choose subtitles that might match your movie, right-click them and select \"Copy link\" on link containing hash, which looks like this `napiprojekt:96edd6537d9852a51cbdd5b64fee9194`\n    - use flag `--hash YOURHASH` in this tool, i.e. `--hash 96edd6537d9852a51cbdd5b64fee9194` or `--hash napiprojekt:96edd6537d9852a51cbdd5b64fee9194`\n\n## development\n- `make install` installs poetry virtualenv\n- `make test` runs tests\n- `make build` creates installable package\n",
    "bugtrack_url": null,
    "license": "GPL-3.0 License",
    "summary": "CLI tool for downloading subtitles from napiprojekt.pl",
    "version": "1.2.4",
    "project_urls": {
        "Homepage": "https://github.com/emkor/napi-py",
        "Repository": "https://github.com/emkor/napi-py"
    },
    "split_keywords": [
        "napiprojekt",
        " subs",
        " subtitles",
        " movie",
        " film"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "840c5b34434a6ce2b80ee98b4e38cef9147405acbd5a128017c9d13e2b63fcb6",
                "md5": "1b77135516ab46dfa0327eb9ef1635b3",
                "sha256": "24fa54bb2617b5c6cccaf7b0870795ac9be79c6072fe5f51fe096a0a22b6aa9f"
            },
            "downloads": -1,
            "filename": "napi_py-1.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1b77135516ab46dfa0327eb9ef1635b3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 18895,
            "upload_time": "2024-09-08T17:15:29",
            "upload_time_iso_8601": "2024-09-08T17:15:29.802782Z",
            "url": "https://files.pythonhosted.org/packages/84/0c/5b34434a6ce2b80ee98b4e38cef9147405acbd5a128017c9d13e2b63fcb6/napi_py-1.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16c8da6cdc6afdcdfcdb78626972a3ee6e099587505ca309dbb56255fbd561b3",
                "md5": "a0cb917821d75ff111a0f1c18cf5ad4f",
                "sha256": "d278cd4a716f00ce1719d1963a6c53224e7ab87f4c5d43eee8e348f65c6f9c2a"
            },
            "downloads": -1,
            "filename": "napi_py-1.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a0cb917821d75ff111a0f1c18cf5ad4f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 16960,
            "upload_time": "2024-09-08T17:15:30",
            "upload_time_iso_8601": "2024-09-08T17:15:30.773008Z",
            "url": "https://files.pythonhosted.org/packages/16/c8/da6cdc6afdcdfcdb78626972a3ee6e099587505ca309dbb56255fbd561b3/napi_py-1.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-08 17:15:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "emkor",
    "github_project": "napi-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "napi-py"
}
        
Elapsed time: 0.37651s