Skip to main content

napi-py Build Status

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

prerequisites

  • Python 3.6 or later
  • 7z available on PATH

installation

  • sudo pip install napi-py for system wide installation

usage as tool

  • napi-py ~/Downloads/MyMovie.mp4

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's issue with weird characters in downloaded subtitles, try to re-download and use flag --from-enc utf-8
  • if there's no subtitles 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

development

  • make config installs venv under .venv/napi-py
  • make test runs tests
  • make build creates installable package

Release files for napi-py 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napi-py 0.1.7
File Size Uploaded
napi-py-0.1.7.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for napi-py 0.1.7
File Interpreter ABI Platform
napi_py-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 25.1 kB

Release files / napi-py-0.1.7.tar.gz

Download URL napi-py-0.1.7.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7f9b6cf3299c64898180cd274f0272cca3093d0e76b938f9dcaed5d5a6202f4b
BLAKE2b-256 checksum
How to use checksums
b5f7d9074244ccc3e81cd9345561677872e0526f939597a41d9574910f22eebd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.1

Release files / napi_py-0.1.7-py3-none-any.whl

Download URL napi_py-0.1.7-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
283e3ed790ac2f369ec07d13b0ab1ba9d72edc090e9846ee21a1d006607bcafd
BLAKE2b-256 checksum
How to use checksums
0dc5f74be5e509c0c3280b6442dd79700cdec63a06bd40f571f12289133f897b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.1

Release history Release notifications | RSS feed

1.2.4

2 release files

1.2.3

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page