Skip to main content

A command-line tool for downloading Japanese subtitles from Jimaku

Project description

Jimaku-DL

AUR License GitHub Release AUR Last Modified codecov

A tool for downloading Japanese subtitles for anime from Jimaku

Jimaku-DL Demo

Features

  • Download subtitles from Jimaku.cc
  • Automatic subtitle synchronization with video (requires ffsubsync)
  • Playback with MPV player and Japanese audio track selection
  • On-screen notification when subtitle synchronization is complete
  • Background synchronization during playback
  • Cross-platform support (Windows, macOS, Linux)
  • Smart filename and directory parsing for anime detection
  • Cache AniList IDs for faster repeat usage
  • Interactive subtitle selection with fzf

Installation

pip install jimaku-dl

Requirements

  • Python 3.8+
  • fzf for interactive selection menus (required)
  • MPV for video playback (optional)
  • ffsubsync for subtitle synchronization (optional)

Usage

# Basic usage - Download subtitles for a video file
jimaku-dl /path/to/your/anime.mkv

# Download subtitles and play video immediately
jimaku-dl /path/to/your/anime.mkv --play

# Download, play, and synchronize subtitles in background
jimaku-dl /path/to/your/anime.mkv --play --sync

# Download subtitles for all episodes in a directory
jimaku-dl /path/to/your/anime/season-1/

# Specify custom destination directory
jimaku-dl /path/to/your/anime.mkv --dest-dir /path/to/subtitles

API Token

You'll need a Jimaku API token to use this tool. Set it using one of these methods:

  1. Command line option:

    jimaku-dl /path/to/anime.mkv --token YOUR_TOKEN_HERE
    
  2. Environment variable:

    export JIMAKU_API_TOKEN="your-token-here"
    jimaku-dl /path/to/anime.mkv
    

Command-Line Options

usage: jimaku-dl [options] MEDIA_PATH

positional arguments:
  MEDIA_PATH            Path to media file or directory

options:
  -h, --help            Show this help message and exit
  -v, --version         Show program's version number and exit
  -t TOKEN, --token TOKEN
                        Jimaku API token (can also use JIMAKU_API_TOKEN env var)
  -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Set logging level
  -d DEST_DIR, --dest-dir DEST_DIR
                        Destination directory for subtitles
  -p, --play           Play media with MPV after download
  -a ANILIST_ID, --anilist-id ANILIST_ID
                        AniList ID (skip search)
  -s, --sync           Sync subtitles with video in background when playing

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:

  1. Clone the repository:

    git clone https://github.com/yourusername/jimaku-dl.git
    cd jimaku-dl
    
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
    
  3. Install the dependencies:

    pip install -r requirements.txt
    pip install -r requirements_dev.txt
    
  4. Run the tests:

    pytest
    

License

Jimaku Downloader is licensed under the GPLv3 License. See the LICENSE file for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jimaku_dl-0.1.3.tar.gz (60.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jimaku_dl-0.1.3-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file jimaku_dl-0.1.3.tar.gz.

File metadata

  • Download URL: jimaku_dl-0.1.3.tar.gz
  • Upload date:
  • Size: 60.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jimaku_dl-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1bd230ef10893d49fa720fa7423de44f18c25d751d540c62e159f3caecd4e451
MD5 d2d4eb104290a44ce6a1414565e5077e
BLAKE2b-256 08c280955fd81630f3439017dcccd4df3ba350af799fe08ce01559dffaf19892

See more details on using hashes here.

File details

Details for the file jimaku_dl-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: jimaku_dl-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for jimaku_dl-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ffaee2bc495c479dce9934b1f01f60a8adad7733f187559b997aae8c90ff8787
MD5 62af190f76d647534d1fc3d84f8e679f
BLAKE2b-256 bd7e88d7f66d2cee0f5afdc332436ddfa1a307bb14f0ef0901eaf3c30129a0e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page