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 or later
7zavailable on PATH
installation
sudo pip install napi-pyfor 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.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 96edd6537d9852a51cbdd5b64fee9194
- open the movie web page on
development
make configinstallsvenvunder.venv/napi-pymake 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.1.6.tar.gz
(5.9 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.1.6-py3-none-any.whl
(19.1 kB
view details)
File details
Details for the file napi-py-0.1.6.tar.gz.
File metadata
- Download URL: napi-py-0.1.6.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d0c93392e63e756fb192e89c26f59e67def5614da3bf54aa9270199ed658247
|
|
| MD5 |
07537cc78d26d6fcc29e799fc64ad89c
|
|
| BLAKE2b-256 |
cc04e58ce61a461d447fbce8697c9ea28f1b97941382fc75d25531fd42761497
|
File details
Details for the file napi_py-0.1.6-py3-none-any.whl.
File metadata
- Download URL: napi_py-0.1.6-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2a24e03f69844a1671d245f1b0ed6afd187cafe7afb4b49a7c715932f0d73ff
|
|
| MD5 |
813260c15faafdff15175cc141225512
|
|
| BLAKE2b-256 |
9f21ff06b35c1d9d858538e933ebf73a3bdbedc22e880e96d59f8b215564ae5a
|