You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
XPPL/README.md

82 lines
1.9 KiB
Markdown

7 years ago
# XPUB Library
Library running on Flask and SQLight (maybe to be replaced with a python shelve)
## Installation
7 years ago
Install the required dependencies:
$ pip3 install -r requirements.txt
7 years ago
Initialise database
7 years ago
$ bash init_db.sh
7 years ago
### Install rqlite
7 years ago
#### Linux
To download and start rqlite on Linux, execute the following in a shell.
7 years ago
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
7 years ago
#### 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
### Further install notes (bugs)
7 years ago
* create the covers folder inside the uploadsfolder
7 years ago
* don't forget to chmod the uploads and coverfolder ;-)
* For Mac users -> brew install imagemagick@6 in order to install wand
7 years ago
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:
`brew install imagemagick@6`
7 years ago
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
## Run the program
Initialize rqlite database on one terminal (from rqlite install directory)
$ ./rqlited ~.node
Run the script in another terminal (from XPPL directory):
7 years ago
python3 run.py
7 years ago
7 years ago
## API
Has currently 2 entrypoints:
`/api/books`
GETs all the books in the database
`/api/book/id`
GETs a specific book by its id