Mining from Anime¶
Anacreon mpv Script¶
This is the faster and more recent method to mine from Anime compatible with all systems. Thanks to using mpv it is also compatible with all video formats unlike a web player like Animebook. Making use of mpv scripting capabilities the script (made by Anacreon from the DJT thread) captures the entire context in the form of sentence, audio and screenshot and adds it to your Anki cards fully automatically. Here is a video demonstration:
- A mining deck set up with Yomichan (you can find a template deck you can use here).
- The mpv player.
mpv (get it here) is a free video player with great scripting capabilities.
- The script itself. The newest version can always be found here: https://mega.nz/folder/349ziIYT#gtEzi4UtnyDVr4_wJAvBlg
- A text hooking page and clipboard watcher (Chrome or Firefox) (also useful for visual novels).
Ensure Yomichan (and the clipboard plugin too) have access to file URLs otherwise Yomichan can't capture text from the text hooking page.
- After installing mpv move the script to the mpv script folder usually at:
C:/Users/Username/AppData/Roaming/mpv/scripts/(If it doesn't exist create it.)
You can reach the appdata folder by simply typing
%appdata%into the address bar or the search.
- Open the script in a text editor and adjust the values to fit your mining deck.
If you are using the template deck above and didn't edit the fields you can copy this to get the correct field information:
------------- User Config ------------- -- Set these to match your field names in Anki local FRONT_FIELD = "front" local SENTENCE_AUDIO_FIELD = "SentenceAudio" local SENTENCE_FIELD = "Sentence" local IMAGE_FIELD = "Picture"
Important: Don't forget to adjust the path information (
[[Anki2\User 1\collection.media]]) so it matches your Anki user name and links to a valid media folder. The script will not work if this folder is not correctly set.
Set your preferred options for the other settings as well. I like to confirm the audio is correct after capture so I would set
local AUTOPLAY_AUDIO = true but that is mere preference.
- Open the clipboard page and activate the clipboard inserter plugin by clicking on it.
It is advised to use the html page linked above (or here) as other pages may add symbols that break the script on certain browsers.
- Open your anime with mpv and Japanese subtitle.
The subtitles will appear on the html page and you can scan them with Yomichan.
- When there is a word you want to mine, create a card with Yomichan.
- Select the entire sentence/section you want to have as context on your card and copy it.
- Go back into the mpv window and press Ctrl + v
A notification should appear saying that the card got updated. The card should now be updated.
If something did not work try these things:
- Ensure both the fields and the path is correctly set.
- Try updating mpv if you are using an older version.
- Cards can't be updated while selected in the card browser. Exit the card browser and try again.
Animebook is a web video player that display subtitles next to the video played. The advantage is that you can look up the subtitles directly on the video with Yomichan and that they are displayed next to the video so you don't have to alt tab, but less video formats are supported and capturing audio takes longer requiring you to manually capture it with ShareX. Use whatever you prefer or works for you.
- For a full overview of video compatibility see here: https://github.com/animebook/animebook.github.io#video-format-support
- If you don't know how to record audio or take screenshots with ShareX yet see the ShareX setup section.
- If you don't have Yomichan setup yet with a mined card format see the Yomichan setup section.
- Mine a word using Yomichan
- Copy the sentence and paste it into the sentence field
- Use the sidebar and click on where you would like to start capturing the audio from
- Record the audio using ShareX and paste it into the audio field
- Take a screenshot with ShareX and paste it into the screenshot field