-
Couldn't load subscription status.
- Fork 2
Generate Project Structure
For writing a book, an organized directory structure helps manage content, references, and publishing formats efficiently. Below is a recommended structure:
book-project/
βββ manuscript/
β βββ chapters/
β β βββ 01-introduction.md
β β βββ 02-chapter.md
β β βββ ...
β βββ front-matter/
β β βββ toc.md
β β βββ preface.md
β β βββ foreword.md
β β βββ acknowledgments.md
β βββ back-matter/
β β βββ about-the-author.md
β β βββ appendix.md
β β βββ bibliography.md
β β βββ faq.md
β β βββ glossary.md
β β βββ index.md
β βββ figures/
β βββ tables/
β βββ references.bib
βββ assets/
β βββ covers/
β βββ figures/
β βββ diagrams/
β βββ infographics/
βββ config/
β βββ metadata.yaml
β βββ styles.css
β βββ template.tex
βββ output/
β βββ book.pdf
β βββ book.epub
β βββ book.mobi
β βββ book.docx
βββ scripts/
β βββ full_export_book.py
β βββ update_metadata_values.py
β βββ init_book_project.py
β βββ ...
βββ LICENSE
βββ pyproject.toml
βββ README.md
-
manuscript/
Contains the main content organized into:-
chapters/,front-matter/, andback-matter/(Markdown or LaTeX)
-
-
assets/
Stores images and visual material like:-
Cover images
-
Diagrams and infographics
-
-
config/
Project configuration files:-
metadata.yamlholds book metadata -
styles.cssand optionaltemplate.texfor styling
-
-
output/
All exported formats will be saved here -
scripts/
Automation tools for exporting and managing metadata.
π Useinit_book_project.pyto create the structure.
β οΈ The older shell scriptcreate_project_structure.shis now deprecated.
To create this structure automatically:
poetry run init-book-projectThis Python script:
-
Creates all required directories and base files
-
Initializes
metadata.yaml,metadata_values.json -
Adds a JSON config for image generation workflows
π Read more here:
π π¦ Project Initialization β Wiki
To add new directories (e.g. exercises/), you can:
-
Edit the Python script
scripts/init_book_project.py -
Add custom paths to the
directorieslist
For example:
directories = [
"manuscript/exercises",
...
]Then run:
poetry run init-book-project- π 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.