PDF-comparison for baangt test automation suite

bernhardbuhl 10d8a99257 Local changes for Debugging. 3 years ago
api_frontend b52ce9b3c9 Changes 4 years ago
images b52ce9b3c9 Changes 4 years ago
pdf_comaprison_flask_api 10d8a99257 Local changes for Debugging. 3 years ago
.gitignore ab29e5f14d Updated gitignore 3 years ago
README.md 10d8a99257 Local changes for Debugging. 3 years ago

README.md

PDF Comparison Microservice

Installation

pip install requirements.txt

Quick Start

First we need to set Flask in our environment

For Windows set FLASK_APP=app.py

For Linux export FLASK_APP=app.py

Now for Database creation

flask db init
flask db migrate
flask db upgrade

To run the microservice, simply use this command

flask run

The app will start running on server 127.0.0.1:5000

Prerequisits after download:

  • create folder output in folder /pdf_comparison_flask_api
  • create folder temp in folder /pdf_comparison_flask_api

Debugging

export FLASK_ENV=development before flask run

Using API Endpoints with Frontend

  • Run ./api_frontend/index.html in your browser

The APP contains two sections

Upload Reference File

This section contains three fields

  • Reference File
  • Description
  • Regex

Actions

  • Fill in the info. After you upload the form by clicking Upload button, data will be stored in database and updated in the below table.
  • Click on Delete link data will be deleted from database and updated in the below table.
  • Click on Update link after taht choose a file and data will be updated in database and in below table.

Upload Original File

This section contains three fields

  • Original File
  • Description
  • UUID of Reference File

Actions

  • Fill in the info. After you upload the form by clicking Upload button, data will be stored in database and updated in the below table, on success it will automatically call the compare function to get the comparison of files.
  • Click on Delete link data will be deleted from database and updated in the below table.

API ENDPOINTS

Screenshots

alt Picture

alt Picture