diff options
| author | navewindre <boneyaard@gmail.com> | 2025-04-05 02:59:37 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2025-04-05 02:59:37 +0200 |
| commit | b24463f3d045783b8f4e72926054d53b908e150f (patch) | |
| tree | 036f976e217128b9e4acf3854f72908c27dec17b /config/mpv/scripts/subs2srsa/howto | |
| parent | 398e41be4daf339bd55862520c528a7d93b83fb6 (diff) | |
a
Diffstat (limited to 'config/mpv/scripts/subs2srsa/howto')
| -rw-r--r-- | config/mpv/scripts/subs2srsa/howto/add_dialog.md | 9 | ||||
| -rw-r--r-- | config/mpv/scripts/subs2srsa/howto/create_card.md | 14 | ||||
| -rw-r--r-- | config/mpv/scripts/subs2srsa/howto/create_quick_card.md | 31 | ||||
| -rw-r--r-- | config/mpv/scripts/subs2srsa/howto/flatpak.md | 27 | ||||
| -rw-r--r-- | config/mpv/scripts/subs2srsa/howto/goldendict.md | 45 | ||||
| -rw-r--r-- | config/mpv/scripts/subs2srsa/howto/yomichan.md | 24 |
6 files changed, 150 insertions, 0 deletions
diff --git a/config/mpv/scripts/subs2srsa/howto/add_dialog.md b/config/mpv/scripts/subs2srsa/howto/add_dialog.md new file mode 100644 index 0000000..22093c6 --- /dev/null +++ b/config/mpv/scripts/subs2srsa/howto/add_dialog.md @@ -0,0 +1,9 @@ +# Open the "Add" dialog + +1) Open a video in `mpv`. +1) Press <kbd>a</kbd> to open advanced menu. +1) Optionally, press <kbd>c</kbd> and select the desired subtitle lines with the interactive selection. +1) Press <kbd>g</kbd> to open the Add dialog in Anki. +1) Add dictionary definitions using software like GoldenDict, Qolibri, etc. + +After the card is created, you can find it by typing `added:1` in the Anki Browser. diff --git a/config/mpv/scripts/subs2srsa/howto/create_card.md b/config/mpv/scripts/subs2srsa/howto/create_card.md new file mode 100644 index 0000000..e92f77d --- /dev/null +++ b/config/mpv/scripts/subs2srsa/howto/create_card.md @@ -0,0 +1,14 @@ +# Make a simple sentence card + +To make a card from the currently visible subtitle line, press <kbd>Ctrl+n</kbd>. + +To make a card from two or more subtitle lines: + +1) Press <kbd>a</kbd> to open advanced menu. +2) Press <kbd>c</kbd> to start interactive selection. +3) Seek to the previous/next subtitle with <kbd>Shift+h</kbd> and <kbd>Shift+l</kbd>. +4) Press <kbd>n</kbd> to create a new card. + +After the card is created, you can find it by typing `added:1` in the Anki Browser. +The card doesn't contain dictionary definitions. +You need to add them yourself afterward, using software like GoldenDict, Qolibri, etc. diff --git a/config/mpv/scripts/subs2srsa/howto/create_quick_card.md b/config/mpv/scripts/subs2srsa/howto/create_quick_card.md new file mode 100644 index 0000000..619794a --- /dev/null +++ b/config/mpv/scripts/subs2srsa/howto/create_quick_card.md @@ -0,0 +1,31 @@ +# Quick Card Creation + +The goal of the quick card creation menu is to streamline a specific flow for media with **well-timed subtitles**: + +1) Add a new note to Anki via + [Rikaitan](https://tatsumoto.neocities.org/blog/setting-up-yomichan.html) + or any other tool that works with AnkiConnect. +2) Update the note via mpvacious. + +To update the most recently added card from the currently visible subtitle line, press <kbd>gg</kbd>. + +To make a card from two or more subtitle lines: + +1) Press <kbd>g</kbd> to open the quick card creation menu. +2) Press any number <kbd>[2-9]</kbd>. This number corresponds to the number of lines to create the card from. + +Note: <kbd>g1</kbd> is also valid. +However, <kbd>gg</kbd> is an additional bind to further streamline the most common scenario. + +For example, +<kbd>g2</kbd> creates a card using 2 subtitle lines. + +Like the advanced menu, you can also update multiple cards: + +1) Press <kbd>Alt+g</kbd> to select the number of cards for quick card creation. +2) Press any number <kbd>[2-9]</kbd>. This number corresponds to the number of cards to update. +3) Press any number <kbd>[1-9]</kbd> again. This is the number of lines. + +Note: upon completing the note update, the selected number of cards resets back to the default of one. + +For example, <kbd>(Alt+g)22</kbd> would update the last 2 notes using 2 subtitle lines. diff --git a/config/mpv/scripts/subs2srsa/howto/flatpak.md b/config/mpv/scripts/subs2srsa/howto/flatpak.md new file mode 100644 index 0000000..46a5787 --- /dev/null +++ b/config/mpv/scripts/subs2srsa/howto/flatpak.md @@ -0,0 +1,27 @@ +# Flatpak notes + +We think it's best to never use Flatpak. +Specifically, try not to use Flatpak to install `mpv` and `anki`. +Install packages from the official repositories of your distro or from the AUR. + +Read the following notes if you still decide to use Flatpak. + +Make these changes in Flatseal: + +* Enable "Filesystem > All system files" + so it could see `wl-copy`. + Unfortunately, there's no option to provide only a specific system file. +* Add `~/.var/app/net.ankiweb.Anki` to "Filesystem > Other Files" + so mpvacious could add encoded snapshots and audio to Anki. +* Add `PATH=/home/USERNAME/.local/bin:/home/USERNAME/bin:/app/bin:/usr/bin:/run/host/usr/bin` to "Environment > Variables". + There's no option to add a path to `PATH` in Flatseal, + so I opened container, + saved it's PATH and added `/run/host/usr/bin` + so mpvacuous could access `wl-copy`. +* Enable "Shared > Network". + It's enabled by default, but anyway. + +The mpv config root is `~/.var/app/io.mpv.Mpv/config/mpv` + +* `~/.var/app/io.mpv.Mpv/config/mpv/scripts` +* `~/.var/app/io.mpv.Mpv/config/mpv/script-opts` diff --git a/config/mpv/scripts/subs2srsa/howto/goldendict.md b/config/mpv/scripts/subs2srsa/howto/goldendict.md new file mode 100644 index 0000000..7f355c6 --- /dev/null +++ b/config/mpv/scripts/subs2srsa/howto/goldendict.md @@ -0,0 +1,45 @@ +# Modifying cards added with GoldenDict + +You can add a card first using GoldenDict, +and then append an audio clip and a picture to it. + +**Note:** the only version of GoldenDict that can create Anki cards with configurable fields is +[xiaoyifang's goldendict](https://github.com/xiaoyifang/goldendict-ng). +Read [Setting up GoldenDict](https://tatsumoto-ren.github.io/blog/setting-up-goldendict.html) and +[How to connect with Anki](https://github.com/xiaoyifang/goldendict-ng/blob/staged/website/docs/topic_anki.md) +if you are new to GoldenDict. + +To send subtitles from `mpv` directly to GoldenDict, +append the following line to `subs2srs.conf`: + +``` +autoclip_method=goldendict +``` + +**Note:** If `goldendict` is not in the PATH, +you have to [add it to the PATH](https://wiki.archlinux.org/title/Environment_variables#Per_user). + +1) Press <kbd>a</kbd> to open `advanced menu`. +2) Press <kbd>t</kbd> to toggle the `autoclip` option. + +Now as subtitles appear on the screen, +they will be immediately sent to GoldenDict instead of the system clipboard. + +1) Open GoldenDict. +2) Play a video in `mpv`. +3) When you find an unknown word, + select the definition text, + right-click and select "send word to anki" to make a card, + or press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd>. +4) Go back to mpv and add an image and an audio clip + to the card you've just made by pressing <kbd>m</kbd> while the `advanced menu` is open. + Pressing <kbd>Shift+m</kbd> will overwrite any existing data in media fields. + +https://github.com/Ajatt-Tools/mpvacious/assets/69171671/0fc02d24-d320-4d2c-b7a9-cb478e9f0067 + +Don't forget to set the right timings and join lines together +if the sentence is split between multiple subs. +To do it, enter interactive selection by pressing <kbd>c</kbd> +and seek to the next or previous subtitle. + +To pair Mecab and GoldenDict, install [gd-tools](https://github.com/Ajatt-Tools/gd-tools). diff --git a/config/mpv/scripts/subs2srsa/howto/yomichan.md b/config/mpv/scripts/subs2srsa/howto/yomichan.md new file mode 100644 index 0000000..9ea16d6 --- /dev/null +++ b/config/mpv/scripts/subs2srsa/howto/yomichan.md @@ -0,0 +1,24 @@ +# Modifying cards added with Rikaitan + +You can add a card first using +[Rikaitan](https://tatsumoto.neocities.org/blog/setting-up-yomichan.html), +and then append an audio clip and a picture to it. + +1) Press <kbd>a</kbd> to open `advanced menu`. +1) Press <kbd>t</kbd> to toggle the `autoclip` option. + +Now as subtitles appear on the screen, they will be immediately copied to the clipboard. +You can use it in combination with clipboard monitor. + +1) Open [Rikaitan Search](https://tatsumoto.neocities.org/blog/what-is-yomichan-search) + by pressing <kbd>Alt+Insert</kbd> in your web browser. +1) Play a video in `mpv`. +1) When you find an unknown word, click the <kbd>+</kbd> button to make a card for it. +4) Go back to mpv and add an image and an audio clip + to the card you've just made by pressing <kbd>m</kbd> while the `advanced menu` is open. + Pressing <kbd>Shift+m</kbd> will overwrite any existing data in media fields. + +Don't forget to set the right timings and join lines together +if the sentence is split between multiple subs. +To do it, enter interactive selection by pressing <kbd>c</kbd> +and seek to the next or previous subtitle. |
