Commit: 3690bd654545aa6a9583e9a6c4b0bed1394bd5b3
Parent: 507a678573b6c7466f341550a3702ee82ffcfd5a
Author: Ren Tatsumoto
Date: Fri, 30 Oct 2020 18:26:05 +0300
small changes
Diffstat:
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
@@ -15,6 +15,7 @@ while watching your favorite TV show.
[Video demonstration](https://youtu.be/vU85ramvyo4).
## Requirements
+
<table>
<tr>
<th><a href="https://www.gnu.org/gnu/about-gnu.html">GNU/Linux</a></th>
@@ -217,7 +218,7 @@ Ctrl+t script-binding toggle-sub-autocopy
### Global bindings
These bindings work everywhere, even if the menu (covered later) is closed.
-* `Shift+h` and `Shift+l` - Seek to the next or the previous subtitle.
+* `Shift+h` and `Shift+l` - Seek to the previous or the next subtitle.
* `Ctrl+h` - Seek to the start of the currently visible subtitle. Use it if you missed something.
* `Ctrl+e` - Export a card with the currently visible subtitle line on the front.
Use this when your subs are perfectly timed and the target sentence doesn't span multiple subs.
@@ -251,7 +252,7 @@ If above fails, you have to manually set timings.
Then, as earlier, press `n` to make the card.
-### How do I add definitions to the card I just made
+### How to add definitions to new cards
After the card is created, you can find it by typing ```tag:subs2srs added:1```
in the Anki Browser. Then use [qolibri](https://aur.archlinux.org/packages/qolibri/)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -52,7 +52,7 @@ local config = {
audio_field = "SentAudio",
image_field = "Image",
menu_font_size = 25,
- note_tag = "subs2srs",
+ note_tag = "subs2srs", -- the tag that is added to new notes. change to "" to disable tagging
tie_volumes = false, -- if set to true, the volume of the outputted audio file depends on the volume of the player at the time of export
}
@@ -86,7 +86,7 @@ function table.contains(table, element)
return false
end
-function table.max(table)
+function table.max_num(table)
local max = table[1]
for _, value in ipairs(table) do
if value > max then
@@ -652,7 +652,7 @@ ankiconnect.get_last_note_id = function()
local note_ids, _ = ankiconnect.parse_result(ret)
if not is_empty(note_ids) then
- return table.max(note_ids)
+ return table.max_num(note_ids)
else
return -1
end