Skip to main content

kindle-anki

PyPI version Python Version License: MIT

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

  • E-ink最適化: 不要な枠線やHTMLタグを排除し、白黒反転フラッシュなし(AJAX)で単語・発音・意味・例文を表示
  • PC音声再生同期: カード表示に合わせてホストPC側で音声再生(100ms同期)
  • 2択レイアウト: 画面最下部に「わからなかった」「わかった」の固定ボタン
  • 標準ライブラリのみ: 外部Pythonパッケージへの依存なし

📦 インストール (Installation)

pip を使用して直接インストールできます:

pip install git+https://github.com/sh1ragami/kindle-anki.git

またはリポジトリをクローンして実行:

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.0.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.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kindle_anki-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 4bd517b6a4c83cfb8ea150fbbfddc0157df2a6bc1e2f293eb764f9810cd8d8d8
MD5 ecd705a9e3424f91eff8f5e84ff09a0f
BLAKE2b-256 516e7fbbedb48c08e4c24a590dd57ecce554f8ab81d17a40fe0e0ded4dbd391b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kindle_anki-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 195ce0ac5599dadc40fd3ca717b745f80195797147c38bee1b056861d6cde885
MD5 84d70b7800aa9d49d561558ee3889864
BLAKE2b-256 d94ca49631f9f36bd5ef183bec71ad9afcab0dd14031c11f5cbb5a3b31027d77

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

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