Setting up Yomitan
-
Make a note type for the cards, such as:
-
Make the deck’s file, such as
cards/Japanese/Vocabulary.md. It can be empty; Yomitan lists it asJapanese::Vocabulary. -
In Yomitan’s settings, under Anki, turn on Enable Anki integration. The
server is
http://127.0.0.1:8765, as for Anki. -
Under Configure Anki flashcards, choose the deck and the note type, then fill in
its fields, such as
{expression}for Word,{furigana}for Reading,{glossary}for Meaning,{audio}for Audio and{sentence}for Sentence.
media folder. View added note opens that file.
How Anki’s ideas map onto Amgi
- Decks are files:
Japanese::Vocabularyiscards/Japanese/Vocabulary.md, which is made if it doesn’t exist. Decks with no cards yet are listed too. - Note types are the files in
note-types.Basic, with Front and Back fields, makesQ:/A:cards, andCloze, with Text, makesC:cards from{{c1::…}}deletions. Its Back Extra field has to be left empty. - Fields arrive as HTML and are written as Markdown, as when
importing from Anki: bold, italics, lists and line breaks are kept, and
other formatting is dropped. Furigana from
<ruby>follows its word in brackets, as in 日本(にほん), since cards don’t show ruby yet. - Duplicates are found as in Anki, by a note’s first field, in the deck or the whole collection as Yomitan asks. Whatever Yomitan allows, Amgi doesn’t add a card whose front is already in the collection.
- Note ids come from the cards’ text, like Amgi’s own card ids, so a note found before its front field was edited isn’t found by its old id.
What isn’t supported
- Changing notes that are already added, as Yomitan’s overwrite option does. Edit the deck file instead.
- Media given as a web address rather than its contents. Yomitan sends the contents.
- Searches by date or review history, such as
added:1orrated:7. They answer with an error rather than nothing.
Other tools
Other tools that use AnkiConnect, such as asbplayer or mpvacious, can add cards the same way. Amgi answersaddNote, addNotes, canAddNotes, canAddNotesWithErrorDetail,
findNotes, findCards, notesInfo, cardsInfo, deckNames, modelNames,
modelFieldNames, storeMediaFile, retrieveMediaFile, suspend, unsuspend,
areSuspended, guiBrowse, guiEditNote, getTags, multi, version,
requestPermission and apiReflect.
Only this Mac can reach the server, and in a browser only extensions and pages on
localhost can use it; requests from other websites are refused. If Anki is open with
AnkiConnect, it holds the port: quit it, then turn the setting off and on again.