Some checks failed
Tests / test (macos-latest, 3.10) (push) Waiting to run
Tests / test (macos-latest, 3.8) (push) Waiting to run
Tests / test (macos-latest, 3.9) (push) Waiting to run
Tests / test (ubuntu-latest, 3.9) (push) Waiting to run
Tests / test (windows-latest, 3.10) (push) Waiting to run
Tests / test (windows-latest, 3.8) (push) Waiting to run
Tests / test (windows-latest, 3.9) (push) Waiting to run
Tests / test (ubuntu-latest, 3.8) (push) Has been cancelled
Tests / test (ubuntu-latest, 3.10) (push) Has been cancelled
Jimaku Downloader
Features
- Queries AniList for anime titles
- Select subtitle entries from Jimaku
- Download subtitles to a specified directory
- Launch MPV with the downloaded subtitles
- Supports both file and directory inputs
- Support for downloading multiple subtitle files
Installation
You can install Jimaku Downloader using pip
pip install jimaku-dl
Arch Linux
Arch Linux users can install python-jimaku-dl from the AUR
paru -S python-jimaku-dl
# or
yay -S python-jimaku-dl
Usage
Command Line Interface
The main entry point for Jimaku Downloader is the jimaku-dl
command. Here are some examples of how to use it:
# Download subtitles for a single video file
jimaku-dl /path/to/video.mkv
# Download subtitles for a directory
jimaku-dl /path/to/anime/directory
# Specify a custom destination directory
jimaku-dl /path/to/video.mkv --dest /custom/path
# Launch MPV with the downloaded subtitles
jimaku-dl /path/to/video.mkv --play
# Specify an AniList ID directly
jimaku-dl /path/to/video.mkv --anilist-id 123456
# Set the Jimaku API token
jimaku-dl /path/to/video.mkv --token your_api_token
# Set the logging level
jimaku-dl /path/to/video.mkv --log-level DEBUG
Python API
You can also use Jimaku Downloader as a Python library:
from jimaku_dl.downloader import JimakuDownloader
downloader = JimakuDownloader(api_token="your_api_token", log_level="INFO")
downloaded_files = downloader.download_subtitles("/path/to/video.mkv", dest_dir="/custom/path", play=True)
print(f"Downloaded files: {downloaded_files}")
File Naming
Jimaku Downloader supports various file naming conventions to extract show title, season, and episode information. It is recommended to follow the Trash Guides recommended naming schema for best results.
Examples
Show Title - S01E02 - Episode Name [1080p].mkv
Show.Name.S01E02.1080p.mkv
Show_Name_S01E02_HEVC.mkv
/path/to/Show Name/Season-1/Show Name - 02 [1080p].mkv
Development
To contribute to Jimaku Downloader, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/jimaku-dl.git cd jimaku-dl
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt pip install -r requirements_dev.txt
-
Run the tests:
pytest
License
Jimaku Downloader is licensed under the GPLv3 License. See the LICENSE file for more information.
Languages
Python
100%