Config file, auto-cover default, transcribe auto-detect, download resilience#32
Merged
Merged
Conversation
… resilience
- Persistent JSON config file (~/.config/dpub/config.json) with `dpub config`
subcommand. All convert/batch defaults can be set once; CLI flags override.
- --auto-cover now on by default for convert and batch (--no-auto-cover to opt out).
- --transcribe without a language code auto-detects from dc:language metadata,
normalising ISO 639-2 (e.g. "dut") to 639-1 ("nl") for Whisper.
- Shared ISO 639 normaliser in dpub-util/lang, used by dpub-meta and dpub-cli.
- Cover lookup runs on a background thread, overlapping with transcription/recompression.
- HTTP agent switched from total-request timeout to per-read timeout (60 s idle)
so multi-GB model downloads no longer time out while data is flowing.
- Model downloads retry up to 3 times on transient failures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
~/.config/dpub/config.json) withdpub configsubcommand. All convert/batch defaults settable once; CLI flags override.--auto-coveron by default for bothconvertandbatch. Opt out with--no-auto-cover.--transcribeauto-detects language fromdc:languagemetadata when no code is given. ISO 639-2 codes (e.g.dut) normalised to 639-1 (nl) for Whisper. Shared normaliser indpub-util/lang.Test plan
cargo checkcleancargo test -p dpub-cli -p dpub-util -p dpub-meta -p dpub-convert— all 80 tests passdpub configshows example,dpub config --initcreates filedpub convert <book> -o out.epubpicks up--auto-coverby defaultdpub convert <book> -o out.epub --transcribeauto-detectsnlfrom metadatadpub convert <book> -o out.epub --transcribe nlstill works as explicit override🤖 Generated with Claude Code