Files

93 lines
4.2 KiB
Org Mode
Raw Permalink Normal View History

2026-10-26 15:20:23 +00:00
* DQS
[[file:dqs.jpg]]
~dqs~ is an unofficial CLI implementation of Matt Fitzgerald's [[http://www.racingweight.com/index.html][Diet Quality Score]] system, written in December 2019–January 2020. It is optimized for fast keyboard input and visual feedback in a terminal.
** Usage
#+begin_src shell
dqs [-dir PATH] [-d YYYYMMDD] [command] [arguments]
#+end_src
Flags:
- =-dir= — path to the data directory (default: =$XDG_CONFIG_HOME/dqs=)
- =-d=, =-date= — entry date in =YYYYMMDD= format (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
#+begin_src shell
# 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
#+end_src
** 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
#+begin_src shell
go install code.chimeric.al/dwrz/dqs/cmd/dqs@latest
#+end_src