Skip to content

A tiny CLI for organizing grocery shopping with a focus on recipes

License

Notifications You must be signed in to change notification settings

ecampostrini/shopping-buddy

Repository files navigation

Shopping buddy

Shoping buddy takes as input a list of items you need from the grocery shop and turns it into a Trello card where each item is a checkitem inside a checklist, allowing you to create a fresh and easy to read Trello card for every grocery shopping you have to do, ready to be shared with family or friends and ease the grocery shop organization.

Usage

A Trello account is required and the minimum required version of Python is 3.7

  1. After cloning the repo install the dependencies: :
pip3 install -r requirements.txt

and give execution permission to the script:

chmod +x ./shopping_buddy.py
  1. Create a yaml file containing the stores where you get the groceries from:
kind: store
name: lidl
items:
  - name: queso parmesano
    category: diary
    sold_in:
      - 250 grams unit

  - name: hasselnuts
    category: grains
    sold_by_the: bag

  - name: peras sueltas
    category: fruits and vegetables
    sold_by_the: unit

You can define more than one store per file by separating them with ---

  1. Create a yaml file containing the list of the groceries you need:
kind: shopping_list
name: compras para la semana
store: lidl
items:
  - name: queso parmesano
    quantity: 150 grams
    
  - name: hasselnuts
    quantity: 2 bags
  1. Create a config.ini file with the required Trello config:
[TRELLO]
api_key=<Trello api key>
server_token=<Trello server token>
base_api_url=https://api.trello.com/1/
# Name of the board where you want the shopping list card to be created
board_name=compras 
# Name of the list within the board where you want the shopping list to be created
list_name=Por hacer

Follow the API introduction to get the API key and the server token

  1. Run the script indicating the path to the files that have the definition of the stores and the shopping list created in points 2 and 3. Assuming these are called stores.yaml and shopping_list.yaml this would look like:
./shopping_buddy.py --stores stores.yaml --lists shopping_list.yaml
  1. Check the board in Trello, the new card containing the checklist should be there.

Example Trello shopping list

About

A tiny CLI for organizing grocery shopping with a focus on recipes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages