A programming parody of “One‑Punch Man”, generated chapter‑by‑chapter with AI. Content is authored in English and translated to other languages (currently Russian). The project has been refactored into a modular, reusable monorepo with a dedicated generator CLI and a separate Jekyll site adapter.
one-review-man/
├── book-generator/ # 📚 Core library + CLI (bin/book)
│ ├── lib/book_core/ # Core generation/translation engine
│ └── bin/book # CLI entrypoint (Thor)
├── book-generator/templates/
│ └── jekyll/ # Jekyll site template (layouts, includes, assets)
├── books/ # 📖 Book content and per-book config
│ └── one-review-man/
│ ├── data/ # Book metadata, characters, logs
│ ├── content/
│ │ ├── chapters/ # English chapters + translations (*.ru.md)
│ │ └── characters/ # English character pages + translations
│ └── data/ # Book metadata, characters, settings
└── README.md
- No root‑level runtime “bin”. All commands go through
book-generator/bin/book. - Each book folder is self‑contained. You can create more books under
books/and use the same generator.
All commands accept --book-dir (or -b) to work from any current directory.
# Initialize a new (empty) book folder
book-generator/bin/book init --book-dir books/one-review-man
# Generate the next English chapter (set a model if needed)
book-generator/bin/book generate chapter \
--model gpt-5 \
--book-dir books/one-review-man
# Inspect the exact prompt used for the next (or specific) chapter
book-generator/bin/book generate prompt --book-dir books/one-review-man
book-generator/bin/book generate prompt 7 --book-dir books/one-review-man
# Translate everything to Russian
book-generator/bin/book translate all ru --book-dir books/one-review-man
# Prepare a Jekyll site with the current book content
book-generator/bin/book jekyll generate \
--book-dir books/one-review-man \
--dest books/one-review-man/site
# Build/serve the site (run inside the generated site directory)
cd books/one-review-man/site
bundle install
bundle exec jekyll serveTips:
- Use
MOCK_AI=truefor deterministic, offline runs (no API calls). - Use
--debug(orDEBUG_AI=1) to write request/response artifacts toBOOK_DIR/tmp/ai_debug/.
Per‑book config lives at BOOK_DIR/data/settings.yml. Example LLM configuration:
llm:
provider: openai
model: gpt-4o-mini
temperature: 0.7
timeout: 240
# openai_base_url: "https://api.openai.com/v1" # optional
# openai_api_key: "env-or-placeholder" # typically use ENV OPENAI_API_KEY
default_options:
max_tokens: 12000
task_options:
generation:
max_tokens: 8000
translation:
max_tokens: 12000Model compatibility helpers:
gpt-5*/o3*usemax_completion_tokensinstead ofmax_tokensand may ignoretemperature.- The generator handles these automatically and retries on specific API errors.
- Generate English chapter
- Uses
book-generator/lib/book_core/chapter_generator.rbwith rich prompts frombook-generator/lib/book_core/prompts/. - Writes to
BOOK_DIR/content/chapters/NNN-chapter.mdand updatesdata/book_metadata.yml. - If new characters appear, profiles are generated and saved to
data/characters.ymlandcontent/characters/.
- Translate
- Translates chapters and characters (e.g., to Russian) and writes
.ru.mdfiles alongside English ones. - Glossary is auto‑built from existing character translations for name consistency.
- Build site
book jekyll generatecopies the book content and template into a site folder.- Build locally with Bundler/Jekyll and deploy (including GitHub Pages).
- Show the effective prompt without calling the API:
book-generator/bin/book generate prompt [NUMBER] --book-dir BOOK_DIR
- Enable debug artifacts for real API calls:
--debugflag (orDEBUG_AI=1env)- Files:
tmp/ai_debug/request_parameters.json,response_raw.json,chapter_generation_raw*.json
- Offline mode:
MOCK_AI=truedisables API calls and produces deterministic content for tests.
Core library:
cd book-generator
bundle exec rspecMIT
— “One Review Man”: where AI meets programming parody, one perfect pull request at a time. 🤖📚💻⚡