CLI tool that parses supplier beer invoices (PDF) and pushes pricing to Untappd for Business automatically.
Kegs during service had to be changed quite often for new ones. We then had to find the corresponding invoice, calculate the selling price based on the buying price (per liter), apply our margin and add it to our Untappd menu. All this steps while serving clients led to slower service and pricing mistakes.
- Parses invoice PDF using
pdfdataextract.js - Extracts draft beer lines via regex (name, brewery, price per liter)
- Calculates half-pint/pint pricing with margin applied
- Get items information from Untapdd API to get their IDs based on the name + brewery
- Pushes items to Untappd for Business via their API (hidden "on deck" status, ready to activate)
- Add brewery country flags along the beer's name
Node.js, pdfdataextract.js, Untappd for Business API, Regex
node index.js --file path/to/invoice.pdf
Used in production for 18+ months at CHILL N BEER / Beer District Libération (Nice).
