Skip to main content

kindle-anki

PyPI version Python Version License: MIT

IMG_20260827_040355500 IMG_20260827_040624468

KindleのブラウザでAnkiカードを快適に学習・復習するための軽量ローカルWebサーバーです。

  • E-ink最適化: 不要な枠線やHTMLタグを排除し、白黒反転フラッシュなし(AJAX)で単語・発音・意味・例文を表示
  • PC音声再生同期: カード表示に合わせてホストPC側で音声再生

📦 インストール (Installation)

PyPIから直接インストールできます:

pip install kindle-anki

または pipx を使用:

pipx install kindle-anki

あるいはリポジトリから実行:

git clone https://github.com/sh1ragami/kindle-anki.git
cd kindle-anki
python3 kindle_anki.py

⚙️ 前提条件 (Prerequisites)

  1. PC上で Anki が起動していること。
  2. アドオン AnkiConnect (2055492159) がインストールされていること。
  3. AnkiConnectの設定で webBindAddress"0.0.0.0" に変更すること(Ankiメニュー -> ツール -> アドオン -> AnkiConnect -> 設定)。
{
    "webBindAddress": "0.0.0.0",
    "webBindPort": 8765
}

🚀 使い方 (Usage)

1. サーバーの起動

pip でインストールした場合:

kindle-anki

スクリプトから直接起動する場合:

python3 kindle_anki.py

起動時に表示されるURL(例: http://192.168.1.10:8000)を確認します。

2. Kindleからアクセス

  1. KindleをPCと同じWi-Fiに接続します。
  2. Kindleの「体験版ブラウザ」を開き、表示されたURLにアクセスします。

🔧 オプション (Options)

kindle-anki --port 8000 --host 0.0.0.0 --anki-url http://127.0.0.1:8765
オプション デフォルト 説明
--port 8000 サーバーのポート番号
--host 0.0.0.0 バインドするホストIP
--anki-url http://127.0.0.1:8765 AnkiConnectのURL

🔊 音声再生 (Audio)

PC側に mpv または ffplay がインストールされている場合、Kindleのカード切り替えに合わせて自動でPCスピーカーから音声が流れます。

# Ubuntu / Debian
sudo apt install mpv

# macOS
brew install mpv

📄 ライセンス (License)

MIT License

Download files

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

Source Distribution

kindle_anki-1.0.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

kindle_anki-1.0.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file kindle_anki-1.0.1.tar.gz.

File metadata

  • Download URL: kindle_anki-1.0.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for kindle_anki-1.0.1.tar.gz
Algorithm Hash digest
SHA256 26f137fad7a099483cc7b3dc454c75d9e92782a10ce2a43bb5d7d47d6aaf0c92
MD5 2b5363ef74477c2e9f47b6e423ae890c
BLAKE2b-256 2b960e123b9ad9b81f12323a7aede4ba31859c12c1aa01ecd342395fb70fe10b

See more details on using hashes here.

File details

Details for the file kindle_anki-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: kindle_anki-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for kindle_anki-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25a3f0186ddb4c4dfae388996f035e9cb23e29dc8edd963a47eb13aa52cdf2cf
MD5 ffc098aefbabe9574bdb801717d1a96a
BLAKE2b-256 b5f082f8ddac91348ec2ebdbdfe421e8c902185aefa7151eeeee4d0a87fee11f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page