The background job processing controller for ZhirOCR.
- Open
Cranelift.sln
in Visual Studio 2019 - Paste this in
secrets.json
:
{
"ConnectionStrings": {
"HangfireConnection": "Server=localhost;Database=zhir-hangfire;Uid=***;Pwd=***;Allow User Variables=True;CharSet=utf8;",
"OcrConnection": "Server=localhost;Database=zhir-ocr;Uid=***;Pwd=***;CharSet=utf8;"
},
"Users": [
{
"Username": "muhammad",
"Password": "***"
},
{
"Username": "aram",
"Password": "***"
}
],
"Storage": {
"HostName": "https://ewr1.vultrobjects.com",
"AccessKey": "***",
"Secret": "***",
"BucketName": "zhir-ocr"
},
"Email": {
"FromAddress": "zhir.company.io@gmail.com",
"Password": "***",
"Host": "smtp.gmail.com",
"Port": 587
},
"FastPay": {
"Password": "******",
"DeviceId": "****",
"AppId": "***",
"Number": "+9647507665935",
"IntervalMinMinutes": 10,
"IntervalMaxMinutes": 40
},
"Sentry": {
"Dsn": "https://*****.ingest.sentry.io/*****",
"IncludeRequestPayload": true,
"SendDefaultPii": true,
"MinimumBreadcrumbLevel": "Debug",
"MinimumEventLevel": "Warning",
"AttachStackTrace": true,
"Debug": false,
"DiagnosticsLevel": "Error"
}
}
Note: User password is plaintext.
-
Change the configuration in
secrets.json
to connect to development database and object storage. -
Create an empty database for Hangfire called
zhir-hangfire
. -
In Visual Studio 2019 press CTRL + F5 to run Cranelift
-
Browse to https://localhost:5001/
While Zhir OCR is cross-platform, we have only tested it on Ubuntu 20.04.
sudo apt install python3-pip
pip3 install -r Dependencies/zhirpy/requirements.txt
sudo add-apt-repository ppa:alex-p/tesseract-ocr-devel
sudo apt-get update
sudo apt install tesseract-ocr
Read more about installing Tesseract here.