From 909191d3c75d7e05e823ad788ec41d7aa011d444 Mon Sep 17 00:00:00 2001 From: ana Date: Tue, 13 Sep 2022 14:20:14 +0200 Subject: [PATCH] added current install errors to README --- README.md | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4785a39..949f3c0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# +# The boilerplate uses the python framework flask to run the webinterface and to generate the HTML of the book. To generate the PDF it uses the javascript library pagedjs together with the chromium webbrowser in headless mode. @@ -22,6 +22,37 @@ Then install [pagedjs-cli](https://gitlab.coko.foundation/pagedjs/pagedjs-cli), `npm install -g pagedjs-cli` +___ in case pagedjs-cli does not show up, follow these instructions: + + check the version of node (this should be: v16.17.0) + '$ node --version' + + check if nvm is installed + '$ nvm' + + if nvm does not show up, install nvm with the following command: + '$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash' + + copy the following code into the terminal: + 'export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' + + install the latest version of nvm: + '$ nvm install --lts' + + check the version of node (this should be: v16.17.0) + '$ node --version' + + now install paged.js: + $ npm install -g pagedjs-cli + + check if it is installed: + $ whereis pagedjs-cli + +add this path to settings.py +/home/ana/.nvm/versions/node/v16.17.0/bin/pagedjs-cli + Finally edit a copy of `settings.example.py` and save it as `settings.py`. It is important to set the `PAGEDJS_BINARY_PATH`, you should be able to find it by running: `whereis pagedjs-cli`. @@ -50,4 +81,4 @@ In the [documentation of paged.js](https://pagedjs.org/documentation/) a lot of Todo -Note: this boilerplate does not make any effort at rate-limiting. \ No newline at end of file +Note: this boilerplate does not make any effort at rate-limiting.