4.2 KiB
4.2 KiB
DQS
dqs is an unofficial CLI implementation of Matt Fitzgerald's Diet Quality Score system, written in December 2019–January 2020. It is optimized for fast keyboard input and visual feedback in a terminal.
Usage
dqs [-dir PATH] [-d YYYYMMDD] [command] [arguments]
Flags:
-dir— path to the data directory (default:$XDG_CONFIG_HOME/dqs)-d,-date— entry date inYYYYMMDDformat (default: today)
Commands
If no command is specified, dqs prints the entry for the date in use. On first run, dqs prompts to configure user settings.
| Command | Arguments | Action |
entry |
Display the date's entry (default) | |
add |
<category> <portions> [...] |
Add portions (multiples of 0.5) to an entry |
remove |
<category> <portions> [...] |
Remove portions from an entry |
weight |
<weight> |
Set weight on the entry (and user profile if today) |
body-fat |
<percentage> |
Set body fat % on the entry (and user profile if today) |
note |
[append / delete / edit / set] [text] |
View or modify the entry's note |
delete |
Delete the date's entry | |
report |
Display statistics and recommendations across all entries | |
export |
Export all entries as CSV (date,body-fat,dqs,weight) |
|
user |
Display user profile and settings | |
config |
Interactively configure user settings | |
help |
[command] |
Display built-in documentation |
Examples
# Add portions by category name (case-insensitive):
dqs add "Whole Grains" 1 dairy 2 fruit 1.5
# Add or remove portions using category abbreviations:
dqs add wg 1 d 2 nsh 0.5 f 1.5 v 2
dqs remove ff 0.5 s 1 o 2
# Record weight, body fat, or a note:
dqs weight 70
dqs body-fat 15.5
dqs note set "Post-run recovery"
# Log or delete an entry for a past date:
dqs -d 20200104 add v 2 lpp 1.5
dqs -d 20200104 delete
Interpreting the Output
- A full portion is marked with a full-color background.
- A half-portion colors the portion's points, but not the background.
- Green marks portions with positive points, yellow for zero points, and red for negative points.
- The total DQS, weight, body fat, and BMI are printed below the portion table.
Abbreviations
| Category | Abbreviation |
| Dairy | d |
| Fried Foods | ff |
| Fruit | f |
| High Quality Beverages | hqb |
| Legumes & Plant Proteins | lpp |
| Low Quality Beverages | lqb |
| Nuts, Seeds, Healthy Oils | nsh |
| Other | o |
| Processed Foods | hqpf |
| Processed Meat | p |
| Refined Grains | rg |
| Sweets | s |
| Unprocessed Meat & Seafood | ums |
| Vegetables | v |
| Whole Grains | wg |
Installation
go install code.chimeric.al/dwrz/dqs/cmd/dqs@latest
