Food Inventory Management System

To install and run the software:

git clone git://github.com/wbrenna/inventory/master .

Then, enter the directory and run: python inventory --help.

Details

This Python application interfaces with zbarcam to track expiry dates of purchased food goods. The "add" option allows one to scan EAN-13 codes of groceries, which inputs them into a database of the current inventory stock, along with their scan date and item description (the descriptions are downloaded from upcdatabase, which is currently free but is not all that large). Please change the key in inventory_add.py to your own upcdatabase.org key. The "modifyexpiry" allows you to enter a specific product EAN-13 manually and customize its expiry date. The expiry dates persist through deletion of stock, so you will never need to enter expiry lengths for that particular product again. The "remove" option allows you to scan barcodes on the way out, removing that product from your inventory. The "printout" option will print the database out for you, neatly. Finally, the "daily" option allows for cron or some other scheduling tool to check daily for products nearing expiry. This is best used with a line in crontab that runs inventory with the daily option. You will need to enter your email in inventory_daily.py in order for this to properly work.

In practise, it works best to directly interface some of the commands with the zbarcam barcode scanner. Run something like

zbarcam | inventory add

The other command that is handily referenced with a pipe through zbarcam is "remove". While "modifyexpiry" takes UPC codes, it also prompts for an expiry date, which would be troublesome to enter if piped through zbarcam, so for this it is best to enter the code manually, without proper prefix, like 0068100084245. You should be able to read this data directly beneath the barcode. If it's thirteen digits, it's likely within EAN-13 specification.

Code

The full source code is available on GitHub at:

wbrenna/inventory