Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/suchapalaver/gust

Simplifies the process of preserving your recipes and creating comprehensive grocery shopping lists
https://github.com/suchapalaver/gust

beginner-friendly beginner-project clap command-line-app custom-error deserialization docker error-handling rust rust-lang rust-language serde serde-json sqlite traits

Last synced: about 1 month ago
JSON representation

Simplifies the process of preserving your recipes and creating comprehensive grocery shopping lists

Awesome Lists containing this project

README

        

# `gust`: rust-powered grocery list creator

use `gust` to add recipes and grocery items to a local database,
making putting together shopping lists super quick.

## summary

- [documentation](#docs)
- [getting started](#getting-started)

## prerequisites

The main prerequisite to get started using this application is [Docker](https://docs.docker.com/).
Docker allows you to [build](./docs/docker.md#build) an image of an application and [run](./docs/docker.md#run) application
[containers](https://en.wikipedia.org/wiki/Containerization_(computing)), allowing you to use an application such as `gust` without
needing to install the Rust programming language, database software, or
other dependencies on your computer.

All you need is to [install Docker](https://docs.docker.com/install/).

---
## docs

### overview

![`gust` design diagram](./docs/diagrams/design.svg)

### [cli](./docs/cli.md)

- [help](./docs/cli.md#help)
- [fetching recipes](./docs/cli.md#fetching-recipes)
- [importing/exporting data](./docs/cli.md#importing-and-exporting-data)

### [database](./docs/database.md)

- [storage options](./docs/database.md#storage-options)
- [sqlite](./docs/database.md#sqlite)
- [postgres](./docs/database.md#postgresql)

### [docker](./docs/docker.md)

- [data volumes](./docs/docker.md#creating-a-gust_data-volume)
- [migrating from JSON to SQLite](./docs/docker.md#migrate-a-json-gust-store-to-sqlite)
- [exporting data to YAML](./docs/docker.md#export-data-to-yaml)

---
## getting started

### build the docker image

```bash
docker build --tag gust --file Dockerfile .
```

### help menu

```bash
docker run --rm gust
```

or:

```bash
cargo run -- -h
```

### fetch a recipe and save it to the database

```bash
docker run --rm -v gust:/app gust fetch --url https://www.bbc.co.uk/food/recipes/vegetable_noodle_pancake_22079
```

### read the recipes in the database

```bash
docker run --rm -v gust:/app gust read recipes
```

### read a recipe's ingredients

```bash
docker run --rm -v gust:/app gust read --recipe 'vegetable noodle pancake'
```

### add a recipe to the list

```bash
docker run --rm -v gust:/app gust add list --recipe 'vegetable noodle pancake'
```

### read the items on the list

```bash
docker run --rm -v gust:/app gust read list
```

### clear the list

```bash
docker run --rm -v gust:/app gust update list clear
```