-
Notifications
You must be signed in to change notification settings - Fork 2
How to Write a Book
This guide provides a structured approach to starting a new book project using provided scripts. Follow these steps to set up your project, write content, and generate various book formats.
Before you start, install the necessary tools:
sudo apt update
sudo apt install pandoc calibrebrew install pandoc calibre✅ Precondition: You’ve already created your own repository based on this template.
Run the following script to automatically generate a well-structured directory layout for your book project:
chmod +x create_project_structure.sh
./create_project_structure.shThis will create the following structure (replace book-project/ with your actual repository name):
book-project/
│── manuscript/
│ ├── chapters/
│ │ ├── 01-introduction.md
│ │ ├── 02-chapter-title.md
│ ├── front-matter/
│ │ ├── toc.md
│ │ ├── preface.md
│ │ ├── acknowledgments.md
│ │ ├── foreword.md
│ ├── back-matter/
│ │ ├── appendix.md
│ │ ├── glossary.md
│ │ ├── faq.md
│ │ ├── bibliography.md
│ │ ├── index.md
│ │ ├── about-the-author.md
│── assets/
│── config/
│── output/
│── README.md
│── LICENSE
- Create or edit markdown files in
manuscript/chapters/ - Add your content chapter-by-chapter.
Example:
manuscript/chapters/01-introduction.md
Edit config/metadata.yaml and config/styles.css to customize your book's metadata and style.
Example metadata:
title: "My Awesome Book"
author: "Your Name"
date: "2025"
isbn: "123-4567890123"Use the preferred script:
- Recommended: use the export commands provided by manuscripta
Run the script:
poetry run full-exportOutputs will be in the output/ directory:
- EPUB
- DOCX
- Markdown
- Open
output/book.pdffor a preview. - Modify content in
manuscript/chapters/as needed. - Re-run the export script to regenerate outputs.
Once you're satisfied:
-
Print it: Upload
book.pdfto a printing service like Amazon KDP. -
Ebooks: Upload
book.epubandbook.mobito Kindle Direct Publishing or other platforms.
Enhance your book readability by adding:
- Preface, Acknowledgments, Epilogue
- Glossary, Bibliography, Appendix
- Index, About the Author
For detailed usage of the export script, see the export documentation.
🎉 Congratulations! You are now ready to publish your book! 🚀
- 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
- Remove Bold from Markdown Headers
- Converting Markdown Bullets to Typographic Bullets
- 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)
**Libraries: ** manuscripta | manuscript-tools