Skip to content

Commit bb4ffe6

Browse files
roelvangilsclaude
andauthored
CLAUDE.md: refresh for current shape (#26)
The agent briefing was stale — listed only M0.5–M6 work, missed the new `dpub-meta` crate, ACE integration, the new CLI verbs (`a11y`, `batch`), and the new convert flags (`--cover`, `--auto-cover`, `--rights`, `--a11y`, `--json`, `--no-text-cleanup`). Updated: - Layout block lists `dpub-meta` and notes per-crate state changes (cover-image in epub3-writer, ACE in dpub-validate, stateful Transcriber in dpub-whisper, etc.). - Quickstart shows the full verb set and flag matrix a producer would actually run. - External tools table gains an `ace` row. - Opt-in env vars table gains `DPUB_TEST_OPENLIBRARY=1`. - Roadmap-status paragraph names the Tier 1 polish that landed and points at `.claude/plans/can-you-look-at-quirky-allen.md` for the post-1.0 strategic bet (daemon + batch v2). No code changes. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3fdc2f0 commit bb4ffe6

1 file changed

Lines changed: 22 additions & 15 deletions

File tree

CLAUDE.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,30 @@
77
```
88
crates/
99
├── dpub-core/ # DAISY 2.02 parser + in-memory model (NCC, master.smil, per-section SMIL)
10-
├── epub3-writer/ # EPUB 3 ZIP serialiser with Media Overlays
11-
├── dpub-convert/ # DAISY 2.02 → EPUB 3 (drives the pipeline; --audio, --transcribe live here)
12-
├── dpub-validate/ # EPUBCheck wrapper (subprocess + JSON parse)
13-
├── dpub-audio/ # ffmpeg-backed MP3 → Opus re-encoder
14-
├── dpub-whisper/ # local Whisper transcription via whisper.cpp (FFI)
10+
├── epub3-writer/ # EPUB 3 ZIP serialiser with Media Overlays + cover-image
11+
├── dpub-convert/ # DAISY 2.02 → EPUB 3 (drives the pipeline; --audio, --transcribe, --cover, --auto-cover, --rights live here)
12+
├── dpub-validate/ # EPUBCheck + ACE wrappers (subprocess + JSON parse), serde-stable Report
13+
├── dpub-audio/ # ffmpeg-backed MP3 → Opus re-encoder (passes -map_metadata 0 to preserve ID3 tags)
14+
├── dpub-whisper/ # local Whisper transcription via whisper.cpp (FFI). Stateful `Transcriber` reused across files.
15+
├── dpub-meta/ # external metadata lookup (currently Open Library covers; ureq, sync HTTP)
1516
├── dpub-util/ # shared XML escapers (used by 3 crates — don't reinvent)
16-
└── dpub-cli/ # `dpub` binary
17+
└── dpub-cli/ # `dpub` binary (subcommands: info, convert, validate, a11y, batch)
1718
```
1819

1920
## Quickstart
2021

2122
```sh
2223
cargo build --release
23-
./target/release/dpub info /path/to/ncc.html
24-
./target/release/dpub convert /path/to/ncc.html -o out.epub \
25-
[--validate] \
24+
./target/release/dpub info /path/to/daisy/ # accepts file or dir
25+
./target/release/dpub convert /path/to/daisy/ -o out.epub \
26+
[--validate] [--a11y] \
2627
[--audio opus --bitrate 32] \
28+
[--cover cover.jpg | --auto-cover] \
29+
[--rights "© 2008 …"] \
2730
[--transcribe nl --whisper-model ~/models/ggml-medium.bin]
28-
./target/release/dpub validate /path/to/some.epub
31+
./target/release/dpub validate /path/to/some.epub [--json]
32+
./target/release/dpub a11y /path/to/some.epub [--json] # needs `ace` (npm i -g @daisy/ace)
33+
./target/release/dpub batch /path/to/daisy-books/ -o /path/to/output/ [--jobs N]
2934
```
3035

3136
## Conventions
@@ -42,16 +47,18 @@ cargo build --release
4247
|---|---|---|---|
4348
| `cmake` | building `dpub-whisper` (whisper-rs-sys) | `brew install cmake` | **required to build the workspace** |
4449
| `epubcheck` | `dpub validate`, M2/M4 integration tests | `brew install epubcheck` | needs Java 11 — keep `openjdk@11` on PATH |
50+
| `ace` | `dpub a11y`, M4 accessibility checks | `npm install -g @daisy/ace` | needs Node.js |
4551
| `ffmpeg` | `dpub convert --audio opus`, M5 tests | `brew install ffmpeg` | |
4652
| Whisper GGML model | `dpub convert --transcribe ...` | download from <https://huggingface.co/ggerganov/whisper.cpp> | not bundled; `tiny` 75 MB → `large-v3` 1 GB |
4753

4854
## Opt-in test env vars
4955

5056
```sh
51-
DPUB_TEST_BOOK=/path/to/ncc.html # real-book parse + e2e tests (dpub-core, dpub-convert)
52-
DPUB_TEST_OPUS=1 # full-book Opus encode test (slow — ~minute on M-series with parallel ffmpeg)
53-
DPUB_TEST_WHISPER_MODEL=/path/to/ggml-tiny.bin # whisper smoke test (dpub-whisper)
54-
DPUB_TEST_AUDIO=/path/to/some.mp3 # ↑ paired with this
57+
DPUB_TEST_BOOK=/path/to/ncc.html # real-book parse + e2e tests (dpub-core, dpub-convert)
58+
DPUB_TEST_OPUS=1 # full-book Opus encode test (slow — ~minute on M-series with parallel ffmpeg)
59+
DPUB_TEST_WHISPER_MODEL=/path/to/ggml-tiny.bin # whisper smoke test (dpub-whisper)
60+
DPUB_TEST_AUDIO=/path/to/some.mp3 # ↑ paired with this
61+
DPUB_TEST_OPENLIBRARY=1 # live cover lookup against Open Library (dpub-meta)
5562
```
5663

5764
## Test fixtures
@@ -62,7 +69,7 @@ DPUB_TEST_AUDIO=/path/to/some.mp3 # ↑ paired with this
6269

6370
## Roadmap status
6471

65-
See `README.md` for the canonical table. As of this writing: **M0.5–M6 done** (everything in `main`); **M7 (WASM)** and **M8 (1.0 release)** remain.
72+
See `README.md` for the canonical table. As of this writing: **M0.5–M6 done plus the Tier 1 1.0-readiness items** (Whisper model caching, cover lookup `--cover` + `--auto-cover`, ACE integration `dpub a11y` / `--a11y`, parallel `dpub batch`, stable `--json` output, `--rights` flag, ffmpeg metadata preservation). All on `main`. **M7 (WASM)** and **M8 (1.0 release)** remain. The post-1.0 strategic bet per `.claude/plans/can-you-look-at-quirky-allen.md` is **daemon mode + batch v2**.
6673

6774
## Known correctness baseline
6875

0 commit comments

Comments
 (0)