文档

Anki Batch Cards

试用

Batch add word cards to Anki via AnkiConnect. Supports Spanish-Chinese vocabulary cards with automatic translation and example sentences. Use when the user w...

它能做什么

Batch add word cards to Anki via AnkiConnect. Supports Spanish-Chinese vocabulary cards with automatic translation and example sentences. Use when the user wants to add multiple words to Anki at once, import vocabulary lists, or bulk-create flashcards.

技能文档

Anki Batch Cards

Batch-add vocabulary cards to Anki with translations and example sentences.

Requirements

  • Anki running with AnkiConnect plugin (code 2055492159)
  • Python 3

Quick Start

python3 scripts/batch_add.py words.txt --deck "综西单词::综西单词3" --model "西语"

Input Formats

Tab-separated: wordmeaningexample (optional)

despertarse	醒来	Me despierto a las siete.
acostarse	睡觉	Me acuesto tarde.

2. JSON

[
  {"word": "despertarse", "meaning": "醒来", "example": "Me despierto a las siete.", "tags": ["西语", "动词"]},
  {"word": "acostarse", "meaning": "睡觉", "example": "Me acuesto tarde.", "example_cn": "我很晚睡觉。"}
]

3. Plain text

One word per line (agent looks up translations automatically).

Options

FlagShortDefaultDescription
--deck-dDefaultTarget Anki deck
--model-m西语Note model in Anki
--field-word单词Word field name
--field-meaning简明释义Meaning field name
--field-example例句1Example field name
--tags-tauto-importComma-separated tags
--testDry run: parse & show without adding

Agent Workflow

  1. User provides a list of words/phrases
  2. Agent looks up translations and example sentences
  3. Agent creates a TSV or JSON file
  4. Agent runs batch_add.py with the file and target deck
  5. Agent reports results to user

Batch add with agent translation

When the user gives only words, the agent provides the translation and examples inline and builds the TSV file, then runs the script.

Decks and model discovery

List available decks:

python3 -c "import urllib.request, json; print(json.loads(urllib.request.urlopen(urllib.request.Request('http://127.0.0.1:8765', json.dumps({'action':'deckNames','version':6}).encode())).read())['result'])"

List model fields:

python3 -c "
import urllib.request, json
req = urllib.request.Request('http://127.0.0.1:8765', json.dumps({'action':'modelFieldNames','version':6,'params':{'modelName':'西语'}}).encode())
print(json.loads(urllib.request.urlopen(req).read())['result'])
"

Common Spanish model (西语) field structure

FieldContent
单词Spanish word / phrase
简明释义Chinese meaning
发音Pronunciation (optional)
额外释义Extra meanings / usage notes
例句1Spanish example sentence
例句2Chinese translation of example
例句3Additional example

相关技能

Convert any text — PDF excerpts, lecture notes, articles, textbook chapters — into spaced-repetition flashcards. Generates Anki-importable CSV with Q&A and cloze-deletion modes using regex-based extraction and sentence analysis.

Turn movies and TV shows into language-learning material by analyzing subtitle files to extract vocabulary, build frequency decks, and create contextual flashcards. Use when learning a language through media immersion.

Convert any learning material into Anki flashcards — Bloom's taxonomy powered card design

4 次安装

搭建与修复 Anki 牌组:制卡、FSRS 与 SM-2 参数、僵尸卡、导入、同步与考前容量计算。

58 次安装5 星标

Use when the user wants printable word / vocabulary flashcards for a young child (preschool / 5-year-old) as a Word (.docx) file — works for BOTH Chinese (hanzi / pinyin 认字卡) and English (simple words). e.g. '40 simple English words', '4 字 per page four corners', 'double-sided print', front = picture + big label, back = label only for recall/tracing. Builds cut-apart 2x2-grid flashcards with double-sided mirror alignment, emoji artwork, and a fully open-source ready, self-contained script set (Pillow + python-docx + Twemoji).

Turn user-supplied character lists into a four-to-eight still hanzi card set. This chinese character cards studio lays out each named character as its own still. Use it for recognition cards, hanzi flashcards, chinese character flashcards, and a character card pack.