wesandClaude Opus 5 32d7db1668 Arm the watchdog for every mode, not just snapshot
The watchdog was spawned inside snapshot.run, so legacy highlights mode ran
without it. That is the mode NickelMenu invokes, against the endpoint that
stopped responding and hung a run for 16 days — so the exact failure being
fixed was still reachable from the device's menu.

Moves the spawn into main, ahead of mode dispatch, so both paths are covered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 18:22:23 -04:00
2025-12-01 12:36:35 -05:00
2025-12-01 12:36:35 -05:00
2025-12-01 12:36:35 -05:00
2025-12-01 12:36:35 -05:00
2025-12-01 12:36:35 -05:00

Kobo Highlight Exfiltrator

A simple, statically-linked binary to extract highlights from your Kobo e-reader.

Features

  • Zero dependencies: Fully statically linked with musl libc and SQLite
  • Cross-platform: Builds for both x86_64 (development) and ARM (Kobo)
  • Small binary: ~780KB for ARM release build
  • Simple: Just point it at your KoboReader.sqlite database

Building

For local testing (x86_64)

zig build
./zig-out/bin/kb_exfiltrator local-dev.sqlite

For Kobo (ARM)

./build-kobo.sh
# or manually:
zig build -Dtarget=arm-linux-musleabihf -Doptimize=ReleaseSmall

Usage on Kobo

  1. Copy zig-out/bin/kb_exfiltrator to your Kobo (via USB or SSH)

  2. Run:

    ./kb_exfiltrator /mnt/onboard/.kobo/KoboReader.sqlite
    
  3. Or save to a file:

    ./kb_exfiltrator /mnt/onboard/.kobo/KoboReader.sqlite > highlights.txt
    

How It Works

The program:

  1. Opens the SQLite database at the path you provide
  2. Queries the Bookmark table for all highlights (entries with non-NULL Text)
  3. Displays each highlight with:
    • Date created
    • Book identifier (ContentID)
    • Highlight text
    • Any annotations/notes you added

Dependencies

All dependencies are bundled into the binary:

  • SQLite 3.48.0 (amalgamation build)
  • musl libc (for ARM target)

Requirements

  • Zig 0.15.2 or later

Notes

  • The binary is statically linked, so you can copy just the single file to your Kobo
  • Uses musl libc for smaller binary size and better portability
  • SQLite is compiled with:
    • SQLITE_THREADSAFE=0: No threading support (smaller, faster)
    • SQLITE_OMIT_LOAD_EXTENSION: No dynamic extensions (more secure)
S
Description
No description provided
Readme
6.1 MiB
Languages
Zig 91.2%
Shell 8.8%