https://github.com/johncmanuel/writebook
Python script that automates the creation of .docx files from a given template file, specifically one tailored for book manuscripts.
https://github.com/johncmanuel/writebook
Last synced: over 1 year ago
JSON representation
Python script that automates the creation of .docx files from a given template file, specifically one tailored for book manuscripts.
- Host: GitHub
- URL: https://github.com/johncmanuel/writebook
- Owner: johncmanuel
- License: mit
- Created: 2021-03-21T18:35:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T18:44:15.000Z (over 5 years ago)
- Last Synced: 2025-02-03T19:59:24.253Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.python.org/)
[](https://lbesson.mit-license.org/)
# writeBook
Automatically copies and pastes a .docx file from a template document that contains all the industry standards for book manuscripts. This eliminates the hassle of setting up the document and working environment before writing a book.
This is only tested for the Windows OS.
## Command
```
book
```
## Preparations
Download templates here: https://kdp.amazon.com/en_US/help/topic/G201834230, create a 'Templates' folder, open the downloaded file and choose a language of your choice. Then, copy and paste all the .docx files into 'Templates'. I choose to do it this way rather than committing the template files themselves because I'm not sure if I'm legally allowed to republish Amazon KDP's content.
Alternatively, you can create your own .docx template with your own preferences and styles.
### Set up working environment
```
py -m venv
cd
git clone https://github.com/johncmanuel/writeBook.git
pip install requirements.txt
```
Run venv
```
cd Scripts && activate.bat && cd ..
```
### Environment Variables
In your local machine, add working environment to 'Path'.
In the working directory, create an .env file and add the following variables:
```
# .env
BOOK_DIR=
TEMPLATES_DIR=
PATH_TO_WORD=
```
\*However, `PATH_TO_WORD` can be used for any other writing software.