Skip to main content

napi-py PyPI - Python Version CI

CLI tool for downloading subtitles from napiprojekt.pl, fork of 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

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

Release files for napi-py 1.2.4

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 1.2.4
File Size Uploaded
napi_py-1.2.4.tar.gz 17.0 kB Details

Built distribution (wheel)

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

Total release size: 35.9 kB

Release files / napi_py-1.2.4.tar.gz

Download URL napi_py-1.2.4.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d278cd4a716f00ce1719d1963a6c53224e7ab87f4c5d43eee8e348f65c6f9c2a
BLAKE2b-256 checksum
How to use checksums
16c8da6cdc6afdcdfcdb78626972a3ee6e099587505ca309dbb56255fbd561b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1025-azure

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

Download URL napi_py-1.2.4-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24fa54bb2617b5c6cccaf7b0870795ac9be79c6072fe5f51fe096a0a22b6aa9f
BLAKE2b-256 checksum
How to use checksums
840c5b34434a6ce2b80ee98b4e38cef9147405acbd5a128017c9d13e2b63fcb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1025-azure

Release history Release notifications | RSS feed

This release

1.2.4 This release

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

0.1.7

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