Skip to main content

CLI tool for downloading subtitles from napiprojekt.pl

Project description

napi-py PyPI - Python Version CI

CLI tool for downloading subtitles from napiprojekt.pl, fork of gabrys/napi.py

prerequisites

  • Python 3.6.2 or newer
  • on Linux, python3-dev package:
    • for Debian-based systems, use sudo apt-get install python3-dev

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napi-py-0.2.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napi_py-0.2.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file napi-py-0.2.1.tar.gz.

File metadata

  • Download URL: napi-py-0.2.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.4.0-1047-azure

File hashes

Hashes for napi-py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4111f30ecc102a3ef4f90d88c8546584e1a9d1a37bbab325c2533bd6637bd9b7
MD5 a48f0b19826b1451ba164add1f9c3d9d
BLAKE2b-256 2d0c5fa2af545885eaebc6a8ba4e8685610d63164c2e0e698b161bd813464c1a

See more details on using hashes here.

File details

Details for the file napi_py-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: napi_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.4.0-1047-azure

File hashes

Hashes for napi_py-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a59db5a609a8d8021bc2485b74265955f9f712d7eef8f80e01be4f0f21c44a4e
MD5 28b61924e27ef9271b9c1038e951c5b3
BLAKE2b-256 bd95d63c2d41a1100b78eea340c795d1325983b0ef519a790affb68f914f6adf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page