This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
275c042
commit 12b5a24
Showing
10 changed files
with
349 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
@echo off | ||
|
||
rem ---------------------------------------------------------------------------- | ||
rem | ||
rem run_test.bat: Document Content Recognition. | ||
rem | ||
rem ---------------------------------------------------------------------------- | ||
|
||
setlocal EnableDelayedExpansion | ||
|
||
set DCR_CHOICE_ACTION_DEFAULT=db_c | ||
|
||
if ["%1"] EQU [""] ( | ||
echo ========================================================= | ||
echo all - Run the complete processing of all new documents | ||
echo db_c - Create the database | ||
echo m_d - Run the installation of the necessary 3rd party packages for development and run the development ecosystem | ||
echo m_p - Run the installation of the necessary 3rd party packages for production and compile all packages and modules | ||
echo p_i - Process input folder | ||
echo --------------------------------------------------------- | ||
set /P DCR_CHOICE_ACTION="Enter the desired action [default: %DCR_CHOICE_ACTION_DEFAULT%] " | ||
|
||
if ["!DCR_CHOICE_ACTION!"] EQU [""] ( | ||
set DCR_CHOICE_ACTION=%DCR_CHOICE_ACTION_DEFAULT% | ||
) | ||
) else ( | ||
set DCR_CHOICE_ACTION=%1 | ||
) | ||
|
||
echo. | ||
echo Script %0 is now running | ||
|
||
set LOG_FILE=run_test.log | ||
if exist run_test.log del /f /q run_test.log | ||
if exist run_test_debug.log del /f /q run_test_debug.log | ||
|
||
echo. | ||
echo You can find the run log in the file %LOG_FILE% | ||
echo. | ||
echo Please wait ... | ||
echo. | ||
|
||
REM > %LOG_FILE% 2>&1 ( | ||
|
||
echo ======================================================================= | ||
echo Start %0 | ||
echo ----------------------------------------------------------------------- | ||
echo DCR - Document Content Recognition. | ||
echo ----------------------------------------------------------------------- | ||
echo CHOICE_ACTION : %DCR_CHOICE_ACTION% | ||
echo ----------------------------------------------------------------------- | ||
echo:| TIME | ||
echo ======================================================================= | ||
|
||
set _CHOICE= | ||
|
||
if ["%DCR_CHOICE_ACTION%"] EQU ["m_d"] ( | ||
make pipenv-dev | ||
if ERRORLEVEL 1 ( | ||
echo Processing of the script: %0 - step: 'make inst_dev' was aborted | ||
) | ||
make dev | ||
if ERRORLEVEL 1 ( | ||
echo Processing of the script: %0 - step: 'make eco_dev' was aborted | ||
) | ||
goto normal_exit | ||
) | ||
|
||
if ["%DCR_CHOICE_ACTION%"] EQU ["m_p"] ( | ||
make pipenv-prod | ||
if ERRORLEVEL 1 ( | ||
echo Processing of the script: %0 - step: 'make prod' was aborted | ||
) | ||
make compileall | ||
if ERRORLEVEL 1 ( | ||
echo Processing of the script: %0 - step: 'make prod' was aborted | ||
) | ||
goto normal_exit | ||
) | ||
|
||
if ["%DCR_CHOICE_ACTION%"] EQU ["all"] set _CHOICE=%DCR_CHOICE_ACTION% | ||
|
||
if ["%DCR_CHOICE_ACTION%"] EQU ["db_c"] ( | ||
if exist data\dcr.db del /f /q data\dcr.db | ||
set _CHOICE=%DCR_CHOICE_ACTION% | ||
) | ||
|
||
if ["%DCR_CHOICE_ACTION%"] EQU ["p_i"] ( | ||
if exist data\inbox rmdir /s /q data\inbox | ||
mkdir data\inbox | ||
xcopy /E /I tests\inbox data\inbox | ||
set _CHOICE=%DCR_CHOICE_ACTION% | ||
) | ||
|
||
if ["%_CHOICE%"] EQU ["%DCR_CHOICE_ACTION%"] ( | ||
pipenv run python src\dcr\dcr.py %DCR_CHOICE_ACTION% | ||
if ERRORLEVEL 1 ( | ||
echo Processing of the script: %0 - step: 'python src\dcr\dcr.py %DCR_CHOICE_ACTION%' was aborted | ||
) | ||
goto normal_exit | ||
) | ||
|
||
echo Usage: "run_test[.bat] all | db_c | m_d | m_p | p_i" | ||
|
||
:normal_exit | ||
echo ----------------------------------------------------------------------- | ||
echo:| TIME | ||
echo ----------------------------------------------------------------------- | ||
echo End %0 | ||
echo ======================================================================= | ||
REM ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.