add immersive

This commit is contained in:
ksyasuda 2025-03-04 02:25:17 -08:00
parent f596071c87
commit 6e64e0c70f
No known key found for this signature in database
9 changed files with 455 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
immersive-data

3
.gitmodules vendored
View File

@ -16,3 +16,6 @@
[submodule "scripts/autosubsync-mpv"] [submodule "scripts/autosubsync-mpv"]
path = scripts/autosubsync-mpv path = scripts/autosubsync-mpv
url = git@github.com:Ajatt-Tools/autosubsync-mpv.git url = git@github.com:Ajatt-Tools/autosubsync-mpv.git
[submodule "scripts/immersive"]
path = scripts/immersive
url = git@github.com:Ben-Kerman/immersive.git

View File

@ -0,0 +1,70 @@
# this line is here so the file is encoded as
# do not delete it unless you know what that means
# example dictionary config for JMdict
[JMdict]
location=/home/sudacode/Documents/jmdict
type=yomichan
# Only the two entries above are strictly required for each dictionary.
# optional entries:
# cf. doc/lookup-transformations.md, empty by default:
#transformations=deinflect-japanese,deinflect-migaku(ja.json),kana
# cf. doc/dictionaries.md for details
#preload=<...>
#insert_cjk_breaks=no
#exporter=default
#quick_def_template={{readings:::・}}{{variants:【:】:・}}: {{definitions:::; }}
#export:digits=<...>
#export:reading_template={{reading}}{{variants:【:】:・}}
#export:definition_template={{tags:<span style="font-size\: 0.8em">:</span><br>:, }}{{num}}. {{keywords:::; }}
#export:template={{readings[1]}}:{{readings[2:] (:): }}<br>{{definitions:::<br>}}
#export:use_single_template=yes
#export:single_template={{readings[1]}}:{{readings[2:] (:): }} {{keywords:::; }}
# --------------------
# example config for Daijirin, probably usable for any EPWING exported by
# yomichan-import
# also set 'definition_substitutions=\<br><\n' in your target config
# to add HTML line breaks to the definition
#[大辞林]
#location=<set to dictionary directory>
#type=yomichan
# to make text more readable in mpv
#insert_cjk_breaks=yes
# there is only one definition for EPWINGs exported to Yomichan
# and it already includes the word
#quick_def_template={{definitions}}
# same as for quick_def_template
#export:definition_template={{keywords}}
#export:template={{definitions}}
# these aren't needed since the reading and word are already in the definition
#export:reading_template=
#export:use_single_template=no
# --------------------
# example config for a Migaku dictionary
#[Migaku Dictionary]
#location=<set to path to dictionary JSON file>
#type=migaku
#exporter=default
#quick_def_template={{definitions}}
#export:template=[[
#{{terms[1]}}{{terms[2:] (:):, }}:<br>
#{{altterms::<br>:, }}{{pronunciations::<br>:, }}{{positions::<br>:, }}
#{{definition}}
#{{examples:::, }}
#]]

View File

@ -0,0 +1,4 @@
open_global_menu=ctrl+i
show_dict_target=ctrl+I
export_active_line_instant=ctrl+e
export_active_line_menua=ctrl+E

View File

@ -0,0 +1,12 @@
# this line is here so the file is encoded as
# do not delete it unless you know what that means
## streamed video; something similar should work for any platform youtube-dl supports
#[youtube]
#title={{media_title}}
#keywords=youtu be
#
## local video file
#[kaguya-sama]
#title=かぐや様は告らせたい
#keywords=kaguya sama kokurasetai

View File

@ -0,0 +1,143 @@
# this line is here so the file is encoded as
# do not delete it unless you know what that means
# Global entries serve as the basis for all other styles.
#align =5
#bold =<from mpv property 'osd-bold'>
#italic =<from mpv property 'osd-italic'>
#underline =no
#strikeout =no
#border =<from mpv property 'osd-border-size'>
#border_x =<from mpv property 'osd-border-size'>
#border_y =<from mpv property 'osd-border-size'>
#shadow =<from mpv property 'osd-shadow-offset'>
#shadow_x =<from mpv property 'osd-shadow-offset'>
#shadow_y =<from mpv property 'osd-shadow-offset'>
#blur =<from mpv property 'osd-blur'>
#font_name =<from mpv property 'osd-font'>
#font_size =30
#letter_spacing =<from mpv property 'osd-spacing'>
#primary_color =<from mpv property 'osd-color'>
#secondary_color =808080
#border_color =<from mpv property 'osd-border-color'>
#shadow_color =<from mpv property 'osd-shadow-color'>
#all_alpha =FF
#primary_alpha =<from mpv property 'osd-color'>
#secondary_alpha =00
#border_alpha =<from mpv property 'osd-border-color'>
#shadow_alpha =<from mpv property 'osd-shadow-color'>
# --------------------
# message log at the top right
#[messages]
#align=9
#[messages/fatal]
#bold=yes
#primary_color=5791F9
#[messages/error]
#primary_color=7A77F2
#[messages/warn]
#primary_color=66CCFF
#[messages/info]
# none
#[messages/verbose]
#primary_color=99CC99
#[messages/debug]
#primary_color=A09F93
#[messages/trace]
# none
# --------------------
# menu help ("Press h to show key bindings")
#[menu_help]
#align=7
# key bindings
#[menu_help/key]
#bold=yes
# top line of the menu help
#[menu_help/hint]
#italic=yes
# --------------------
# menu info (timings, active target, etc.)
#[menu_info]
#align=1
# description of an info item
#[menu_info/key]
#bold=yes
# unset/unknown/automatically generated values
#[menu_info/unset]
#italic=yes
# --------------------
# line selection
#[line_select]
# none
# actively selected line
#[line_select/selection]
#bold=yes
#primary_color=FFD0D0
# --------------------
# text selection
# applied on top of line_select during target selection
#[text_select]
# none
# selected text
#[text_select/selection]
#primary_color=FF8080
# --------------------
# Forvo audio selection
# applied on top of line_select
#[word_audio_select]
# none
# pronunciations that have not been loaded yet
#[word_audio_select/unloaded]
#primary_color=808080
# pronunciations that are currently loading
#[word_audio_select/loading]
#primary_color=8080FF
# pronunciations that are ready to play
#[word_audio_select/loaded]
# none
# --------------------
# overlay of selected subtitles during subtitle selection
#[selection_overlay]
#align=3
# --------------------
# overlay shown when Immersive is blocked, e.g. while importing dictionaries
#[info_overlay]
#align=1
# overlay for hiding the video during and after target selection
#[blackout]
#primary_color=<from mpv property 'background'>
#primary_alpha=<from mpv property 'background'>

View File

@ -0,0 +1,139 @@
# this line is here so the file is encoded as
# do not delete it unless you know what that means
[target name]
# Anki profile the target will use
# Can be taken from the window title of the main Anki window or from the profile
# menu (Ctrl+Shift+P in Anki)
profile=sudacode
# Anki deck the target will use
# Subdecks use the same syntax as in Anki itself
# e.g. Root::Subdeck::Subsubdeck
deck=Craft
# note type the target will use
note_type=Lapis
# --------------------
# example field definitions
# uncomment (remove the #) and change so they fit your note type
# Anki field names go between 'field:' and '=', exactly as they are
# in Anki, including spaces.
# Template variables come after the '=', like in the examples.
#field:Front={{sentences}}
#field:Back={{definitions}}
#field:Word={{words[1]}}
#field:Words={{words::: }}
#field:Audio={{audio}}
#field:Word Audio={{word_audio}}
#field:Image={{image}}
field:ExpressionAudio={{audio}}
field:Picture={{image}}
field:MiscInfo={{series_title}}
# Everything below this line has default values and is not required.
# It is recommended to change image/max_width or image/max_height in order to
# reduce file sizes, however.
# --------------------
# how export data will be added to existing notes
# allowed values: 'append', 'prepend', 'overwrite'
# overwrite replaces fields (but cf. template variable {{prev_content}})
add_mode=append
# template used for formatting notes within mpv
# when selecting which existing note to export to
#note_template={{type}}: {{id}}
# Anki media dir override, optional and normally derived from system default
# Must be an absolute path to the directory that encoded images/audio clips
# should be placed in (i.e., to collection.media).
#media_directory=<unset>
# space-separated list of tags that will be added to exported notes
#tags=immersive
# can be set dynamically using field template variables, e.g.:
#tags={{series_id}}
# --------------------
# substitutions to apply to the {{sentences}} variable
# for more information, see doc/card-export.md
#sentence_substitutions=[[
#<.-%
#<(.-%)
#]]
# same as sentence_substitutions but for {{definitions}}
#definition_substitutions=
# --------------------
# audio clip file extension
# unrelated to the format used, but should match it (especially on Windows)
#audio/extension=mka
# audio container format
# e.g. 'matroska' (MKV/MKA), 'ogg', 'mp3'
#audio/format=matroska
# audio codec
# e.g. 'libopus' (NOT 'opus'), 'aac', 'vorbis', 'libmp3lame' (MP3)
#audio/codec=libopus
# audio bitrate
# Uses the same syntax as mpv/ffmpeg bitrates.
# Sensible values are 32ki-64ki for libopus and 128ki for AAC and MP3.
#audio/bitrate=48ki
# how many seconds of padding to include before the start of audio clips
#audio/pad_start=0.1
# same as above, but after the end of the clip
#audio/pad_end=0.1
# --------------------
# image file extension
#image/extension=webp
# image codec
# supported values are 'mjpeg' (JPG), 'libwebp' (WebP), and 'png'
# Technically, any codec that works with ffmpeg's image2 format can be used.
#image/codec=libwebp
# maximum image width/height
# If one option is set to a negative value aspect ratio will be preserved.
# If both are negative the video's resolution will be used.
#image/max_width=-1
#image/max_height=-1
# quality of JPG (mjpeg) images
# valid range: 1-69
# lower is better (but files will be larger)
# Values above 5-10 result in noticeable artifacting.
#image/jpeg/qscale=5
# whether to use lossless compression for WebP
#image/webp/lossless=no
# libwebp quality factor
# valid range: 0-100
# higher is better
#image/webp/quality=90
# libwebp compression level
# valid range: 0-6
# Higher values result in better compression but take longer to encode.
#image/webp/compression=4
# PNG compression level
# valid range: 0-9
# higher is better
#image/png/compression=9

View File

@ -0,0 +1,82 @@
# this line is here so the file is encoded as
# do not delete it unless you know what that means
# the mpv executable to use for audio previews and encoding
# if unset (default), the executable of the current process will be used
#mpv_executable=<...>
# if set to 'yes', load dictionaries when mpv starts
preload_dictionaries=no
# show the dictionary loading overlay when loading dicts at startup
startup_dict_overlay=yes
# maximum number of target words per card
# set to 0 to disable limit
#max_targets=1
# always show minutes when displaying times,
# even if playback has not reached 01:00 yet
#always_show_minutes=yes
# black out the screen during and after target selection
#target_select_blackout=yes
# black out the screen when looking up words from the active subtitle
#active_sub_blackout=yes
# language code to use when searching Forvo audio
#forvo_language=ja
# Automatically load Forvo audio instead of waiting until attempting to play it.
#forvo_preload_audio=no
# download mp3 files from Forvo instead of Ogg/Vorbis
#forvo_prefer_mp3=no
# prefix for Forvo filenames in the Anki media directory
# Files will be named '<prefix>-<word>.<extension>'.
#forvo_prefix=word_audio
# reencode Forvo audio files since they are unnecessarily large
#forvo_reencode=yes
# Forvo audio encoding options
# These behave like the corresponding options in target configs.
#forvo_extension=mka
#forvo_format=matroska
#forvo_codec=libopus
#forvo_bitrate=64ki
# AnkiConnect host and port
#ankiconnect_host=localhost
#ankiconnect_port=8765
# Windows clipboard copy mode
# "exact" takes longer (200ms-1s), but preserves the text exactly,
# i.e. it also copies line breaks.
# "quick" is much faster (<50ms), but might not copy the text
# with 100% accuracy. This method sometimes causes encoding issues
# and is known to sporadically copy corrupted text.
#windows_copy_mode=exact
# enable automatic subtitle copying by default
#enable_autocopy=no
# make subtitle autoselect toggle global instead of
# being tied to each subtitle select menu
#global_autoselect=yes
# enable subtitle autoselect by default
#enable_autoselect=yes
# same as above but for the menu help toggle
#global_help=yes
#enable_help=no
# enable screenshots by default
#take_screenshots=yes
# Hide the menu info at the bottom left if the help overlay is active.
# Useful if the two collide due to large font sizes.
#hide_infos_if_help_active=no

1
scripts/immersive Submodule

@ -0,0 +1 @@
Subproject commit 9bde59a0abaa018096de5b6f38c3ad409b9cfdf1