Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.57 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.57 KB

Python server for scholarly web annotations

An experimental Python Flask RESTplus server based on the W3C Web Annotation standard, that implements both the WA data model and the WA protocol. It is developed in tandem with the Scholarly Web Annotation Client and will eventually be replaced by a proper annotation server.

The server uses Elasticsearch for storage and retrieval of annotations. When running the SWA server, make sure you have a running Elasticsearch instance. Configuration of the Elasticsearch server is done in settings.py. This repository contains a file settings-example.py that shows how to configure the connection to Elasticsearch. Rename or copy this to settings.py to make sure the SWA server can read the configuration file.

How to install

Clone the repository:

git clone https://github.com/CLARIAH/scholarly-web-annotation-server.git

Install the required python packages (for pipenv see https://docs.pipenv.org/):

pipenv install

How to run

Make sure you have a settings.py file. This repository comes with an example settings file setttings-exampl.py. The simplest way to get started is to copy that file to settings.py:

cp settings-example.py settings.py

Start the server:

pipenv run python annotation_server.py

and point your browser to localhost:3000

How to modify

Run all tests:

make test_server