Skip to content
Snippets Groups Projects
Verified Commit b15195a1 authored by David Beniamine's avatar David Beniamine
Browse files

Update doc

Fix #6
parent d60f67c6
No related branches found
No related tags found
No related merge requests found
# Web services based on Python scripts
# Unl2rdf web demo
Initially deveopped to deploy a serialization converter from the official UNL format to the proposed RDF-UNL format.
This is a [dockerized](https://www.docker.com/) webdemo of the [unl2rdf java parser](https://gitlab.tetras-libre.fr/unl/unl2rdf)
## How to use
## Requirements
+ [Docker](https://docs.docker.com/get-docker/)
+ [Docker-compose](https://docs.docker.com/compose/install/)
## Install
```bash
cp .env.sample .env
docker-compose up
```
The first time this process will take a while as it has to [build](#build-process) the docker images and the [java parser](https://gitlab.tetras-libre.fr/unl/unl2rdf).
Then open in a browser `http://localhost:5000`
## build process
The docker build process consists in three steps
1. On create a debian base image with jdk
2. Create a build image that retrieve the unl2rdf parser sources and builds it
3. Create an image to run the flask application
### Triggering a rebuild
Docker caches every step of the build, if the java parser has changed, `docker-compose build` will not detect it, so you have to change `GIT_REF=` in the `.env` file to point to the desired commit, branch or tag. Then you can run `docker-compose build` and only the required steps to rebuild the java parser will run again.
## Developpement
This is a one page [flask](https://flask.palletsprojects.com) app to convert unl to rdf, the web app is full python, everything is in the file `src/app/app.py`.
This is a one page [flask](https://flask.palletsprojects.com) app to acces the [unl2rdf parser](https://gitlab.tetras-libre.fr/unl/unl2rdf), the web app is full python, everything is in the file `src/app/app.py` and in `src/app/static/<css|js>`
The display rendering uses the templates in the directory `src/app/templates` see [flakes templating](https://flask.palletsprojects.com/en/1.1.x/quickstart/#rendering-templates).
Js and css dependencies are installed via npm in directory `src/app/static`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment