From 5611f709367677b77a482aa8e396fd3bc6a0ab26 Mon Sep 17 00:00:00 2001 From: historia Date: Thu, 27 Aug 2026 19:00:44 -0400 Subject: feat: flags for converting individual book files --input-book --output-book --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index dd51735..032bdb7 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ python audiobook.py ## CLI Options -Everything the TUI does can also be scripted with flags: `python audiobook.py --backend audiocpp --model higgs --voice narrator`. +Everything the TUI does can also be scripted with flags: `python audiobook.py --backend audiocpp --model higgs --voice narrator`. To convert a single book file instead of the whole input directory, pass `--input-file` (and optionally `--output-file`): `python audiobook.py --input-file books/dune.epub --output-file out/dune.mp3`. The directory flags (`--input`/`--output`) and the single-book flags (`--input-file`/`--output-file`) are mutually exclusive pairs — mixing one stops with an error explaining both. ## Options @@ -68,6 +68,8 @@ Everything the TUI does can also be scripted with flags: `python audiobook.py -- | `--format {mp3,m4b,ogg,flac}` | Output format (default: the `AUDIO_FORMAT` setting in `app/converter/config.py`, `m4b`). | | `--input ` | Directory containing the books to convert (default: the `INPUT_DIR` setting in `app/converter/config.py`, `./input`; relative paths resolve against the project root). | | `--output ` | Directory to write finished audiobooks to (default: the `OUTPUT_DIR` setting in `app/converter/config.py`, `./output`). | +| `--input-file ` | Convert one specific book (`.txt`/`.pdf`/`.epub`) instead of scanning a directory; cannot be combined with `--input`. Without `--output-file` the audiobook goes to the output directory under its usual narrator-tagged name. | +| `--output-file ` | Base path for the audiobook from `--input-file` (requires it; cannot be combined with `--output`): the file's parent folder receives the audio and its stem is the base output name, without the narrator tag (chapters as `STEM_NN_Title.ext`). The extension must match the output format (`--format` / `AUDIO_FORMAT`) or the run stops without converting. | | `--speed ` | Playback speed, pitch-preserving (`1.0` = normal). A normal-speed copy is also output. Defaults to the `SPEED` setting in `app/converter/config.py`. | | `--single-file` | Merge all chapters into a single file. `m4b` is always one file. | | `--language ` | Output language for the synthesized speech. Can add an accent even if the text is English. | -- cgit v1.2.3