This repository has been archived by the owner on Mar 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve data path used for testing. Closes #208.
- Loading branch information
Showing
3 changed files
with
26 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
for /f %%i in ('adb shell echo $EXTERNAL_STORAGE') do set DIR=%%i | ||
|
||
git clone https://github.com/tesseract-ocr/tessdata.git | ||
|
||
adb shell rm /sdcard/testAddPageToDocument.pdf | ||
adb shell rm /sdcard/testCreate.pdf | ||
adb shell rm %DIR%/testAddPageToDocument.pdf | ||
adb shell rm %DIR%/testCreate.pdf | ||
|
||
adb uninstall com.googlecode.tesseract.android.test | ||
|
||
adb shell mkdir /sdcard/tesseract | ||
adb shell mkdir /sdcard/tesseract/tessdata | ||
adb shell mkdir %DIR%/tessdata | ||
|
||
adb push -p tessdata/eng.cube.bigrams /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.cube.fold /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.cube.lm /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.cube.nn /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.cube.params /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.cube.size /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.cube.word-freq /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.tesseract_cube.nn /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.traineddata /sdcard/tesseract/tessdata | ||
adb push -p tess-two/jni/com_googlecode_tesseract_android/src/tessdata/pdf.ttf /sdcard/tesseract/tessdata | ||
adb push -p tessdata/eng.cube.bigrams %DIR%/tessdata | ||
adb push -p tessdata/eng.cube.fold %DIR%/tessdata | ||
adb push -p tessdata/eng.cube.lm %DIR%/tessdata | ||
adb push -p tessdata/eng.cube.nn %DIR%/tessdata | ||
adb push -p tessdata/eng.cube.params %DIR%/tessdata | ||
adb push -p tessdata/eng.cube.size %DIR%/tessdata | ||
adb push -p tessdata/eng.cube.word-freq %DIR%/tessdata | ||
adb push -p tessdata/eng.tesseract_cube.nn %DIR%/tessdata | ||
adb push -p tessdata/eng.traineddata %DIR%/tessdata | ||
adb push -p tess-two/jni/com_googlecode_tesseract_android/src/tessdata/pdf.ttf %DIR%/tessdata |
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 |
---|---|---|
@@ -1,27 +1,28 @@ | ||
#!/bin/sh | ||
|
||
DIR="`adb shell echo \\$EXTERNAL_STORAGE`" | ||
|
||
git clone https://github.com/tesseract-ocr/tessdata.git | ||
|
||
adb shell rm /sdcard/testAddPageToDocument.pdf | ||
adb shell rm /sdcard/testCreate.pdf | ||
adb shell rm $DIR/testAddPageToDocument.pdf | ||
adb shell rm $DIR/testCreate.pdf | ||
|
||
adb uninstall com.googlecode.tesseract.android.test | ||
|
||
adb shell mkdir /sdcard/tesseract | ||
adb shell mkdir /sdcard/tesseract/tessdata | ||
adb shell mkdir $DIR/tessdata | ||
|
||
for f in tessdata/eng.*; do | ||
TRAINEDDATA_FILENAME="/sdcard/tesseract/tessdata/`basename $f`" | ||
TRAINEDDATA_FILENAME="$DIR/tessdata/`basename $f`" | ||
|
||
if [ `adb shell "if [ -f $TRAINEDDATA_FILENAME ]; then echo 1; fi"` ]; then | ||
echo "$TRAINEDDATA_FILENAME already present on device" | ||
continue | ||
fi | ||
|
||
echo "Copying $f to device..."; | ||
adb push -p $f /sdcard/tesseract/tessdata | ||
adb push -p $f $DIR/tessdata | ||
done | ||
|
||
adb push -p tess-two/jni/com_googlecode_tesseract_android/src/tessdata/pdf.ttf /sdcard/tesseract/tessdata | ||
adb push -p tess-two/jni/com_googlecode_tesseract_android/src/tessdata/pdf.ttf $DIR/tessdata | ||
|
||
# adb shell am instrument -w com.googlecode.tesseract.android.test/android.test.InstrumentationTestRunner |
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