Reorganizing installation instructions

Reorganizing installation instructions + better Markdown formatting of commands (copy&paste wouldn't work)
master
svilayphiou 5 years ago
parent 355e4203f8
commit 342b82c467

@ -1,77 +1,81 @@
# XPUB Library # XPUB Library
Library running on Flask and SQLight (maybe to be replaced with a python shelve) Library running on Flask and SQLight (maybe to be replaced with a python shelve)
requirements.txt ## Installation
$ pip3 install -r requirements.txt
install rqlite Install the required dependencies:
install pyrqlite
install sqlalchemy-rqlite
initialize rqlite database $ pip3 install -r requirements.txt
$ ./rqlited ~.node
initialise database
$ bash init_db.sh
run script Initialise database
python3 run.py
$ bash init_db.sh
## API
has currently 2 entrypoints: ### Install rqlite
/api/books #### Linux
GETs all the books in the database To download and start rqlite on Linux, execute the following in a shell.
/api/book/id curl -L https://github.com/rqlite/rqlite/releases/download/v4.3.0/rqlite-v4.3.0-linux-amd64.tar.gz -o rqlite-v4.3.0-linux-amd64.tar.gz
GETs a specific book by its id tar xvfz rqlite-v4.3.0-linux-amd64.tar.gz
cd rqlite-v4.3.0-linux-amd64
./rqlited ~/node.1
## Installation #### OSX
Further installnotes (bugs) To download and start rqlite on OSX, execute the following in a shell.
curl -L https://github.com/rqlite/rqlite/releases/download/v4.3.0/rqlite-v4.3.0-darwin-amd64.tar.gz -o rqlite-v4.3.0-darwin-amd64.tar.gz
tar xvfz rqlite-v4.3.0-darwin-amd64.tar.gz
cd rqlite-v4.3.0-darwin-amd64
./rqlited ~/node.1
### Further install notes (bugs)
* create the covers folder inside the uploadsfolder * create the covers folder inside the uploadsfolder
* don't forget to chmod the uploads and coverfolder ;-) * don't forget to chmod the uploads and coverfolder ;-)
* For Macusers -> brew install imagemagick@6 in order to install wand * For Mac users -> brew install imagemagick@6 in order to install wand
For those on mac and using homebrew, it seems like Wand doesn't support imagemagick 7 yet as mentioned in other answers. For those on mac and using homebrew, it seems like Wand doesn't support imagemagick 7 yet as mentioned in other answers.
There's a new brew formula for Imagemagick 6 which can be used to install the older version in the meanwhile: There's a new brew formula for Imagemagick 6 which can be used to install the older version in the meanwhile:
brew install imagemagick@6 `brew install imagemagick@6`
Create a symlink to this newly installed dylib file as mentioned in other answer to get things working. Create a symlink to this newly installed dylib file as mentioned in other answer to get things working.
ln -s /usr/local/Cellar/imagemagick@6/<your specific 6 version>/lib/libMagickWand-6.Q16.dylib /usr/local/lib/libMagickWand.dylib
ln -s /usr/local/Cellar/imagemagick@6/<your specific 6 version>/lib/libMagickWand-6.Q16.dylib /usr/local/lib/libMagickWand.dylib
## install rqlite
### Linux
To download and start rqlite on Linux, execute the following in a shell.
curl -L https://github.com/rqlite/rqlite/releases/download/v4.3.0/rqlite-v4.3.0-linux-amd64.tar.gz -o rqlite-v4.3.0-linux-amd64.tar.gz
tar xvfz rqlite-v4.3.0-linux-amd64.tar.gz
cd rqlite-v4.3.0-linux-amd64
./rqlited ~/node.1
### OSX
To download and start rqlite on OSX, execute the following in a shell.
curl -L https://github.com/rqlite/rqlite/releases/download/v4.3.0/rqlite-v4.3.0-darwin-amd64.tar.gz -o rqlite-v4.3.0-darwin-amd64.tar.gz
tar xvfz rqlite-v4.3.0-darwin-amd64.tar.gz
cd rqlite-v4.3.0-darwin-amd64
./rqlited ~/node.1
## Run the program
Initialize rqlite database on one terminal (from rqlite install directory)
$ ./rqlited ~.node
## install pyrqlite Run the script in another terminal (from XPPL directory):
git clone https://github.com/rqlite/pyrqlite.git python3 run.py
pip install ./pyrqlite
## install sqlalchemy-rqlite
git clone https://github.com/rqlite/sqlalchemy-rqlite.git
cd sqlalchemy-rqlite
sudo python3 ./setup.py install ## API
Has currently 2 entrypoints:
`/api/books`
GETs all the books in the database
`/api/book/id`
GETs a specific book by its id

Loading…
Cancel
Save