<commit_before>[![Coverage][codecov-image]][codecov-url]

# Install

1. Run `./script/install-docker` to install docker and docker-compose.

**For Windows Users:** If your username contains whitespace, the setup and installation will not work. Create a new user without whitespace in the username in order to succesfully complete installation.

# Create a baked pdf for a new book

1. Run `docker-compose run --rm -e HOST=katalyst01.cnx.org fetch-book --with-resources intro-business` to download the cnxml from the server.
   - **Note:** To see the list of books available see `./books.txt`
1. Run `docker-compose run --rm assemble-book intro-business` to create the single-file HTML for the book.
1. Run `docker-compose run --rm bake-book intro-business` to convert the single-file HTML locally into the "baked" book.
1. Run `docker-compose run --rm mathify-book intro-business` to convert all the math to svg.
1. Run `docker-compose run --rm build-pdf intro-business` to create the pdf.

## Run scripts
You can run commands in Docker:

`docker-compose run --rm command ...`

To run something like:

`./script/build-styles`

just prepend with ./script/run:

`./script/run ./script/build-styles`

or to run tests, run:

`./script/run ./script/test`


## Add a New Book to the config
<commit_msg>update readme noting the long assemble w/ exercises time<commit_after>[![Coverage][codecov-image]][codecov-url]

# Install

1. Run `./script/install-docker` to install docker and docker-compose.

**For Windows Users:** If your username contains whitespace, the setup and installation will not work. Create a new user without whitespace in the username in order to succesfully complete installation.

# Create a baked pdf for a new book

1. Run `docker-compose run --rm -e HOST=katalyst01.cnx.org fetch-book --with-resources intro-business` to download the cnxml from the server.
   - **Note:** To see the list of books available see `./books.txt`
1. Run `docker-compose run --rm assemble-book intro-business` to create the single-file HTML for the book.
   1. If the book has exercises that are being fetched from the exercises db, assembling a book will take 20+ minutes for the first time. 
1. Run `docker-compose run --rm bake-book intro-business` to convert the single-file HTML locally into the "baked" book.
1. Run `docker-compose run --rm mathify-book intro-business` to convert all the math to svg.
1. Run `docker-compose run --rm build-pdf intro-business` to create the pdf.

## Run scripts
You can run commands in Docker:

`docker-compose run --rm command ...`

To run something like:

`./script/build-styles`

just prepend with ./script/run:

`./script/run ./script/build-styles`

or to run tests, run:

`./script/run ./script/test`


## Add a New Book to the config

{'fraction_non_alphanumeric': 0.10490266762797404, 'fraction_numerical': 0.00684931506849315, 'mean_word_length': 3.6638655462184873, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6138495', 'n_tokens_mistral': 857, 'n_tokens_neox': 817, 'n_words': 371}