- Download your eBons (as pdf) into eBon-folder
- Run
make start
(or equivalent npm commands)
REWE (German food retail company) provides a service called 'eBon', where customers can receive their receipts digitally.
These receipts can be downloaded in the REWE user portal.
Currently, available formats are pdf
and csv
.
While csv
sounds good for automatic processing, the file looks something like this:
"Datum","Uhrzeit","Gesamtsumme"
"01.02.2025","18:02:25","37,24"
Instead, the pdf
file contains all data and webD97 created a javascript library for parsing eBon pdf files into JSON (rewe-ebon-parser).
For displaying the data in a dashboard, I went with evidence as it is easy to query data (using sql) and already provides lots of visualizations to analyzing your data. Additionally, evidence provides a JavaScript datasource which can run arbitrary JavaScript code as a data source. In order to create an MVP, I went with a small script for parsing my eBon pdf files into queryable data.
In the long run, it makes more sense to query the data directly from the REWE api. First research results are:
- Rewe Login token might be received via
curl 'https://account.rewe.de/realms/sso/login-actions/authenticate' --data-raw 'username=test%40test.de&password=test&rememberMe=on'
https://shop.rewe.de/api/receipts/
shows all receipts as overview with RSTP token (example which uses api: https://github.com/Craze1997/grocy-rewe-connect/blob/main/main.py)https://shop.rewe.de/api/receipts/<UUID>
shows complete receipt- a custom evidence datasource provider can be written including parameter handling for REWE login