Book By AI
Use AI to generate high-quality ebooks
简体中文 | English
AUTOMATIC BOOK GENERATION DEMO
- Manually input text: numbers within ten
- Total generation time: about 2 hours
- Cost: Around $0.6 (cost for generating 30 images)
- Online reading: English Book | 中文样书
Video Tutorial
in Chinese
Youtube | Bilibili
Prerequisites
- git
- nodejs
- terminal
- mdbook installed
How to Use
- Get OpenAI API key or deploy your own AiAPI
- git clone https://github.com/easychen/book-by-ai.git BBA
- cd BBA
- npm install
- cp .env.example .env
- Configure .env according to comments
- node bba.js book // Run full process from scratch
- Follow prompts to input content
- cd output// && mdbook serve // Preview locally
- cd output// && mdbook build // Generate html
Command Description
- node bba.js book@help // Show help
- node bba.js book@title // Generate title
- node bba.js book@index // Generate table of contents (chapters)
- node bba.js book@sections // Generate table of contents (sections)
- node bba.js book@write // Write section content
- node bba.js book@make // Generate mdbook project
- node bba.js book@addImage // Generate cover and section images
- node bba.js book@update // Rewrite a section
- node bba.js book@translate // Translate sections