C++/QT desktop program for parsing checks to csv
Go to file
leca f483c97935 wrap with tr 2025-03-30 21:26:41 +03:00
assets/icons settings icon and CMakeLists.txt fixes 2025-03-25 21:13:27 +03:00
check added functionality to email text and ocr scenes 2025-03-11 23:31:08 +03:00
deploy fixed wrong versions 2025-03-30 12:25:56 +03:00
exceptions handling incorrect captcha and check not found cases 2024-11-28 00:28:37 +03:00
goods net weights implementation WIP 2025-03-22 01:02:37 +03:00
http_server wrap with tr 2025-03-30 21:26:41 +03:00
image added ofd scene, working http server 2025-03-14 00:44:14 +03:00
image_redactor implemented contrast slider 2024-11-25 04:07:56 +03:00
modules added store autodetect in email scene 2025-03-30 20:48:53 +03:00
net migrate to boost::regex 2025-03-21 22:43:44 +03:00
output ensured building on ubuntu 18.04 2024-12-01 18:53:16 +03:00
parser added store autodetect in email scene 2025-03-30 20:48:53 +03:00
scenes do not accept rich text in email scene 2025-03-30 21:05:07 +03:00
settings fixed wrong versions 2025-03-30 12:25:56 +03:00
translations do not accept rich text in email scene 2025-03-30 21:05:07 +03:00
utils download modules 2025-03-26 20:08:54 +03:00
.env checks-parser-git done, checks-parser-bin WIP 2025-03-23 18:48:17 +03:00
.gitignore based deployment structure 2025-03-22 14:07:10 +03:00
CMakeLists.txt fixed wrong versions 2025-03-30 12:25:56 +03:00
LICENSE remove ignored pt.2 2024-11-22 23:26:42 +03:00
README.md checks-parser-git done, checks-parser-bin WIP 2025-03-23 18:48:17 +03:00
README.ru.md checks-parser-git done, checks-parser-bin WIP 2025-03-23 18:48:17 +03:00
TODO readme & todo updated 2024-12-03 15:02:54 +03:00
adjustpicturedialog.cpp restructure, change onDataDecode signal and succesfully parsing http request 2025-03-15 00:48:46 +03:00
adjustpicturedialog.h restructure, change onDataDecode signal and succesfully parsing http request 2025-03-15 00:48:46 +03:00
bugs fixed wrong versions 2025-03-30 12:25:56 +03:00
docker-compose.yml settings and bugfixes 2025-03-23 20:55:34 +03:00
emailtextscene.cpp added store autodetect in email scene 2025-03-30 20:48:53 +03:00
emailtextscene.h added store autodetect in email scene 2025-03-30 20:48:53 +03:00
main.cpp wrap with tr 2025-03-30 21:26:41 +03:00
mainwindow.cpp removed cpp-httplib dependency 2025-03-20 22:00:19 +03:00
mainwindow.h checks-parser-git done, checks-parser-bin WIP 2025-03-23 18:48:17 +03:00
media.qrc download modules 2025-03-26 20:08:54 +03:00
ocrscene.cpp add autodetect in ocr scene 2025-03-30 20:50:11 +03:00
ocrscene.h add autodetect in ocr scene 2025-03-30 20:50:11 +03:00
ofdscene.cpp replace commas to periods as separators for decimal numbers 2025-03-26 00:20:43 +03:00
ofdscene.h removed cpp-httplib dependency 2025-03-20 22:00:19 +03:00
outputdialog.cpp net weights implementation WIP 2025-03-22 01:02:37 +03:00
outputdialog.h remove ignored pt.2 2024-11-22 23:26:42 +03:00
scenes.qrc settings and bugfixes 2025-03-23 20:55:34 +03:00
settingsdialog.cpp wrap with tr 2025-03-30 21:26:41 +03:00
settingsdialog.h settings and bugfixes 2025-03-23 20:55:34 +03:00
solvecaptchadialog.cpp net weights implementation WIP 2025-03-22 01:02:37 +03:00
solvecaptchadialog.h cleanup 2024-11-28 00:29:49 +03:00
translations.qrc unneeded dependencies 2025-03-07 16:36:12 +03:00

README.md

-->Русская версия<--

Checks parser

checks parser is a program that help parsing different checks to csv.

!!!CURRENTLY SUPPORTED ONLY RUSSIAN CHECKS!!! To know why, see this section

Usage

For more detailed description, please, refer to the wiki

Input

Ways you can input a check to this programm:

  • Via image (it uses OCR(Optical Character Recognition) to parse check content. The picture of a check must be contrast and well-lined (text must be perpendicular to right and left borders of an image) enough in order to be parsed well.) OCR is not a magic wand :(
  • Via plaintext, copied from an E-Mail. Just copy&paste text from your email, pick a correct store type (autodetect is in my plans!) and parse.
  • Via QRCode on check (this method queries check content from OFD (ОФД, Оператор Фискальных Данных in Russian) (My program makes requests to ofd.ru)).

Output

At the start of writing this program, I considered 3 or more output formats: csv, xlsx and ods. But throught the development I understood that most of modern table processor (i.e. electronic tables) can import csv much better than I'd be writing a shitty export module, adding more dependencies and shitty code to the codebase. So I decided that there's no need to use anything other than csv format.

To export, you need to specify an output file path and, if you wish, you can change order and/or rename columns, choose to print or not to print header (column names) and total.

Installing

Building

In general, you need to install following dependencies in order to build that app(I suppose you have installed all the build necessaries such as cmake, make, gcc, git, etc...):

  • boost
  • tesseract (you also have to install appropriate for your needs language data)
  • opencv
  • zbar
  • curl
  • nlohmann-json
  • qt5
  • qrencode

Please, do not hesitate to open an issue if you cannot build that. I will help and if you are building on a distro that is not listed there, we can append that list as soon as we will solve your problem!

Linux

Arch Linux-based

I recommend using aur helper (I use yay) to install dependencies. Or, if you're masochist, you can build all by yourself ¯\_(ツ)_/¯

#Install dependencies
yay -S base-devel qt5-base opencv zbar nlohmann-json tesseract qrencode boost
#Install a language package for OCR. Replace ``LANG` to your language. For example, ``tesseract-data-rus`` for russian language
yay -S tesseract-data-LANG
#Clone and compile an app
git clone https://git.foxarmy.org/leca/checks-parser
cd checks-parser
cmake .
make -j{nproc}
#If you wish to install that program system-wide, run
sudo make install
Debian-based

In debian-based distributions most, but not every, package names are the same.

Installation of dependencies for different debian-based distros:

Ubuntu 18.04

apt install -y qtbase5-dev openssl libmbedtls-dev tesseract-ocr tesseract-ocr-rus libopencv-dev libzbar-dev qttools5-dev nlohmann-json-dev libcurl4-openssl-dev libtesseract-dev libqrencode-dev libboost-regex-dev

Ubuntu 20.04, LMDE (tested only 6), Debian (tested only 12)

apt install -y qtbase5-dev openssl libmbedtls-dev tesseract-ocr tesseract-ocr-rus libopencv-dev libzbar-dev qttools5-dev nlohmann-json3-dev libcurl4-openssl-dev libtesseract-dev libqrencode-dev libboost-regex-dev

Next steps are identical for every debian-based distro

#Clone and compile an app
git clone https://git.foxarmy.org/leca/checks-parser
cd checks-parser
cmake .
make -j{nproc}
#If you wish to install that program system-wide, run
sudo make install

Windows

See Precompiled binaries

Mac OS

Probably not, I do not have nor desire or time. But if you can maintain that program on Mac, I'd be grateful! Please, contact me, if you can!

Precompiled binaries

Currently I have published the program to the AUR.

Every new release will certainly contain AppImage and tarball. I am working towards binaries for Windows and deb packets. Expect them to appear in next releases!

Special thanks

HyperFlint (@hyperflint:foxarmy.org) - for the great idea to use OFD and a huge help in release preparations!

https://check.ofd.ru - for providing a way to request data from FNS.

Contribution

If you want to contribute to the project, you can do it by some of the following:

Checks from different countries

I live in Russia and only know how Russian state checks system works. If you live in another country and want to help me with adding support to checks from your country - feel free to contact me!

Issues and PRs

If you have found a bug, or want to suggest a feature - don't hesitate to open an issue / a PR!

Tell friends

You can help me by distributing that program. If you know people that are in search of such program, please let them know about its existance!

Donate

XMR 45ZjyH5YWdRfKxLoKEBYaiHUTcP5Z8Gv64QQxmabbooPAa7KPBxZLmqft5ohKXn5VpHiVj1x9JKCcAcAjdu9jA8b5N8XqR7