Skip to content
A supermarket receipt parser written in Python using tesseract OCR
Python Makefile Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Docker support Dec 8, 2018
parser Issue #15: added date validation logic (#25) Oct 14, 2019
.dockerignore Docker support Dec 8, 2018
.gitignore add 'stats.csv' in gitignore Nov 22, 2017
.travis.yml Issue #15: added date validation logic (#25) Oct 14, 2019
CHANGELOG.md add changelog Nov 22, 2017
Dockerfile Rename DockerFile to Dockerfile Dec 8, 2018
LICENSE
Makefile Restructure project to make it work in Docker Dec 8, 2018
Pipfile Issue #15: added date validation logic (#25) Oct 14, 2019
Pipfile.lock Bump pytest from 5.3.0 to 5.3.1 Nov 27, 2019
README.md Update README.md Dec 8, 2018
config.yml Support for Colruyt and Delhaize markets (#33) Oct 26, 2019
requirements.txt Bump pytest from 5.3.0 to 5.3.1 Nov 27, 2019

README.md

A fuzzy receipt parser written in Python

Build Status

Updating your housekeeping book is a tedious task: You need to manually find the shop name, the date and the total from every receipt. Then you need to write it down. At the end you want to calculate a sum of all bills. Nasty. So why not let a machine do it?

This is a fuzzy receipt parser written in Python. You give it any dirty old receipt lying around and it will try its best to find the correct data for you.

It started as a hackathon project. Read more about it on the trivago techblog. Also read the comments on HackerNews Oh hey! And there's also a talk online now if you're the visual kind of person.

Dependencies

Usage

To convert all images from the data/img/ folder to text using tesseract and parse the resulting text files, run

make run

Docker

A Dockerfile is available with all dependencies needed to run the program.
To build the image, run

make docker-build

To run it on the sample files, try

make docker-run

By default, running the image will execute the make run command. To use with your own images, run the following:

docker run -v <path_to_input_images>:/usr/src/app/data/img mre0/receipt-parser

Future Plans

The plan is to write the parsed receipt data into a CSV file. This is enough to create a graph with GnuPlot or any spreadsheet tool. If you want to get fancy, write an output for ElasticSearch and create a nice Kibana dashboard. I'm happy for any pull request.

You can’t perform that action at this time.