- Refactor codebase into src/ (preprocessing, translation, assembly) - Add pipeline/ scripts for individual stages - Externalize configuration to config/config.yaml - Fix Cover Image preservation - Update documentation and manuals
25 lines
653 B
Python
25 lines
653 B
Python
from pathlib import Path
|
|
|
|
def get_work_dirs(input_path: Path) -> dict:
|
|
"""
|
|
Get unified work directory paths for a specific book.
|
|
|
|
Structure:
|
|
.work/
|
|
├── {book_name}/
|
|
│ ├── book_structure.json
|
|
│ ├── manifest.json
|
|
│ ├── assets/
|
|
│ └── chunks/
|
|
"""
|
|
book_name = input_path.stem
|
|
work_root = Path(".work") / book_name
|
|
|
|
return {
|
|
"root": work_root,
|
|
"structure": work_root / "book_structure.json",
|
|
"manifest": work_root / "manifest.json",
|
|
"assets": work_root / "assets",
|
|
"chunks": work_root / "chunks",
|
|
}
|