Coder Social home page Coder Social logo

jasubs's Introduction

jaSubs


A "fork" of InterSubs, but for Japanese only.

Interactive subtitles for mpv, that was made to help study Japanese.
Easily tweaked and customizable.

NOTE: This project is unstable as for now and has some bugs

showcase

  • Supported dictionaries for words:
    • Jisho
    • Google
    • Offline \t separated dictionary. (Like the one provided jp.dict)
  • Supported dictionaries for sentences:
  • Can use multiple dictionaries simultaneously.
  • Reassigning mouse buttons functions in config.
  • Doesn't work with DVD (picture based) subtitles, only the text-based ones.
    • Script to convert picture based subtitles into *.srt; also extracts them from *.mkv

Installation


Clone this repository in your mpv scripts folder:

$ cd ~/.config/mpv/scripts
$ git clone https://github.com/HasanAbbadi/jaSubs
$ ls -a
. .. jaSubs

Requirements


  • mpv 0.27 (I don't know if it will work with mpv front-ends.)
  • Xorg (ignore for Mac users)
  • composite manager; xcompmgr or picom. (ignore for Mac users)
  • python => 3.6
  • python-pyqt5
  • python-numpy
  • python-requests
  • sudachipy and sudachidict_core (likely installed with pip)
  • lua
  • socat
  • pkill
  • xdotool (for hiding subtitles when minimizing mpv or switching window)

Usage


  • Start video with mpv & select subtitles.
  • F3 to start/stop jaSubs.
    • Starts automatically with files/paths specified in jaSubs.lua
  • Point cursor over the word to get popup with translation.
  • F6 to hide/show without exiting.
Buttons bellow may be reassigned in jaSubs_config.py

  • Left-click - show translation in your browser.
  • Right-click - translate whole sentence
  • Wheel+Ctrl - resize subtitles.
  • Wheel+Shift - change subtitles' vertical position.
  • Wheel-click - cycle through auto_pause options.
  • Wheel-click-left/right - +/- auto_pause_min_words. (fancy mouses)

Notes

  • Issues and Pull Request are highly appreciated

jasubs's People

Contributors

hasanabbadi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.