mpv2oboeru

mpv helpers to create flashcards from movies and TV shows
git clone anongit@rnpnr.xyz:mpv2oboeru.git
Log | Files | Refs | Feed | README | LICENSE

Commit: fb8c4687c77d69585e8633462e76a95ea505d099
Parent: 9bfe06f8d3c450bc6d927e505be56cd3e653336f
Author: Ren Tatsumoto
Date:   Mon,  7 Sep 2020 01:43:58 +0300

use string.format to format media links

Diffstat:
Msubs2srs.lua | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subs2srs.lua b/subs2srs.lua @@ -427,8 +427,8 @@ ankiconnect.add_note = function(subtitle_string, audio_filename, snapshot_filena modelName = config.model_name, fields = { [config.sentence_field] = subtitle_string, - [config.audio_field] = '[sound:' .. audio_filename .. ']', - [config.image_field] = '<img src="' .. snapshot_filename .. '">' + [config.audio_field] = string.format('[sound:%s]', audio_filename), + [config.image_field] = string.format('<img src="%s" alt="snapshot">', snapshot_filename), }, options = { allowDuplicate = false,