Metadata-Version: 2.4
Name: anki-miner
Version: 3.8.0
Summary: Automated vocabulary mining from media with Anki integration
Author: Anki Miner Contributors
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/0xzerolight/anki_miner
Project-URL: Documentation, https://github.com/0xzerolight/anki_miner/blob/main/README.md
Project-URL: Bug Tracker, https://github.com/0xzerolight/anki_miner/issues
Keywords: anki,vocabulary,language-learning,sentence-mining,flashcards,subtitles,yomitan,japanese,chinese,korean,anime,manga
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Education
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: anki_miner/gui/resources/fonts/OFL-Vazirmatn.txt
License-File: anki_miner/gui/resources/fonts/OFL.txt
License-File: anki_miner/gui/resources/fonts/OFL-NotoNaskhArabic.txt
License-File: anki_miner/gui/resources/fonts/OFL-NotoSansThai.txt
License-File: anki_miner/gui/resources/fonts/OFL-NotoSansHebrew.txt
License-File: licenses/hazm/LICENSE
License-File: licenses/hazm/README.md
License-File: licenses/indocollex/LICENSE
License-File: licenses/indocollex/README.md
License-File: licenses/local-audio-yomichan/LICENSE
License-File: licenses/shekar/LICENSE
License-File: licenses/shekar/README.md
License-File: licenses/stopwords-iso/LICENSE
License-File: licenses/stopwords-iso/README.md
License-File: licenses/wiktionary/LICENSE.CC-BY-SA-4.0
License-File: licenses/wiktionary/README.md
License-File: licenses/yomitan/COPYING.GPLv3
License-File: licenses/yomitan/README.md
License-File: licenses/zeyrek/LICENSE
License-File: licenses/zeyrek/README.md
License-File: licenses/camel-tools/LICENSE
License-File: licenses/camel-tools/README.md
License-File: licenses/viet_text_tools/LICENSE
License-File: licenses/viet_text_tools/README.md
License-File: licenses/hkcancor/LICENSE.CC-BY-4.0
License-File: licenses/hkcancor/README.md
License-File: licenses/cc-cedict-canto/LICENSE.CC-BY-SA-3.0
License-File: licenses/cc-cedict-canto/README.md
License-File: licenses/meikiocr/LICENSE
License-File: licenses/meikiocr/README.md
Requires-Dist: pysubs2>=1.8.0
Requires-Dist: requests>=2.34.0
Requires-Dist: truststore>=0.10
Requires-Dist: fugashi>=1.5.0
Requires-Dist: unidic-lite>=1.0.8
Requires-Dist: PyQt6>=6.10.0
Requires-Dist: yt-dlp<2027.0.0,>=2026.3.17
Requires-Dist: psutil>=7.0.0
Requires-Dist: packaging>=25.0
Requires-Dist: gtts<3,>=2.5
Requires-Dist: websockets>=15.0
Requires-Dist: lxml>=6.1.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: charset-normalizer>=3.4.0
Requires-Dist: mutagen>=1.47.0
Requires-Dist: ffsubsync>=0.5.1
Requires-Dist: budoux>=0.9.0
Requires-Dist: mpv>=1.0.8
Requires-Dist: rapidfuzz>=3.14
Provides-Extra: asr
Requires-Dist: faster-whisper>=1.1.0; extra == "asr"
Provides-Extra: asr-cuda
Requires-Dist: faster-whisper>=1.1.0; extra == "asr-cuda"
Requires-Dist: nvidia-cudnn-cu12<10,>=9.0.0; extra == "asr-cuda"
Requires-Dist: nvidia-cublas-cu12; extra == "asr-cuda"
Provides-Extra: asr-vulkan
Requires-Dist: faster-whisper>=1.1.0; extra == "asr-vulkan"
Requires-Dist: pywhispercpp>=1.5.0; extra == "asr-vulkan"
Provides-Extra: ocr
Requires-Dist: onnxruntime>=1.23.2; extra == "ocr"
Provides-Extra: zh
Requires-Dist: jieba>=0.42.1; extra == "zh"
Requires-Dist: pypinyin>=0.53.0; extra == "zh"
Requires-Dist: opencc>=1.1.9; extra == "zh"
Provides-Extra: ko
Requires-Dist: kiwipiepy>=0.20; extra == "ko"
Requires-Dist: kiwipiepy-model>=0.20; extra == "ko"
Provides-Extra: en
Requires-Dist: spacy<3.8.15,>=3.8; extra == "en"
Provides-Extra: ca
Requires-Dist: spacy<3.8.15,>=3.8; extra == "ca"
Provides-Extra: de
Requires-Dist: spacy<3.8.15,>=3.8; extra == "de"
Provides-Extra: pt
Requires-Dist: spacy<3.8.15,>=3.8; extra == "pt"
Provides-Extra: fr
Requires-Dist: spacy<3.8.15,>=3.8; extra == "fr"
Provides-Extra: es
Requires-Dist: spacy<3.8.15,>=3.8; extra == "es"
Provides-Extra: it
Requires-Dist: spacy<3.8.15,>=3.8; extra == "it"
Provides-Extra: nl
Requires-Dist: spacy<3.8.15,>=3.8; extra == "nl"
Provides-Extra: nb
Requires-Dist: spacy<3.8.15,>=3.8; extra == "nb"
Provides-Extra: ro
Requires-Dist: spacy<3.8.15,>=3.8; extra == "ro"
Provides-Extra: el
Requires-Dist: spacy<3.8.15,>=3.8; extra == "el"
Provides-Extra: fi
Requires-Dist: spacy<3.8.15,>=3.8; extra == "fi"
Provides-Extra: hu
Requires-Dist: spacy<3.8.15,>=3.8; extra == "hu"
Provides-Extra: hr
Requires-Dist: spacy<3.8.15,>=3.8; extra == "hr"
Provides-Extra: sv
Requires-Dist: spacy<3.8.15,>=3.8; extra == "sv"
Provides-Extra: pl
Requires-Dist: spacy<3.8.15,>=3.8; extra == "pl"
Provides-Extra: lt
Requires-Dist: spacy<3.8.15,>=3.8; extra == "lt"
Provides-Extra: da
Requires-Dist: spacy<3.8.15,>=3.8; extra == "da"
Provides-Extra: tr
Requires-Dist: zeyrek<0.1.4,>=0.1.3; extra == "tr"
Provides-Extra: ru
Requires-Dist: spacy<3.8.15,>=3.8; extra == "ru"
Requires-Dist: pymorphy3>=2.0.6; extra == "ru"
Requires-Dist: pymorphy3-dicts-ru; extra == "ru"
Provides-Extra: vi
Requires-Dist: underthesea<9.6,>=9.5; extra == "vi"
Provides-Extra: th
Requires-Dist: pythainlp<6,>=5.3.7; extra == "th"
Provides-Extra: yue
Requires-Dist: pycantonese<6,>=5.0; extra == "yue"
Provides-Extra: sl
Requires-Dist: spacy<3.8.15,>=3.8; extra == "sl"
Provides-Extra: uk
Requires-Dist: spacy<3.8.15,>=3.8; extra == "uk"
Requires-Dist: pymorphy3>=2.0.6; extra == "uk"
Requires-Dist: pymorphy3-dicts-uk; extra == "uk"
Provides-Extra: languages
Requires-Dist: anki-miner[zh]; extra == "languages"
Requires-Dist: anki-miner[ko]; extra == "languages"
Requires-Dist: anki-miner[en]; extra == "languages"
Requires-Dist: anki-miner[ca]; extra == "languages"
Requires-Dist: anki-miner[de]; extra == "languages"
Requires-Dist: anki-miner[pt]; extra == "languages"
Requires-Dist: anki-miner[fr]; extra == "languages"
Requires-Dist: anki-miner[es]; extra == "languages"
Requires-Dist: anki-miner[it]; extra == "languages"
Requires-Dist: anki-miner[nl]; extra == "languages"
Requires-Dist: anki-miner[nb]; extra == "languages"
Requires-Dist: anki-miner[ro]; extra == "languages"
Requires-Dist: anki-miner[el]; extra == "languages"
Requires-Dist: anki-miner[fi]; extra == "languages"
Requires-Dist: anki-miner[hu]; extra == "languages"
Requires-Dist: anki-miner[hr]; extra == "languages"
Requires-Dist: anki-miner[sv]; extra == "languages"
Requires-Dist: anki-miner[pl]; extra == "languages"
Requires-Dist: anki-miner[lt]; extra == "languages"
Requires-Dist: anki-miner[da]; extra == "languages"
Requires-Dist: anki-miner[tr]; extra == "languages"
Requires-Dist: anki-miner[ru]; extra == "languages"
Requires-Dist: anki-miner[th]; extra == "languages"
Requires-Dist: anki-miner[sl]; extra == "languages"
Requires-Dist: anki-miner[uk]; extra == "languages"
Requires-Dist: anki-miner[vi]; extra == "languages"
Requires-Dist: anki-miner[yue]; extra == "languages"
Provides-Extra: dev
Requires-Dist: pytest>=9.0.3; extra == "dev"
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
Requires-Dist: pytest-qt>=4.4.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.6.0; extra == "dev"
Requires-Dist: pytest-timeout>=2.3.0; extra == "dev"
Requires-Dist: black>=26.3.1; extra == "dev"
Requires-Dist: mypy>=1.15.0; extra == "dev"
Requires-Dist: ruff>=0.9.0; extra == "dev"
Requires-Dist: types-requests>=2.31.0; extra == "dev"
Requires-Dist: pre-commit>=4.0.0; extra == "dev"
Requires-Dist: pyyaml>=6.0; extra == "dev"
Requires-Dist: vulture>=2.16; extra == "dev"
Provides-Extra: i18n
Requires-Dist: pyside6-essentials>=6.6.0; extra == "i18n"
Dynamic: license-file

<h1 align="center">
  <img src="https://raw.githubusercontent.com/0xzerolight/anki_miner/main/anki_miner/gui/resources/icons/anki_miner.svg" height="76" align="absmiddle" alt=""> Anki Miner
</h1>

<p align="center">
<a href="https://pypi.org/project/anki-miner/"><img src="https://img.shields.io/pypi/v/anki-miner.svg" alt="PyPI version"></a>
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.11+-blue.svg" alt="Python 3.11+"></a>
<a href="https://www.gnu.org/licenses/gpl-3.0"><img src="https://img.shields.io/badge/License-GPLv3-blue.svg" alt="License: GPL v3"></a>
<a href="https://github.com/0xzerolight/anki_miner/releases/latest"><img src="https://img.shields.io/github/downloads/0xzerolight/anki_miner/total.svg" alt="GitHub downloads"></a>
<a href="https://github.com/0xzerolight/anki_miner/stargazers"><img src="https://img.shields.io/github/stars/0xzerolight/anki_miner?style=social" alt="GitHub stars"></a>
<a href="https://discord.com/invite/aDtQyZzUVP"><img src="https://img.shields.io/discord/1517634859110240326?logo=discord&logoColor=white&label=Discord&color=5865F2" alt="Discord community"></a>
</p>

<!-- i18n-nav:start -->
<p align="center">
<b>English</b> ·
<a href="i18n/README.ja.md">日本語</a> ·
<a href="i18n/README.ru.md">Русский</a> ·
<a href="i18n/README.fr.md">Français</a> ·
<a href="i18n/README.es.md">Español</a> ·
<a href="i18n/README.de.md">Deutsch</a> ·
<a href="i18n/README.pt_br.md">Português (Brasil)</a> ·
<a href="i18n/README.id.md">Bahasa Indonesia</a> ·
<a href="i18n/README.vi.md">Tiếng Việt</a> ·
<a href="i18n/README.zh_cn.md">简体中文</a> ·
<a href="i18n/README.zh_tw.md">繁體中文</a> ·
<a href="i18n/README.it.md">Italiano</a>
</p>
<!-- i18n-nav:end -->

<p align="center">
Turn native content in Japanese, Chinese, Korean, and twenty-nine more languages into Anki vocabulary cards.
</p>

<p align="center">
Also on Android - <a href="https://github.com/0xzerolight/anki_miner_android">Anki Miner for Android</a>.
</p>

<p align="center">
Please leave a ⭐ star if Anki Miner helped you - it helps others find it :).
</p>


# <p align="center">Mining Demo</p>

![Anki Miner Showcase](https://raw.githubusercontent.com/0xzerolight/anki_miner/main/gifs/demo.gif)

<p align="center">⬇️ <a href="https://raw.githubusercontent.com/0xzerolight/anki_miner/main/gifs/demo.mp4">Full demo with sound (MP4)</a></p>

### Example cards

| ![ホント](https://raw.githubusercontent.com/0xzerolight/anki_miner/main/gifs/ホント.gif) | ![いちゃいちゃ](https://raw.githubusercontent.com/0xzerolight/anki_miner/main/gifs/いちゃいちゃ.gif) | ![代](https://raw.githubusercontent.com/0xzerolight/anki_miner/main/gifs/代.gif) |
|:--:|:--:|:--:|
| ⬇️ [MP4 (sound)](https://raw.githubusercontent.com/0xzerolight/anki_miner/main/gifs/ホント.mp4) | ⬇️ [MP4 (sound)](https://raw.githubusercontent.com/0xzerolight/anki_miner/main/gifs/いちゃいちゃ.mp4) | ⬇️ [MP4 (sound)](https://raw.githubusercontent.com/0xzerolight/anki_miner/main/gifs/代.mp4) |

## Installation

### Requirements

- **Anki** with the [AnkiConnect](https://ankiweb.net/shared/info/2055492159) add-on (code `2055492159`)
- **ffmpeg** + **libmpv** (video preview only) - needed only when installing via pip/pipx or source.

Grab the download for your platform from the [latest release](https://github.com/0xzerolight/anki_miner/releases/latest):

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

¹ Excludes AVIF screenshots and silence removal for generated subtitles.

### First-run notes (unsigned builds)

- **macOS**: open the `.dmg`, drag **AnkiMiner** onto **Applications**, then launch it. The first launch is blocked because the app is not notarized: dismiss the dialog, open the app again, and choose **Open Anyway** (also under **System Settings** -> **Privacy & Security**). Once only.
- **Linux AppImage**: make it executable before running it - `chmod +x AnkiMiner-*.AppImage`, or **Properties** -> **Allow executing** in your file manager.
- **Windows SmartScreen**: **More info** -> **Run anyway**.
- **Windows Defender false positive**: restore from **Protection history** or [report to Microsoft](https://www.microsoft.com/en-us/wdsi/filesubmission).

<details>
<summary><strong>Install from PyPI (Python 3.11+)</strong></summary>

```bash
pipx install anki-miner   # or: pip install anki-miner
anki_miner_gui
```

Japanese, Indonesian and Hebrew need nothing extra. For another mining language, add its engine:

```bash
pipx install "anki-miner[languages]"   # all; or one of [zh], [ko], [yue], [en], [ca], [de], [pt], [fr], [es], [it], [nl], [nb], [ro], [el], [fi], [hu], [hr], [sv], [pl], [lt], [da], [ru], [uk], [sl], [tr], [th], [vi]
```

Arabic and Persian have no extra. Their data, and the spaCy models of the European languages, download in-app from Settings -> Mining Language, where the downloads above fetch everything.

</details>

<details>
<summary><strong>Install from source</strong></summary>

```bash
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](CONTRIBUTING.md).

</details>

## Tabs

- **Video** - mine a single video/subtitle pair, a batch folder, YouTube or Bilibili URLs, or a whole series into one frequency-ranked deck.
- **Audiobooks** - mine audiobooks, podcasts, radio, songs (audio + subtitle/transcript pairs).
- **Reading** - mine manga (mokuro), novels (`.epub`, `.txt`; single book or a whole folder), standalone subtitle files, or pasted text.
- **Analytics** - mining history, difficulty rankings, milestones.
- **Utilities** - generate subtitles (local Whisper), retime subtitles (ffsubsync/alass), condense media to dialogue-only audio, download video/audio/subtitles from any site yt-dlp supports, copy the worth-learning part of a premade deck into a new one, backfill fields on existing cards, OCR manga page images into .mokuro files (mokuro), and time an audiobook to its book's text (Audiobook Sync).
- **Settings** - everything configurable.

## Other Features

- Mining languages - Japanese, Chinese, Korean, English, Catalan, German, Portuguese, French, Spanish, Italian, Dutch, Norwegian Bokmål, Romanian, Greek, Finnish, Hungarian, Croatian, Swedish, Polish, Lithuanian, Danish, Turkish, Indonesian, Russian, Arabic, Thai, Persian, Slovenian, Ukrainian, Vietnamese, Cantonese, and Hebrew, switched in Settings. Languages other than Japanese download their engine in-app; Indonesian and Hebrew need none.
- Word Curator - review every candidate word before cards are made, with its scene, manga page, and dictionary entry side by side.
- Undo a run - delete the notes a run just created, straight from its results dialog.
- Extensive filtering: i+1, frequency rank range, 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, Google TTS, or Microsoft Edge TTS.
- Sentence audio on Reading cards from Google Translate TTS, or Naver Papago for Japanese and Korean (off by default).
- Per-dictionary glossary styling, Yomitan-style.
- Embedded libmpv video preview - play a word's scene while curating, or nudge subtitle timing with live playback.
- Animated screenshots (see example cards above).
- Settings profiles - save named configurations and switch between them from the header.
- Restyle Mined Cards - re-apply your current card styling to cards you already made (Utilities → Card Backfill).

<details>
<summary><strong>Built-in themes (29)</strong></summary>

- **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](LICENSE-THEMES.md). 
Want another theme added? Suggest in a GitHub Issue.

</details>

<details>
<summary><strong>How It Works</strong></summary>

1. **Read the subtitles** and split the text into individual words.
2. **Filter** to content words you don't already know - optionally reviewing the list yourself in the Word Curator.
3. **Grab a screenshot and audio clip** from the video for each line.
4. **Look up definitions** in your configured offline dictionaries.
5. **Send the finished cards to Anki.**

</details>

## Recommended Resources

Dictionaries and frequency lists for every mining language, with download links: [RESOURCES.md](RESOURCES.md). The Setup Wizard offers the right set for your mining language.

<details>
<summary><strong>JMnedict License</strong></summary>

Uses bundled name wordsets derived from [JMnedict](https://www.edrdg.org/enamdict/enamdict_doc.html) (JMdict/EDICT project, EDRDG, CC BY-SA 4.0).

</details>

## Troubleshooting

| Issue                    | Solution                                                                         |
|--------------------------|----------------------------------------------------------------------------------|
| "Cannot connect to Anki" | Start Anki and ensure AnkiConnect is installed.                                  |
| "Deck not found"         | Pick an existing deck in Settings -> Cards & Anki. Decks are not created for you; make it in Anki first if you need a new one. |
| "Note type not found"    | Configure your note type's field names in Settings -> Cards & Anki.               |
| "ffmpeg not found"       | Install ffmpeg and add it to PATH.                                               |
| No definitions found     | Add a Yomitan dictionary in Settings -> Dictionaries -> Add dictionary… |
| Windows installer will not open / SmartScreen warning | See [First-run notes](#first-run-notes-unsigned-builds): 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. Send `anki_miner.crash` too if it is there (a crash that took the app down writes its stack to that file, not to the log), and `anki_miner.child.log`, which holds a helper process's output. |
| Reporting a bug          | Help -> Export Diagnostics… writes a ZIP to a location you choose, holding the logs (`anki_miner.log` and its rotations, `anki_miner.crash`, `anki_miner.child.log`), your `settings.json`, your config and UI-state files, queue snapshots and download manifests, and generated reports of the machine and app state (`environment.txt`, `health.txt`, `resources.txt`, `stores.txt`, `disk.txt`, `screens.txt`). Review it before uploading because it contains file paths and file names from your computer. Nothing is uploaded automatically. |
| More diagnostic logging | Set `ANKI_MINER_LOG_LEVEL=DEBUG` before starting Anki Miner to capture third-party yt-dlp, urllib3, and fugashi details. The default is `WARNING`; Anki Miner logs remain at DEBUG. |
| Audio is wrong language  | The tool picks the mining language's audio track, else the first one. Choose it yourself with Audio track… (Video -> Single). |
| Subtitles out of sync    | Use the subtitle offset control in the GUI (range ±300 seconds).                 |

## Contributing

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

- New here? Start with [CONTRIBUTING.md](CONTRIBUTING.md).
- Architecture overview: [ARCHITECTURE.md](ARCHITECTURE.md).
- Code of Conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
- Security: [SECURITY.md](SECURITY.md).

Bug reports and feature requests -> [Issues](https://github.com/0xzerolight/anki_miner/issues).
General questions and discussion -> [Discussions](https://github.com/0xzerolight/anki_miner/discussions) or [Discord](https://discord.com/invite/aDtQyZzUVP).

## Special Thanks

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

- ★ **[StyraxBenzoin](https://github.com/StyraxBenzoin)** - Brilliant feature suggestions, new release testing, community building.
- ★ **[rob-olvr](https://github.com/rob-olvr)** - Excellent feature suggestions, community building and moderation on Discord.

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


## License

GNU General Public License v3.0. See [LICENSE](LICENSE).
