Skip to main content

Automated Japanese vocabulary mining from media with Anki integration

Project description

Anki Miner

PyPI version Python 3.11+ License: GPL v3 GitHub downloads GitHub stars Discord community

Turn native Japanese content into Anki vocabulary cards.

Please leave a ⭐ star if Anki Miner helped you - it helps others find it :).

Mining Demo

Anki Miner Showcase

⬇️ Full demo with sound (MP4)

Example cards

ホント いちゃいちゃ 代
⬇️ MP4 (sound) ⬇️ MP4 (sound) ⬇️ MP4 (sound)

Installation

Requirements

  • Anki with the AnkiConnect add-on (code 2055492159)
  • ffmpeg + libmpv (video preview only) - needed only when installing via pip/pipx, .deb, or source.

Grab the download for your platform from the latest release:

Platform Download
Windows AnkiMiner-*-Setup.exe
macOS (Apple Silicon / M1-M4) AnkiMiner-macOS-arm64.tar.gz
macOS (Intel) AnkiMiner-macOS-x86_64.tar.gz ¹
Linux (Debian/Ubuntu) anki-miner_*_amd64.deb
Linux (other) AnkiMiner-*-Linux-x86_64.AppImage

¹ Excludes local Whisper subtitle generation and AVIF screenshots. For full functionality: pipx install "anki-miner[asr]".

First-run notes (unsigned builds)

  • macOS: Gatekeeper blocks the app. Extract first, then xattr -dr com.apple.quarantine AnkiMiner/
  • Windows SmartScreen: More info -> Run anyway.
  • Windows Defender false positive: restore from Protection history or report to Microsoft.
Install from PyPI (Python 3.11+)
pipx install anki-miner   # or: pip install anki-miner
anki_miner_gui
Install from source
git clone https://github.com/0xzerolight/anki_miner.git
cd anki_miner
pip install -e .
anki_miner_gui

For full development setup, see CONTRIBUTING.md.

Tabs

  • Video - mine a single video/subtitle pair, a batch folder, or YouTube URLs.
  • Deck Builder - mine a whole series into one frequency-ranked deck.
  • Audio - mine audiobooks, podcasts, radio, songs (audio + subtitle/transcript pairs).
  • Reading - mine manga (mokuro), novels (.epub, .txt; single book or a whole folder), or standalone subtitle files.
  • Analytics - mining history, difficulty rankings, milestones, undo.
  • Tools - generate subtitles (local Whisper), retime subtitles (alass), condense media to dialogue-only audio, and backfill fields on existing cards.
  • Settings - everything configurable.

Other Features

  • Extensive filtering: i+1, frequency limits, blacklist, regex, wordsets, and more.
  • Offline Yomitan dictionary import - definitions, pitch accent, frequency - chained by priority.
  • Multiple frequency lists chained by priority.
  • Word audio on cards from local audio packs, JapanesePod101, or Google TTS.
  • Per-dictionary glossary styling, Yomitan-style.
  • Subtitle timing preview with adjustable offset.
  • Animated screenshots (see example cards above).
Built-in themes (29)
  • Ayu - Light, Mirage, Dark
  • Catppuccin - Latte (light); Frappé, Macchiato, Mocha (dark)
  • Dracula - Dracula, Alucard
  • Everforest - Light, Dark
  • GitHub - Light; Dark, Dark Dimmed
  • Gruvbox - Light Medium, Dark Medium
  • Kanagawa - Lotus (light), Wave (dark)
  • Rosé Pine - Dawn (light); Main, Moon (dark)
  • Solarized - Light, Dark
  • Standalone - Light, Dark, Sakura, Nord, One Dark, Tokyo Night

Theme licenses: LICENSE-THEMES.md. Want another theme added? Suggest in a GitHub Issue.

How It Works
  1. Read the subtitles and split Japanese into individual words.
  2. Filter to content words you don't already know.
  3. Grab a screenshot and audio clip from the video for each line.
  4. Look up definitions in your configured offline dictionaries, optionally falling back to Jisho online if enabled (slower, rate-limited).
  5. Send the finished cards to Anki.

Recommended Resources

Type Resource Download Add via
Dictionary JMdict Yomitan zip Add Dictionary…
Dictionary Jitendex Yomitan zip Add Dictionary…
Dictionary Bee's Character Dictionary Generated on site Add Dictionary…
Pitch Kanjium TSV Dictionary -> Pitch Accent File
Pitch アクセント辞典v2 Drive Dictionary -> Pitch Accent File
Frequency JPDB v2.2 Kana Yomitan zip Filtering -> Frequency List File
Frequency BCCWJ SUW+LUW Yomitan zip Filtering -> Frequency List File
JMnedict License

Uses bundled name wordsets derived from JMnedict (JMdict/EDICT project, EDRDG, CC BY-SA 4.0).

Troubleshooting

Issue Solution
"Cannot connect to Anki" Start Anki and ensure AnkiConnect is installed.
"Deck not found" The deck is created automatically when mining starts; if you meant a different deck, update the name in Settings.
"Note type not found" Configure your note type's field names in Settings -> Anki.
"ffmpeg not found" Install ffmpeg and add it to PATH.
No definitions found Add a Yomitan dictionary in Settings -> Add Dictionary… (recommended), or enable the Jisho fallback (slower, rate-limited).
Windows installer will not open / SmartScreen warning See First-run notes: select More info -> Run anyway; restore Defender false positives from Protection history.
Fresh install has no definitions Run Tools -> Setup Wizard or Tools -> Download Recommended Resources. For manual import, keep the Yomitan ZIP intact (do not unzip it).
Add Dictionary stalls or fails Note the last visible stage and attach logs (see "Where are the logs?" below). Include the dictionary ZIP name, source, and size in the report.
Where are the logs? Use Help -> Open Log Folder, or open %USERPROFILE%\.anki_miner\anki_miner.log on Windows or ~/.anki_miner/anki_miner.log on macOS/Linux. Rotated logs use the .1 through .5 suffixes.
Audio is wrong language The tool tries Japanese audio tracks first, then falls back to the default.
Subtitles out of sync Use the subtitle offset control in the GUI (range ±300 seconds).

Roadmap

List of ideas for future versions of Anki Miner. Not in priority order. Feature requests take precedence.

  • Suggest a feature - Open an issue.

  • Discuss the roadmap - Discussions.

  • Features:

    • UI language selection.
    • Local subtitle creation tab: Opt-in tab to locally generate subtitles.
    • Reading tab: Mine manga and books.
    • Backfill tool.
    • Media library: Expand Analytics tab to display local media library across all media forms.
    • Automatic subtitle downloading.
  • Long-term:

Contributing

Contributions of any kind are welcome. If you want to support the project, please share it with others who may benefit from it.

Bug reports and feature requests -> Issues. General questions and discussion -> Discussions or Discord.

Special Thanks

Sincere thanks to people who made exceptional contributions to the project:

StyraxBenzoin - Brilliant feature suggestions, new release testing, community building

See CONTRIBUTORS.md for everyone who has made any kind of contribution to the project.

License

GNU General Public License v3.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anki_miner-2.8.4.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anki_miner-2.8.4-py3-none-any.whl (4.5 MB view details)

Uploaded Python 3

File details

Details for the file anki_miner-2.8.4.tar.gz.

File metadata

  • Download URL: anki_miner-2.8.4.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for anki_miner-2.8.4.tar.gz
Algorithm Hash digest
SHA256 4272d5ae6525ced54c52bd17571c41962605a0cbcdaba5e5e454f27b5ab1ea2b
MD5 034d8f2217bdeeae271fbf211e8e400c
BLAKE2b-256 eeb56bde99bfd44ee0b9cc1ace3b1dd18b8be451df3a1a1214e1b70d6e585daf

See more details on using hashes here.

Provenance

The following attestation bundles were made for anki_miner-2.8.4.tar.gz:

Publisher: publish.yml on 0xzerolight/anki_miner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anki_miner-2.8.4-py3-none-any.whl.

File metadata

  • Download URL: anki_miner-2.8.4-py3-none-any.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for anki_miner-2.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5e2de49699240d92c4339b4715f80da17ac1451c728ce5d3991bcb3abd885eab
MD5 ff5500be11ded168adb91e7a930697bc
BLAKE2b-256 82aa1b80d3391676dcf0ad9e8fa785bbf077dce37e21b62fe82e4fbb118ba37b

See more details on using hashes here.

Provenance

The following attestation bundles were made for anki_miner-2.8.4-py3-none-any.whl:

Publisher: publish.yml on 0xzerolight/anki_miner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page