AnkiKaji is a simple command-line tool for managing Japanese study cards with SQLite. It supports importing YAML data, exporting to CSV, and automatic preprocessing (furigana via autoruby).
β¨ Features
π₯ Import YAML into SQLite (cards.yaml)
π€ Export CSV of unexported cards
π Upsert logic (insert or update on conflict)
π· Flexible schema defined in jp-template.yaml
π Automatic annotation (furigana with autoruby)
-
Build cargo build --release
-
Set environment variables \
export ANKIKAJI_DB=ankikaji.db
export ANKIKAJI_TABLE=cards-
Import YAML ./target/release/ankikaji import-yaml
This loads cards.yaml into your database. -
Export CSV ./target/release/ankikaji export-csv
This exports all unexported cards into export.csv and marks them as exported.
src/
βββ main.rs # CLI entrypoint (clap commands)
βββ db.rs # Database helpers (import/export, transactions)
βββ models.rs # Card metadata, schema, YAML parsing
- Define your card schema in jp-template.yaml
- Add new cards into cards.yaml
- Run ankikaji import-yaml
- Export to CSV for Anki with ankikaji export-csv