-
Couldn't load subscription status.
- Fork 2
Project Initialization
β οΈ Deprecated: The shell scriptcreate_project_structure.shis now deprecated. β Please use the new Python-based initializer instead:init_book_project.py
The new init_book_project.py script offers:
- Cross-platform compatibility (Windows, macOS, Linux)
- More readable and maintainable code
- Poetry integration for smooth CLI usage
- Auto-creation of metadata files and a JSON template for image generation
First, make sure dependencies are installed:
poetry installor if pyproject.toml changed significantly since poetry.lock was last generated. Run the following command to fix the lock file.
poetry lockand then run again:
poetry installThen you can run the initializer:
poetry run init-book-projectThis will:
- Prompt you for project name, book title, author name, and description
- Create the full book folder structure (manuscript, config, assets, output, etc.)
- Generate default content files (README, LICENSE, chapter stubs, metadata files)
- Initialize a ready-to-use JSON image prompt configuration in
scripts/data/
After running:
poetry run init-book-projector the shortcut:
poetry run init-bpyou will be prompted to enter:
- π Project name (used for folder and export base name)
- π Project description (used in
pyproject.toml) - π Book title (used in export metadata)
- π€ Author name (used in export metadata)
These values will be automatically applied to key files:
| File | Field(s) Modified | Notes |
|---|---|---|
pyproject.toml |
tool.poetry.name, tool.poetry.description
|
Updates project name and description |
scripts/full_export_book.py |
OUTPUT_FILE, metadata template string |
Changes the export base name and Pandoc metadata defaults |
config/metadata.yaml |
title, author, description, date, language
|
Pre-fills metadata for Pandoc export |
π Enter your project name (e.g., 'ai-for-everyone'): my-book
π Enter a short description of your project: A journey into friendly AI.
π Enter your book title: AI for Everyone
π€ Enter the author's name: Asterios Raptis
This will result in:
-
pyproject.toml:name = "my-book" description = "A journey into friendly AI."
-
full_export_book.py:OUTPUT_FILE = "my-book" ... f.write("title: 'AI for Everyone'\nauthor: 'Asterios Raptis'\ndate: '2025'\nlang: 'en'\n")
-
config/metadata.yaml:title: "AI for Everyone" author: "Asterios Raptis" description: "A journey into friendly AI." date: "2025" language: "en" ...
You no longer need to manually edit pyproject.toml or full_export_book.py after project setup.
If you want to reapply or change these values later, just re-run the initializer.
Directories:
manuscript/chaptersmanuscript/front-mattermanuscript/back-matterassets/coversassets/authorassets/figures/diagramsassets/figures/infographicsconfigoutputscripts/data
Files:
- Chapter placeholders (
01-chapter.md,02-chapter.md) - Front and back matter files (
toc.md,preface.md,glossary.md, etc.) - Config files:
metadata.yaml,metadata_values.json,styles.css,keywords.md, etc. - Image generation config:
scripts/data/image_project_config.json - README and LICENSE templates
book-project/
βββ manuscript/
β βββ chapters/01-chapter.md
β βββ front-matter/preface.md
β βββ back-matter/epilogue.md
βββ assets/
β βββ covers/
β βββ figures/diagrams/
βββ config/
β βββ metadata.yaml
β βββ metadata_values.json
βββ output/
βββ scripts/
β βββ data/image_project_config.json
βββ README.md
βββ LICENSE
If you previously used this deprecated script:
scripts/create_project_structure.shyou should now remove it from your workflow and use:
poetry run init-book-projectThe Python version can easily be extended to:
- Generate additional chapters
- Accept command-line arguments (e.g. for CI/CD or automation)
- Apply different templates (e.g., children's books, whitepapers, technical manuals)
- π Home
- Project Initialization
- Generate Project Structure
- How to Write a Book
- Developer Workflow & Makefile
- Chapter File Generator
- Generate Images
- Convert Markdown Images
- Bulk Change File Extensions
- Restructure Chapters
- Translate Markdown with DeepL
- Translate with LM Studio
- Translation CLI Commands
- Shortcuts for Translation
- Automatic Book Export
- Shortcuts for Export
- Export HTML Chapters (Comics)
- Export to EPUB 2
- Pandoc Batch Processor
- Export HTML Books to PDF (KDP Ready)
Use this sidebar to navigate all key workflows β from setup to translation, export, and testing.