6931d0b Add id field to items table in db schema
~javiljoen pushed to ~javiljoen/shopping-list git
9a68e12 [not used yet] Implement Drop for TempFile
~javiljoen pushed to ~javiljoen/shopping-list git
Grocery management CLI application
Clone this repo and install the package by running:
pip install -r requirements/pkg.txt
pip install .
Installing the package makes a shell command groceries
available.
To see the available options, run:
groceries -h
The path to the grocery list file to use can be provided
by setting the environment variable GROCERIES_URI
, e.g.:
export GROCERIES_URI=~/groceries.txt
groceries list
Two storage backends are supported:
todo.txt
format (can be synced to mobile with e.g. SimpleTask)It is possible to convert between the formats with
groceries export > file.txt
and groceries import file.txt
.
The format is detected based on the scheme of the URI provided. Examples of allowed formats:
sqlite:///home/me/groceries.db
file:///home/me/groceries.txt
~/groceries.txt
The default priority levels are: Today, Soon, Upcoming, Maybe later.
This can be changed by setting the environment variable GROCERIES_PRIORITIES
to a comma-separated list of the desired levels, e.g.:
export GROCERIES_PRIORITIES=Daily,Weekly,Monthly
groceries list
In a Python ≥ 3.8 virtual environment, run:
make init
To upgrade all dependencies, run:
make update
To run all tests and linter checks, run:
make check
To run the REST API server in development mode,
set the FLASK_APP and FLASK_ENV environment variables as follows
(e.g. in .envrc
if using direnv):
export FLASK_APP=groceries.web.wsgi:main
export FLASK_ENV=development
Then start the development server with:
flask run