Shopping List Generator
A simple CLI tool written in Python for generating a shopping list text file from multiple recipe files. Written so my girlfriend stops taking an extra 15 minutes every week copying the recipe contents...
Quick Install
The application is available on PyPI and so can installed via pip using:
pip install shopping-list-generator
Usage
The application uses your working directory to find recipe text files, and outputs a shopping_list.txt file to the working directory. The file extension of the recipe file does not need to be specified, it is assumed to be .txt.
So running the app from within a directory with a test_recipes sub-directory would look like:
shopping_list_generator "test_recipes/daal, test_recipes/curry"
You can also specify the quantity to multiply each recipe ingredient by like:
shopping_list_generator "test_recipes/daal-2, test_recipes/curry-2"
Which would multiply both the daal and curry ingredients by 2.
Quick Setup
The app uses pipenv for dependency management. So you will need to be familiar with this to run the application locally.
Once pipenv is installed you can install the dependencies by running:
pipenv install
from within the src directory.
You can then run associated commands via pipenv, like:
pipenv run python -m shopping_list_generator "test_recipes/daal, test_recipes/curry"
Tests
The application uses pytest for writing and running tests.
Within the src/tests dirctory there are a few integration tests from the easiest point of entry of the entire application. Each test takes a given set of recipe inputs, and the output shopping_list contents can be asserted on. These integration tests mock the underlying file system operations.
You can run the tests via pytest:
pipenv run pytest ./tests
from within the src directory.
Metadata
Release files for shopping-list-generator 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shopping-list-generator-0.0.7.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shopping_list_generator-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / shopping-list-generator-0.0.7.tar.gz
| Download URL | shopping-list-generator-0.0.7.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0341b171a7cada366cce1d980c602eafd9d16367166e28b6032a6a73e54fcab8
|
|
BLAKE2b-256 checksum How to use checksums |
888c9367be1471887ec4bfba3624299f480a6959c5d0b0ca1fe665b0e72e910d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / shopping_list_generator-0.0.7-py3-none-any.whl
| Download URL | shopping_list_generator-0.0.7-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f68ee582ee39811a2412a82cf769749490ee4d693115f2a6a38130f500effbf
|
|
BLAKE2b-256 checksum How to use checksums |
b02df47fdd289deab424e18623aa858381bbe0397611245d9e3f704619f9012b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|