-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
16 lines (16 loc) · 1.16 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"name": "ocr-rust",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/ranmeizi/ocr-rust.git",
"author": "boboan <[email protected]>",
"license": "MIT",
"description": "一个 rust 的 ocr 开发环境",
"scripts": {
"build:app": "sh build/build.sh",
"build:env": "docker build -t boboan/ocr-rust-env -f env.Dockerfile .",
"run:container": "docker build -t ocr-rust-run -f run.Dockerfile . && docker run -p 3000:3000 -v $PWD/ocr-test/:/app/ocr-test/ --name ocr-rust-run ocr-rust-run",
"ocr": "docker run -v $PWD/res_img/threshold.jpg:/tmp/threshold.jpg -v $PWD/ocr-test/chi_sim.traineddata:/usr/local/share/tessdata/chi_sim.traineddata -v $PWD/ocr-test/chi_sim_vert.traineddata:/usr/local/share/tessdata/chi_sim_vert.traineddata jitesoft/tesseract-ocr /tmp/threshold.jpg stdout",
"ocr:pos": "docker run -v $PWD/res_img/threshold.jpg:/tmp/threshold.jpg -v $PWD/ocr-test/chi_sim.traineddata:/usr/local/share/tessdata/chi_sim.traineddata -v $PWD/ocr-test/chi_sim_vert.traineddata:/usr/local/share/tessdata/chi_sim_vert.traineddata jitesoft/tesseract-ocr -l chi_sim -c tessedit_create_boxfile=1 /tmp/threshold.jpg stdout"
}
}