All Projects → Ben-Kerman → immersive

Ben-Kerman / immersive

Licence: GPL-3.0 license
Language learning mpv script for looking up words within mpv and generating Anki cards

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to immersive

mpvacious
Adds mpv keybindings to create Anki cards from movies and TV shows.
Stars: ✭ 286 (+565.12%)
Mutual labels:  mpv, language-learning, subtitles, anki, mpv-script, yomichan
mpv-sub-scripts
Two mpv scripts for automatically pausing after each subtitle line and skipping intervals between subtitles.
Stars: ✭ 46 (+6.98%)
Mutual labels:  language-learning, subtitles, mpv-script
Game2Text
Complete toolbox for gamifying language learning
Stars: ✭ 86 (+100%)
Mutual labels:  language-learning, anki, yomichan
cfg
my dotfiles
Stars: ✭ 26 (-39.53%)
Mutual labels:  mpv, mpv-script
mpv-ytdlautoformat
A simple mpv script to auto change ytdl-format for Youtube and Twitch
Stars: ✭ 30 (-30.23%)
Mutual labels:  mpv, mpv-script
mpv-scripts
A collection of scripts for mpv player
Stars: ✭ 138 (+220.93%)
Mutual labels:  mpv, mpv-script
mpv-youtube-download
A userscript for MPV that allows you to download youtube audio and video with one key press 💾
Stars: ✭ 16 (-62.79%)
Mutual labels:  mpv, mpv-script
videoclip
Easily create videoclips with mpv.
Stars: ✭ 49 (+13.95%)
Mutual labels:  mpv, mpv-script
mpv-repl
A graphical REPL for mpv input commands
Stars: ✭ 70 (+62.79%)
Mutual labels:  mpv, mpv-script
mpv crop script
A Lua script to take cropped screenshots in mpv, sans external dependencies
Stars: ✭ 77 (+79.07%)
Mutual labels:  mpv, mpv-script
mpv-osc-morden
Another mpv osc script
Stars: ✭ 149 (+246.51%)
Mutual labels:  mpv, mpv-script
mpv-gif-generator
Creates animated gifs using mpv hotkeys
Stars: ✭ 32 (-25.58%)
Mutual labels:  mpv, mpv-script
Dictionaries
One dictionary to rule them all -- a browser extension to help you learn languages
Stars: ✭ 134 (+211.63%)
Mutual labels:  dictionaries, anki
Yomichan
Japanese pop-up dictionary extension for Chrome and Firefox.
Stars: ✭ 464 (+979.07%)
Mutual labels:  dictionaries, anki
Intersubs
Interactive subtitles for mpv. Instantly translate selected word/sentence.
Stars: ✭ 111 (+158.14%)
Mutual labels:  mpv, subtitles
MPV lazy
🔄 mpv player 播放器折腾记录 windows conf ; 中文注释配置 快速帮助萌新入门 ; mpv-lazy 懒人包 win10 x64
Stars: ✭ 615 (+1330.23%)
Mutual labels:  mpv, mpv-script
vocage
A minimalistic spaced-repetion vocabulary trainer (flashcards) for the terminal
Stars: ✭ 68 (+58.14%)
Mutual labels:  language-learning, anki
jimaku-player
Use your own subtitles on VRV or Crunchyroll to learn Japanese!
Stars: ✭ 48 (+11.63%)
Mutual labels:  language-learning, subtitles
mpv-search-page
An in-window search page for mpv player
Stars: ✭ 32 (-25.58%)
Mutual labels:  mpv, mpv-script
ankimaker
Automatically generates Anki decks from many sources
Stars: ✭ 43 (+0%)
Mutual labels:  language-learning, anki

Immersive

Immersive is an mpv script for improving language immersion, with a special focus on sentence mining. It can automatically generate Anki cards with dictionary definitions of the target word, sentence audio clips, screenshots from the video, and pronunciation audio taken from Forvo. The script is highly configurable and supports many possible workflows.

This is a short video walking through the full process of creating a card with Immersive: https://youtu.be/FrTcu4ZO92w. It's possible to skip parts of the process if you don't need them.

Another demo that isn't artificially slowed down for the sake of being easier to follow: https://youtu.be/g1aPNkdGTUc

Requirements

Immersive supports all major desktop operating systems:

Linux Windows macOS required for & comments
mpv (0.33.0 or later)
Anki with AnkiConnect card export
curl web requests (Forvo, AnkiConnect). Already present by default on most systems. Part of Windows 10 since April 2018
socat - netcat (nc) background playback (sentence and Forvo audio preview). nc is included with macOS 10.13 and later.
xclip PowerShell - clipboard access, PowerShell is installed by default

Feature Overview

Fully Integrated Card Creation

The basic process for creating cards is as follows:

  1. Bring up the subtitle selection menu (a)
  2. Select the subtitles that should be on the card using a or the autoselect (toggle with A). If there are no subtitles or if they are badly timed, set the start/end time for the audio export manually using Q and E. If you wish to take a screenshot at a specific time instead of the current frame, set it using s.
  3. Enter target word selection mode using d. Select the target word with (Ctrl+)+/ and confirm it using (+). It's possible to search for an external word from the clipboard using v if there are no text subtitles or if a word can't be found.
  4. Choose a definition from the dictionary entries with / and . Switch between dictionaries with / if you have more than one configured.
  5. Optionally add Forvo audio by pressing a after adding a target word.
  6. Export to Anki using f.

The card creation process is highly customizable. For further information read this.

Dictionary Lookup in mpv

You can look up words in your configured dictionaries at any time. Open the word selection menu by pressing k and search for the selection using (+).

Automatic Deinflection

Immersive supports automatic deinflection (deconjugation) based on the same tables that the Migaku Dictionary addon for Anki uses in addition to a simpler Japanese-specific deinflector. Read this page for details.

Subtitle Copying

Immersive can copy subtitles to the clipboard. Use c to manually copy the active line at any time, or toggle automatic copying with C. You can partially copy lines from the active line menu (k).

Installation & Setup

For a guide to getting started as quickly as possible see below.

Immersive can be installed by placing the contents of this repository in a folder within your mpv scripts directory (~/.config/mpv/scripts/ on Linux, %APPDATA%\mpv\scripts on Windows). This folder should be named immersive. Using any other name will mean that you will have to change the names of all config files to match it as well.

All necessary files can be downloaded as a ZIP file from the latest release. When installing Immersive from a release archive, it only needs to be extracted into the mpv config directory for the full release, or scripts directory for the script-only release. The immersive directory is already contained in the archive.

If you want the most up-to-date version possible, use the "Code" button at the top of the repo's start page. Simply extract the contents of the file into your mpv scripts folder and remove the branch name (most likely -master) from the name of the extracted directory.


The script is configured in several different files. These need to be placed in a directory called script-opts that is located next to your mpv.conf and scripts folder. For a description of the general config syntax, see this document. Except for immersive-dictionaries.conf all config files can be reloaded from the global menu (Ctrl+a) at runtime.

In order to use the main feature of generating Anki cards with included definitions, these config files need to be present:

The following config files are optional:

Documentation that is not about specific config files:

Updating

To update Immersive, delete the script's folder in your scripts directory and replace it with the one from the latest release's script-only ZIP file. Also check if there were any changes to config entries that you have used in the change log.

Quick Start Guide

  1. Make sure your mpv install is version 0.33.0 or later.
  2. Download the latest full release of Immersive from here.
  3. Unzip its contents into your mpv config directory. Make sure that you are not overwriting any existing config files.
  4. Open immersive-targets.conf in script-opts with a text editor of your choice (like Notepad++, Sublime Text or vim), and change the values of profile, deck, note_type, and the field: values so that they match your Anki setup.
  5. Open immersive-dictionaries.conf and set up your dictionaries as explained here. If you are learning Japanese and are using the Yomichan version of JMdict, you will most likely only have to change location so it is set to the path of a directory containing the unzipped contents of jmdict_english.zip from the Yomichan website.

Your mpv config directory should contain the following files at this point:

scripts/
    immersive/
        dict/
        interface/
        systems/
        utility/
        LICENSE
        main.lua
script-opts/
    immersive-dictionaries.conf
    immersive-series.conf
    immersive-style.conf
    immersive-targets.conf
    immersive.conf

You can now start mpv and open the main menu of Immersive using Ctrl+a or begin creating a card with a.

Troubleshooting

If Immersive crashes at any point (when this happens, the interface suddenly disappears and all keybindings stop working), open the console using ˋ/~, take a screenshot of it and report the issue to me. If you started mpv from the command line the output there is preferred.

Suggestions & Reporting Issues

If you have any suggestions for improving Immersive or encounter a problem while using it please contact me, even if that problem is not understanding parts of the documentation or how to do something with the script. Outside of GitHub you can reach me on the Refold community's discord servers.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].