Languages: English | 中文说明
A bridge between OpenClaw session logs and Anki decks.
clawanki is a small toolbox that helps you turn marked conversation
snippets (e.g. English corrections) into spaced-repetition cards.
Although the examples below use English→Chinese, the pipeline itself is multi‑language by design:
- The source/target languages are controlled by CLI flags
(
--src-lang,--tgt-lang) and whatever your small LLM can translate. - Audio generation uses
edge-tts, so any voice/language supported by Azure TTS can be used as long as you configure it viaCLAWANKI_TTS_LANG/CLAWANKI_TTS_VOICES.
Typical pipeline:
-
You chat with an OpenClaw agent in English.
-
The agent embeds corrections in a well-defined marker block, e.g.:
[[ANKI_CORRECTION_START]] Original: "I agree with you, the standard output is very important for the agent to monitor the progress." Refined: "I agree with you; standard output is crucial for the agent to monitor progress." [[ANKI_CORRECTION_END]] -
clawankiscans your session JSONL logs, extracts these blocks, and builds Anki cards such as:- Front: Chinese explanation or your original sentence
- Back: Refined English sentence + optional notes
- Extra: TTS audio (via edge-tts), context, or explanation
The goal is to make it easy to capture real conversations and turn them into high-quality, personalized language-learning material.
Status: ready for early use. Current CLI:
clawanki extract— Phase 1: extract ANKI_CORRECTION blocks to JSONLclawanki build-deck— Phase 2: build Anki decks (LLM translation + TTS)
This project uses pyproject.toml as its packaging configuration:
- Project name:
clawanki. - Version: kept in
pyproject.tomlandclawanki/__init__.py. - CLI entrypoint: defined via
[project.scripts]asclawanki = "clawanki.cli:main".
For development installs:
cd clawanki
python -m pip install -e .
# After that
clawanki extract ...
clawanki build-deck ...README_zh.md— Chinese documentation.CLI_HELP_SPEC.md/CLI_HELP_SPEC_MANSTYLE.md— detailed CLI behavior and options.
MIT © Ernest Yu