Generate a shopping list from recipe .txt files
Project description
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shopping-list-generator-0.0.7.tar.gz.
File metadata
- Download URL: shopping-list-generator-0.0.7.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0341b171a7cada366cce1d980c602eafd9d16367166e28b6032a6a73e54fcab8
|
|
| MD5 |
72ad9be257b91cb76ccc2e77f86da578
|
|
| BLAKE2b-256 |
888c9367be1471887ec4bfba3624299f480a6959c5d0b0ca1fe665b0e72e910d
|
File details
Details for the file shopping_list_generator-0.0.7-py3-none-any.whl.
File metadata
- Download URL: shopping_list_generator-0.0.7-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f68ee582ee39811a2412a82cf769749490ee4d693115f2a6a38130f500effbf
|
|
| MD5 |
927f8758e6bac7a48713b7b8c205323a
|
|
| BLAKE2b-256 |
b02df47fdd289deab424e18623aa858381bbe0397611245d9e3f704619f9012b
|