Streamline your purchase history
Project description
Groc
Streamline your purchase history
Groc is a Python CLI designed to help you keep track of purchases. You can enter data manually or via csv, and view various purchase stats.
Installing ✨
Install and update groc using pip:
pip install groc
Groc officially supports Python 3.7.
Usage
groc [COMMAND] [flags]
See also groc --help
.
Commands
init 🔮
Create a groc database in user's home directory. If a database already exists, the command will abort.
To see detailed output, use the --verbose
flag.
groc init
add 📝
Add a purchase to the groc database manually or by reading in a file or directory.
To enter purchase data manually, use the flags --date
, --total
, --store
, --description
.
The --date
flag is optional and can be omitted (the current date will be used).
The --description
flag is optional and can be omitted.
To enter purchases via file or directory, use the --source
flag provided with the path. Only csv files are currently supported.
Adding a purchase that already exists will abort the action, unless the --ignore-duplicate
flag is passed; this can be especially useful when adding purchases from a file
or multiple files.
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/ --ignore-duplicate
delete 🗑
Delete a purchase by id by passing the --id
, -i
flag. Multiple id flags can be passed.
Passing the flag --dry-run
will output purchases to be deleted without actually deleting it.
To see complete purchase details of a purchase, use the --verbose
flag.
groc delete --id 2 --dry-run
breakdown 📊
Provides a breakdown of purchases for the current month and year categorized by month.
Target specific months by passing one or multiple month flags like --month
, -m
or years like --year
, -y
.
To see extended stats, use the --verbose
.
groc breakdown
groc breakdown --month=01 --month=03 --year=2019
list 🔍
Lists the latest 50 purchases by default, unless otherwise specified by the --limit
flag.
View purchases for a specific month by passing in --month
, -m
flag, optionally with a year with the --year
, -y
flag.
To see all purchases of a month, pass the --all
, -a
flag.
To see detailed output, such as purchase id, use the --verbose
flag.
groc list --limit 10
groc list -m 02 --all
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.
Passing the --dry-run
flag will output the purchase count to be reset.
groc reset --verbose
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file groc-0.1.3.tar.gz
.
File metadata
- Download URL: groc-0.1.3.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9e09398375dd83256e0f77763a60def7b58bbf2bf0a9e312dcd379c28329131 |
|
MD5 | 56723c58f908cd24dfe7c89208a4b509 |
|
BLAKE2b-256 | 08cf41201c94b8f0e624599d6e4d6d20e5bd1b953d3244b46071083faf12a61c |