Skip to content
Permalink
Browse files

[Old Viewer] Linter fixes

  • Loading branch information
jvalls-axa committed Oct 30, 2019
1 parent 40ac0c5 commit e1debdd4e2fe1a6192d20de67a3b7c59b0cb85fc
@@ -4,14 +4,14 @@ about: Create a bug report to help improve Parsr
title: ''
labels: bug
assignees: ''

---

**Summary**
A clear and concise description of what the bug is.

**Steps To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@@ -27,10 +27,11 @@ A clear and concise description of the behavior you observed.
If applicable, add screenshots to help explain your problem.

**Environment**
- Reference commit/version: [e.g. 0000ff]
- Other platform details: [e.g. npm v11, homebrew, ...]
- Hardware: [e.g. iPhone6, Core i7 128Gb, ...]
- OS: [e.g. iOS, Arch Linux]

- Reference commit/version: [e.g. 0000ff]
- Other platform details: [e.g. npm v11, homebrew, ...]
- Hardware: [e.g. iPhone6, Core i7 128Gb, ...]
- OS: [e.g. iOS, Arch Linux]

**Additional context**
Add any other context about the problem here.
@@ -4,7 +4,6 @@ about: Suggest an idea for a new Parsr feature
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
@@ -2,32 +2,7 @@

This page is a guide on how to use the API.

- [API Guide](#api-guide)
- [0. Introduction](#0-introduction)
- [1. Send Your Document: POST /document](#1-send-your-document-post-document)
- [`curl` command](#curl-command)
- [Status: 202 - Accepted](#status-202---accepted)
- [Status: 415 - Unsupported Media Type](#status-415---unsupported-media-type)
- [2. Get the queue status: GET /queue/{id}](#2-get-the-queue-status-get-queueid)
- [`curl` command](#curl-command-1)
- [Status: 200 - OK](#status-200---ok)
- [Status: 201 - Created](#status-201---created)
- [Status: 404 - Not Found](#status-404---not-found)
- [Status: 500 - Internal Server Error](#status-500---internal-server-error)
- [3. Get the results](#3-get-the-results)
- [3.1. JSON, Markdown and Text results](#31-json-markdown-and-text-results)
- [`curl` command](#curl-command-2)
- [Status: 200 - OK](#status-200---ok-1)
- [Status: 404 - Not Found](#status-404---not-found-1)
- [3.2. CSV List of Files: GET /csv/{id}](#32-csv-list-of-files-get-csvid)
- [`curl` command](#curl-command-3)
- [Status: 200 - OK](#status-200---ok-2)
- [Status: 404 - Not Found](#status-404---not-found-2)
- [3.3. CSV File: GET /csv/{id}/{page}/{table}](#33-csv-file-get-csvidpagetable)
- [`curl` command](#curl-command-4)
- [Status: 200 - OK](#status-200---ok-3)
- [Status: 404 - Not Found](#status-404---not-found-3)
- [4. Server Configuration Access](#4-server-configuration-access)
- [API Guide](#api-guide) - [0. Introduction](#0-introduction) - [1. Send Your Document: POST /document](#1-send-your-document-post-document) - [`curl` command](#curl-command) - [Status: 202 - Accepted](#status-202---accepted) - [Status: 415 - Unsupported Media Type](#status-415---unsupported-media-type) - [2. Get the queue status: GET /queue/{id}](#2-get-the-queue-status-get-queueid) - [`curl` command](#curl-command-1) - [Status: 200 - OK](#status-200---ok) - [Status: 201 - Created](#status-201---created) - [Status: 404 - Not Found](#status-404---not-found) - [Status: 500 - Internal Server Error](#status-500---internal-server-error) - [3. Get the results](#3-get-the-results) - [3.1. JSON, Markdown and Text results](#31-json-markdown-and-text-results) - [`curl` command](#curl-command-2) - [Status: 200 - OK](#status-200---ok-1) - [Status: 404 - Not Found](#status-404---not-found-1) - [3.2. CSV List of Files: GET /csv/{id}](#32-csv-list-of-files-get-csvid) - [`curl` command](#curl-command-3) - [Status: 200 - OK](#status-200---ok-2) - [Status: 404 - Not Found](#status-404---not-found-2) - [3.3. CSV File: GET /csv/{id}/{page}/{table}](#33-csv-file-get-csvidpagetable) - [`curl` command](#curl-command-4) - [Status: 200 - OK](#status-200---ok-3) - [Status: 404 - Not Found](#status-404---not-found-3) - [4. Server Configuration Access](#4-server-configuration-access)

## 0. Introduction

@@ -85,10 +60,10 @@ curl -X GET \

```json
{
"estimated-remaining-time": 30,
"progress-percentage": 10,
"start-date": "2018-12-31T12:34:56.789Z",
"status": "Detecting reading order..."
"estimated-remaining-time": 30,
"progress-percentage": 10,
"start-date": "2018-12-31T12:34:56.789Z",
"status": "Detecting reading order..."
}
```

@@ -102,11 +77,11 @@ _**NB:** `estimated-remaining-time` and `progress-percentage` are not working ye

```json
{
"id": "00cafe4463b9c12aac145b3ee8f00d",
"json": "/api/v1/json/00cafe4463b9c12aac145b3ee8f00d",
"csv": "/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d",
"text": "/api/v1/text/00cafe4463b9c12aac145b3ee8f00d",
"markdown": "/api/v1/markdown/00cafe4463b9c12aac145b3ee8f00d"
"id": "00cafe4463b9c12aac145b3ee8f00d",
"json": "/api/v1/json/00cafe4463b9c12aac145b3ee8f00d",
"csv": "/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d",
"text": "/api/v1/text/00cafe4463b9c12aac145b3ee8f00d",
"markdown": "/api/v1/markdown/00cafe4463b9c12aac145b3ee8f00d"
}
```

@@ -123,6 +98,7 @@ This error means that something went terribly wrong on the backend, probably an
## 3. Get the results

You can have results in different formats:

- JSON: [GET /json/{id}](https://axatechlab.github.io/Parsr/docs/api.html#api-Output-getJson)
- Markdown [GET /markdown/{id}](https://axatechlab.github.io/Parsr/docs/api.html#api-Output-getMarkdown)
- Raw text [GET /text/{id}](https://axatechlab.github.io/Parsr/docs/api.html#api-Output-getText)
@@ -174,10 +150,10 @@ curl -X GET \

```json
[
"/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d/1/1",
"/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d/2/1",
"/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d/2/2",
"/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d/3/1",
"/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d/1/1",
"/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d/2/1",
"/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d/2/2",
"/api/v1/csv/00cafe4463b9c12aac145b3ee8f00d/3/1"
]
```

@@ -220,19 +196,19 @@ This error means that the result file doesn't exist. Maybe `{page}` and `{table}

The API can also be queried to gain access to the following server assts:

1. **Default Configuration**: The server's default configuration can be queried (at `/api/v1/default-config`) using:
1. **Default Configuration**: The server's default configuration can be queried (at `/api/v1/default-config`) using:

curl -X GET \
http://localhost:3001/api/v1/default-config
curl -X GET \
http://localhost:3001/api/v1/default-config

2. **List of Modules**: The list of all usable modules can be queried from the server (at `/api/v1/modules`) using:
2. **List of Modules**: The list of all usable modules can be queried from the server (at `/api/v1/modules`) using:

curl -X GET \
http://localhost:3001/api/v1/modules
curl -X GET \
http://localhost:3001/api/v1/modules

3. **Module Configuration**: A module's configuration file, which includes name, description and each module parameter's default value and range can be queried (at `/api/v1/module-config/<module_name>`) using:
3. **Module Configuration**: A module's configuration file, which includes name, description and each module parameter's default value and range can be queried (at `/api/v1/module-config/<module_name>`) using:

curl -X GET \
http://localhost:3001/api/v1/module-config/table-detection
curl -X GET \
http://localhost:3001/api/v1/module-config/table-detection

... which will fetch the configuration file for the table-detection module.
... which will fetch the configuration file for the table-detection module.
@@ -1,16 +1,6 @@
# Configuration File

- [Configuration File](#configuration-file)
- [1. Structure](#1-structure)
- [2. Extractor Config](#2-extractor-config)
- [2.1. Extractor Tools](#21-extractor-tools)
- [2.2. Language](#22-language)
- [3. Cleaner Config](#3-cleaner-config)
- [4. Output Config](#4-output-config)
- [4.1. Output Format](#41-output-format)
- [4.2. Granularity](#42-granularity)
- [4.3. Include Marginals](#43-include-marginals)
- [5. Exempli gratia](#5-exempli-gratia)
- [Configuration File](#configuration-file) - [1. Structure](#1-structure) - [2. Extractor Config](#2-extractor-config) - [2.1. Extractor Tools](#21-extractor-tools) - [2.2. Language](#22-language) - [3. Cleaner Config](#3-cleaner-config) - [4. Output Config](#4-output-config) - [4.1. Output Format](#41-output-format) - [4.2. Granularity](#42-granularity) - [4.3. Include Marginals](#43-include-marginals) - [5. Exempli gratia](#5-exempli-gratia)

To configure the pipeline and choose what modules will be called and with what parameters, you have to provide a JSON file.
There is only a few required keys:
@@ -150,7 +140,7 @@ The `includeMarginals: boolean` parameter allows to chose whether the output wil
"redundancy-detection",
"table-detection",
["header-footer-detection", { "maxMarginPercentage": 15 }],
["reading-order-detection", { "minColumnWidthInPagePercent": 15 } ],
["reading-order-detection", { "minColumnWidthInPagePercent": 15 }],
"link-detection",
["words-to-line", { "maximumSpaceBetweenWords": 100 }],
"lines-to-paragraph",
@@ -4,23 +4,23 @@

In the root of the repository, launch:

```
docker-compose up
```
```
docker-compose up
```

This will start 2 containers :
* one for the API listening on http://localhost:3001
* the second one for the demo UI listening on http://localhost:8080
This will start 2 containers :

Note: a docker volume will be created at first launch so that the data will be kept at containers restart.
- one for the API listening on http://localhost:3001
- the second one for the demo UI listening on http://localhost:8080

Note: a docker volume will be created at first launch so that the data will be kept at containers restart.

## Build Parsr

If you want to build parsr by yourself, at the root of the project, launch:

```
docker-compose -f docker-compose-build.yml build
```
```
docker-compose -f docker-compose-build.yml build
```

This will build Parsr, along with its dependencies.

0 comments on commit e1debdd

Please sign in to comment.
You can’t perform that action at this time.