]> Nutra Git (v2) - nutratech/cli.git/commitdiff
small edit, wip stuff, old
authorShane Jaroch <chown_tee@proton.me>
Fri, 21 Jul 2023 16:20:00 +0000 (12:20 -0400)
committerShane Jaroch <chown_tee@proton.me>
Fri, 21 Jul 2023 16:20:00 +0000 (12:20 -0400)
ntclient/services/analyze.py

index 50b988fafbc69540d4e0678e2ff347ae537c3db2..2d5d180d4796e5138eafd99868548be53584db4b 100644 (file)
@@ -102,7 +102,7 @@ def foods_analyze(food_ids: set, grams: float = 0) -> tuple:
         print_header("NUTRITION")
 
         ################################################################################
-        # Nutrient table
+        # Nutrient tree-view
         ################################################################################
         headers = ["id", "nutrient", "rda", "amount", "units"]
         nutrient_rows = []
@@ -123,9 +123,9 @@ def foods_analyze(food_ids: set, grams: float = 0) -> tuple:
 
             nutrient_rows.append(row)
 
-        ################################################################################
-        # Print table
-        ################################################################################
+        ############
+        # Print view
+        # TODO: nested, color-coded tree view
         table = tabulate(nutrient_rows, headers=headers, tablefmt="presto")
         print(table)
         nutrients_rows.append(nutrient_rows)