Commit: f5ff6dbdfc87802b63865484656ffd19727f0fe5
Parent: 7123b4937cbd337a6cfd63a8b6c7975ef31e6c62
Author: Ren Tatsumoto
Date: Tue, 4 Aug 2020 03:56:39 +0300
configuration
Diffstat:
| M | README.md | | | 34 | +++++++++++++++++++++++++++++++++- |
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
@@ -4,8 +4,9 @@
## Installation
1. Obtain the script
+
If you already have your dotfiles set up according to
-[Arch Wiki recommendations](https://wiki.archlinux.org/index.php/Dotfiles#Tracking_dotfiles_directly_with_Git), execute
+[Arch Wiki recommendations](https://wiki.archlinux.org/index.php/Dotfiles#Tracking_dotfiles_directly_with_Git), execute:
```
config submodule add 'git@github.com:Ajatt-Tools/mpvacious.git' ~/.config/mpv/scripts/subs2srs
@@ -25,3 +26,34 @@ local mpv_scripts_dir_path = os.getenv("HOME") .. "/.config/mpv/scripts/"
function load(relative_path) dofile(mpv_scripts_dir_path .. relative_path) end
load("subs2srs/subs2srs.lua")
```
+
+## Configuration
+
+Configuration file is located at ```~/.config/mpv/script-opts/subs2srs.conf```
+and should be created by the user.
+
+Available options:
+
+| Name | Default value | Description |
+| --- | --- | --- |
+| `collection_path` | | Path to the `collection.media` folder. Trailing slash is necessary. |
+| `autoclip` | `false` | when mpv starts, automatically copy subs to the clipboard as they appear on screen. |
+| `nuke_spaces` | `true` | remove all spaces from the subtitle text. only makes sense for languages without spaces like japanese. |
+| `human_readable_time` | `true` | format timestamps according to this pattern: `%dh%02dm%02ds%03dms`. otherwise use seconds. |
+| `snapshot_quality` | `5` | 0 = lowest, 100=highest |
+| `snapshot_width` | `-2` | a positive integer. if either (but not both) of the width or height parameters is -2, the value will be calculated preserving the aspect-ratio. |
+| `snapshot_height` | `200` | same as `snapshot_width`. |
+| `audio_bitrate` | `18k` | Sane values are from 16k to 32k. |
+| `deck_name` | `Learning` | The deck will be created if it doesn't exist. |
+| `model_name` | `Japanese sentences` | Model names are listed in `Tools -> Manage note types` menu in Anki. |
+| `sentence_field` | `SentKanji` | |
+| `audio_field` | `SentAudio` | |
+| `image_field` | `Image` | |
+
+Example configuration file:
+
+```
+collection_path=/home/user/.local/share/Anki2/user/collection.media/
+deck_name=sub2srs
+sentence_field=Expression
+```