53 lines
1.7 KiB
Markdown
53 lines
1.7 KiB
Markdown
# re-voice
|
|
|
|
`re-voice` turns “any document” into a **shadow dossier** by applying a versioned **style bible** (voice + structure + constraints) on top of extracted source text.
|
|
|
|
This repo is the home for:
|
|
- Style bibles (versioned, citable)
|
|
- A small extraction + dossier generator (CLI + optional API)
|
|
- Example dossiers for review
|
|
|
|
## Quick start (example)
|
|
|
|
Generate the Dave-style shadow dossier for the included PDF:
|
|
|
|
```bash
|
|
PYTHONPATH=src python3 -m revoice generate \
|
|
--style if.dave.v1.2 \
|
|
--input examples/ai-code-guardrails/AI-Code-Guardrails.pdf \
|
|
--output examples/ai-code-guardrails/AI-Code-Guardrails.shadow.dave.md
|
|
```
|
|
|
|
Preflight the generated Markdown for PDF export (auto-fix Mermaid + lint):
|
|
|
|
```bash
|
|
PYTHONPATH=src python3 -m revoice preflight \
|
|
--style if.dave.v1.2 \
|
|
--input examples/ai-code-guardrails/AI-Code-Guardrails.shadow.dave.md \
|
|
--source examples/ai-code-guardrails/AI-Code-Guardrails.pdf
|
|
```
|
|
|
|
Or install the CLI locally:
|
|
|
|
```bash
|
|
python3 -m pip install -e .
|
|
revoice generate --style if.dave.v1.2 --input examples/ai-code-guardrails/AI-Code-Guardrails.pdf
|
|
```
|
|
|
|
## What “apply a style bible” means
|
|
|
|
A style bible is treated as an executable contract:
|
|
- **Structure:** required sections / scaffolding (e.g. the 9-element stack)
|
|
- **Voice constraints:** pronouns, tone, taboo phrases, vocabulary swaps
|
|
- **Formatting rules:** bullets, bold buzzwords, footers, etc.
|
|
- **Citations:** stable IDs like `if://bible/dave/v1.0` to make outputs auditable
|
|
|
|
## Proposed app shape (upload → shadow dossier)
|
|
|
|
See `docs/APP_SPEC.md`.
|
|
|
|
## Dev notes
|
|
|
|
`revoice` uses external tools for text extraction:
|
|
- `pdftotext`, `pdftoppm` (Poppler utils)
|
|
- `tesseract` (OCR fallback for image-only PDFs)
|