CLI tool for downloading subtitles from napiprojekt.pl
Project description
napi-py

CLI tool for downloading subtitles from napiprojekt.pl, fork of gabrys/napi.py
prerequisites
- Python 3.6.2 or newer
- on Linux,
python3-devpackage:- for Debian-based systems, use
sudo apt-get install python3-dev
- for Debian-based systems, use
installation
pip install napi-pyfor user-wide installation
usage as CLI tool
napi-py ~/Downloads/MyMovie.mp4will 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.plin 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 YOURHASHin this tool, i.e.--hash 96edd6537d9852a51cbdd5b64fee9194or--hash napiprojekt:96edd6537d9852a51cbdd5b64fee9194
- open the movie web page on
development
make installinstalls poetry virtualenvmake testruns testsmake buildcreates installable package
Project details
Release history Release notifications | RSS feed
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.0.tar.gz
(17.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
napi_py-0.2.0-py3-none-any.whl
(19.0 kB
view details)
File details
Details for the file napi-py-0.2.0.tar.gz.
File metadata
- Download URL: napi-py-0.2.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f178e20e6f7432e916ac0ae604c0ad6df5db63357e230ca3adcb03244bf0076
|
|
| MD5 |
931bc5359f2fbc067beb33b21f3c80c7
|
|
| BLAKE2b-256 |
d09b8b5f3796fefbf2443f8a4148ce73de4dbafde49468fb9e8468c2c6263b07
|
File details
Details for the file napi_py-0.2.0-py3-none-any.whl.
File metadata
- Download URL: napi_py-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.5 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7524f135f6cbc741c68f4ff27529092842ff94cbef906154e881e973bf4ef99
|
|
| MD5 |
26c1638dd97ff1caee638a5b6b501ac3
|
|
| BLAKE2b-256 |
75b5f97fc37c77c4245bc1f68cd8b05b0c9ff240443779f108d88461b2ac21ce
|