Skip to content

DataSeer/sciscore-tools

 
 

Repository files navigation

sciscore-tools

Description

  • This module is a nodejs wrapper of this tool.
  • The Python scripts/libraries are encapsulated in a web server (API).
  • The container must be "connected" to the DataSeer (DS) file system (FS). It will "share" the same FS.
  • You should not open the port used by the container (internal, non-public process).
  • It will write the results files (report.json and [DS ID file].csv) directly to the DS FS. You must manage these files in the DS worklow

Install

Docker

You must add auth.json & methods-model.bin files in the lib/ folder (more infos here).

Create the conf/conf.json file (based on conf/conf.json.default file).

Some useful command lines for creating images and deploying containers

# build the new image (delete the old ones afterwards)
docker build -t sciscore-tools:latest .
# delete old container
docker rm -f sciscore
# run a new container
docker run -p 3200:3200 -v /home/user/dataseer-web/data:/app/data --name sciscore sciscore-tools:latest

Available routes

(POST) /processFile/

Description

This route process the given file (using sciscore-tools).

Parameters

Type Parameters Requirement Description
String filePath required Path of the given file (.pdf or .xml)

How to request

# Will return the process logs (JSON formated)
curl -X POST "http://localhost:3200/processFile" -F "filePath=/my/file/path/file.pdf"

Result

{
  "err": false,
  "res": { // process logs
    "stderr": [],
    "stdout": []
  }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 66.6%
  • JavaScript 31.1%
  • Dockerfile 2.3%