diff --git a/OCRmyPDF.sh b/OCRmyPDF.sh index 611ed577..539bed79 100644 --- a/OCRmyPDF.sh +++ b/OCRmyPDF.sh @@ -69,6 +69,7 @@ EXIT_OTHER_ERROR="5" LOG_ERR="0" # 0=only error messages LOG_INFO="1" # 1=error messages and some infos LOG_DEBUG="2" # 2=debug level logging +SRC="./src" # location of the source folder (except source of external tools like jhove) JHOVE="./jhove/bin/JhoveApp.jar" # java SW for validating the final PDF/A JHOVE_CFG="./jhove/conf/jhove.conf" # location of the jhove config file @@ -263,13 +264,13 @@ while read pageSize ; do image4finalPDF="$curImgPixmapDeskewed" fi [ $VERBOSITY -ge $LOG_DEBUG ] && echo "Page $page: Embedding text in PDF" - ! python hocrTransform.py -r $dpi -i "$image4finalPDF" "$curHocr" "$curOCRedPDF" \ + ! python $SRC/hocrTransform.py -r $dpi -i "$image4finalPDF" "$curHocr" "$curOCRedPDF" \ && echo "Could not create PDF file from \"$curHocr\". Exiting..." >&2 && exit $EXIT_OTHER_ERROR # if requested generate special debug PDF page with visible OCR text if [ $DEBUG_MODE -eq "1" ] ; then [ $VERBOSITY -ge $LOG_DEBUG ] && echo "Page $page: Embedding text in PDF (debug page)" - ! python hocrTransform.py -b -r $dpi "$curHocr" "$curOCRedPDFDebug" \ + ! python $SRC/hocrTransform.py -b -r $dpi "$curHocr" "$curOCRedPDFDebug" \ && echo "Could not create PDF file from \"$curHocr\". Exiting..." >&2 && exit $EXIT_OTHER_ERROR fi diff --git a/hocrTransform.py b/src/hocrTransform.py similarity index 100% rename from hocrTransform.py rename to src/hocrTransform.py diff --git a/test/OCRmyPDF_severaltimes.sh b/src/test/OCRmyPDF_severaltimes.sh similarity index 65% rename from test/OCRmyPDF_severaltimes.sh rename to src/test/OCRmyPDF_severaltimes.sh index 3cc1a81d..683a4b9d 100644 --- a/test/OCRmyPDF_severaltimes.sh +++ b/src/test/OCRmyPDF_severaltimes.sh @@ -8,7 +8,7 @@ while [ $cpt -le 10 ] ; do echo "------- Itteration $cpt ---------" - ! ../OCRmyPDF.sh -vv -l deu -k ../tmp/ocred-$(($cpt-1)).pdf ../tmp/ocred-$cpt.pdf && exit 1 + ! ../../OCRmyPDF.sh -vv -l deu -k ../../tmp/ocred-$(($cpt-1)).pdf ../../tmp/ocred-$cpt.pdf && exit 1 cpt=$(($cpt+1)) diff --git a/test/README.md b/src/test/README.md similarity index 100% rename from test/README.md rename to src/test/README.md diff --git a/tesseract_cfg/README.md b/tess-cfg/README.md similarity index 100% rename from tesseract_cfg/README.md rename to tess-cfg/README.md diff --git a/tesseract_cfg/no_ligature b/tess-cfg/no_ligature similarity index 100% rename from tesseract_cfg/no_ligature rename to tess-cfg/no_ligature