Repository navigation
Kindle Vocabulary Builder → flashcards (manual + wireless hands-free) - #6
Merged
Merged
Conversation
New `scripts/kindle_vocab_sync.py`: pulls the words you look up while reading on a Kindle (its `system/vocabulary/vocab.db`) into the CrossPoint decks. It reads WORDS added since its last run, routes each by Kindle's own language tag (de→german, uk→ukrainian, en→english; others skipped), and pipes them into `quizlet_sync.py` as `[[deck:…]]`-tagged single terms — reusing the existing MyMemory auto-translation + web/device upload + sync pipeline. No new deps (stdlib sqlite3 only). - Incremental: newest processed WORDS.timestamp saved in ~/.crosspoint_sync/kindle_state.json; state advances only on a successful upload, so nothing is lost if a run fails or the device is asleep. - DB discovery: autodetects a mounted Kindle, else KINDLE_VOCAB_DB, --db, or ~/.crosspoint_sync/vocab.db. Opened read-only (never modifies the Kindle). - --word-field stem|word, --emit-only, --dry-run, --all; credentials resolve from env then ~/.crosspoint_sync/config.json like sync_agent.py. - Optional `com.crosspoint.kindle-vocab-sync.plist`: event-driven launchd agent that imports on volume mount (plug in the Kindle) — no polling. - SKILL.md + README document the flow. Verified: synthetic vocab.db (de/uk/en + fr + en-US) → correct extraction, routing, and stem/word forms; full run against a local web server translated and uploaded (german 2 / ukrainian 1 / english 2 cards) and saved state; a second run correctly imported nothing new. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lets Kindle Vocabulary Builder words reach the decks with no USB cable and no manually-run script, by having the Kindle push its DB and the web app ingest it. Server (web/server.js): - POST /api/kindle/vocab — accepts a raw vocab.db upload, reads new WORDS via the sqlite3 CLI (read-only, -json), translates new terms (MyMemory, de/uk->en, en->de), dedups by term, and appends them to decks/<deck>/kindle-YYYY-MM-DD.txt (the normal deck + device-sync pipeline takes it from there). ?wait=1 returns the ingest summary. Incremental via a timestamp watermark in DATA_DIR/kindle/state.json; the watermark never advances past a word that failed to translate (retried next upload). Rejects non-SQLite bodies. - GET /api/kindle/status — last import watermark. - web/nixpacks.toml installs the sqlite3 CLI on Railway (Node stays npm-dep-free). Kindle side (skill/crosspoint-quizlet-sync/kindle-device/): - upload_vocab.sh — BusyBox-sh script that runs ON a jailbroken Kindle and uploads /mnt/us/system/vocabulary/vocab.db over WiFi (curl or wget), driven by cron. Config via vocab_sync.conf(.example). README covers jailbreak/KUAL/cron. Why jailbreak: Amazon keeps vocab.db device-local with no cloud/API, so the only wireless way to read Vocabulary Builder is on-device code. Verified (server side, locally): uploading a synthetic vocab.db over HTTP parses + translates + files words into the right decks (german 2 / ukrainian 1 / english 2, French skipped), advances the watermark, is idempotent on re-upload, and rejects a non-SQLite body. Kindle-side script is shellcheck-clean but untested against a physical device (none available). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
watchmesink
merged commit Jul 14, 2026
c16409d
into
codex/flashcards-sm2pp-upload
1 of 6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings Kindle Vocabulary Builder → CrossPoint flashcards in two flavors.
1. Manual / USB importer (
scripts/kindle_vocab_sync.py)Reads new words from a Kindle
vocab.db(mounted over USB or copied), routes by language, and pipes them intoquizlet_sync.py(auto-translate + upload). Incremental via~/.crosspoint_sync/kindle_state.json. Optional on-mount launchd agent for Macs. Details inSKILL.md.2. Fully wireless & hands-free — no USB, no manual run (
kindle-device/+ server endpoint)Solves "no cable, no manual script":
web/server.js):POST /api/kindle/vocabstores an uploadedvocab.db, reads newWORDSvia thesqlite3CLI, translates (MyMemory: de/uk→en, en→de), dedups by term, and appends todecks/<deck>/kindle-YYYY-MM-DD.txt. Incremental watermark inDATA_DIR/kindle/state.json(never advances past a word that failed to translate).GET /api/kindle/statusfor monitoring.web/nixpacks.tomlinstallssqlite3(Node stays npm-dependency-free).kindle-device/upload_vocab.sh): BusyBox-sh uploader that runs on the device fromcronand pushesvocab.dbover WiFi (curl/wget). Config + jailbreak/KUAL/cron install steps inkindle-device/README.md.Requires a jailbroken Kindle — Amazon keeps
vocab.dbdevice-local with no cloud/API, so on-device code is the only wireless way to read Vocabulary Builder. (No-jailbreak alternative — scraping cloud highlights — is noted in the README.)Verification
node web/test/test.jsstill green (engine unchanged by this path).vocab.db(de/uk/en + fr + en-US) → correct extraction/routing; full run against a local server translated + uploaded, saved state, idempotent second run.vocab.dbover HTTP parsed + translated + filed words into the right decks (german 2 / ukrainian 1 / english 2, French skipped), advanced the watermark, was idempotent on re-upload, and rejected a non-SQLite body.upload_vocab.shissh -nclean; not run against a physical device (none available).🤖 Generated with Claude Code