Skip to content

Groc Command Line App

Sangeeta Jadoonanan edited this page Apr 18, 2019 · 3 revisions

Wat the groc?

Groc is a simple Python cli to help you manage your grocery bills 🗒

Usage

groc [COMMAND] [flags]

See also groc --help.

Main Commands

[ breakdown ]

Provides a breakdown of purchases made for the current month, unless passed one (or multiple) month flag --month or -m to specify a month.

groc breakdown

groc breakdown --month=01

[ list ]

Lists the latest 50 purchases by default, unless otherwise specified by the --limit flag. To see detailed output, such as purchase id, use the --verbose flag.

groc list --limit 10

[ add ]

Add a purchase to the groc database manually by using the flags --date, --total, --store, --description required together or by reading in a file or directory of files by using the flag --source. Only csv files are currently supported.

groc add --date 2019-01-01 --total 20.00 --store "Awesome Cakes" --description "birthday cake"

groc add --source ./my-purchases/january.csv

groc add --source ./my-purchases/

[ delete ]

Delete a purchase by id. Passing the flag --dry-run will output files to be deleted without actually deleting it.

groc delete --id 2 --dry-run

[ init ]

Create a groc database. If a database already exists, the command will abort. Passing the flag --force will delete an existing database and create a new one. To see detailed output, use the --verbose flag.

groc init --force

[ reset ]

Reset a groc database by deleting all entries. The database and schema will not be deleted, so this does not require an init from the user. To see detailed output, use the --verbose flag.

groc reset --verbose

Clone this wiki locally