64 lines
1.2 KiB
Markdown
64 lines
1.2 KiB
Markdown
# Nutri
|
|
|
|
Nutri is a C++ project that retrieves and processes nutritional information from various sources.
|
|
|
|
## Currently supported sources
|
|
|
|
- [x] WolframAlpha
|
|
- [ ] OpenFoodFacts
|
|
|
|
## Features
|
|
|
|
- [x] Fetch and display nutrition data
|
|
- [ ] Export data to a CSV file
|
|
- [ ] Cache previous queries
|
|
- [ ] alternative [QT](qt.io) based GUI
|
|
|
|
## Installation
|
|
|
|
### Dependencies
|
|
|
|
- [`glaze`](https://github.com/stephenberry/glaze)
|
|
- [`cpr`](https://github.com/libcpr/cpr)
|
|
- [`ctre`](https://github.com/hanickadot/compile-time-regular-expressions)
|
|
|
|
These libraries will be fetched automatically via CMake if they are not already installed on your system.
|
|
|
|
### Clone the repository
|
|
|
|
```bash
|
|
git clone --depth=1 https://git.etenie.net/etenie/nutri.git
|
|
cd nutri
|
|
```
|
|
|
|
### Build with CMake
|
|
|
|
```bash
|
|
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
|
cmake --build build
|
|
```
|
|
|
|
Now you will find the `nutri` executable in the `build` dir.
|
|
|
|
## Usage
|
|
|
|
```
|
|
-h, --help: Print help
|
|
-f, --food: Specify the food item
|
|
-a, --amount: Specify the amount (in grams)
|
|
```
|
|
|
|
Example usage:
|
|
|
|
```bash
|
|
./nutri -f "ground beef" -a 100
|
|
Cals: 236 kcal
|
|
Protein: 26 g
|
|
Carbs: 0 g
|
|
Fats: 14 g
|
|
```
|
|
|
|
## License
|
|
|
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|