https://github.com/william-herring/openbook

https://github.com/william-herring/openbook-textbook-engine

Setup - Openbook Textbook Engine

Refer to the online docs

Setup - Openbook

Prerequisites

Clone the repository and install packages

  1. Clone the repository

    	> git clone <https://github.com/william-herring/openbook.git>
    
  2. Install Weasyprint

  3. Navigate to the project directory and install Python packages

    > cd /path/to/openbook
    > pip3 install -r requirements.txt
    
  4. Install Tailwind

    > npm install -D tailwindcss
    

Create the database

  1. Start a Postgres server

  2. Create the database

    > createdb openbookdb
    
  3. Configure .env in the project directory. DATABASE_URI is the Postgres connection string to your database, and SECRET_KEY is any randomly generated base-64 encoded string. Below is an example.

    DATABASE_URI="postgresql://williamherring@localhost/openbookdb"
    SECRET_KEY="wicoNEY2vRByZYs90TYSGw=="
    

Start the server

  1. Start the TailwindCSS service

    > npm run tailwind