]> Nutra Git (v1) - nutratech/cli.git/commitdiff
fix URL for usda-sqlite.sql.tar.xz
authorShane Jaroch <chown_tee@proton.me>
Sun, 25 Feb 2024 16:20:40 +0000 (11:20 -0500)
committerShane Jaroch <chown_tee@proton.me>
Sun, 25 Feb 2024 16:20:40 +0000 (11:20 -0500)
ntclient/persistence/sql/usda/__init__.py
ntclient/services/analyze.py

index cff5c990346d2ed611aa1cb8849622716a4c025d..de3eec32594e820acc8c1938ac463dcb759cb220 100644 (file)
@@ -40,8 +40,10 @@ def usda_init(yes: bool = False) -> None:
     # TODO: handle resource moved on Bitbucket,
     #  or version mismatch due to developer mistake /  overwrite?
     #  And seed mirrors; don't hard code one host here!
-    url = "https://github.com/nutratech/usda-sqlite/releases"
-    "/download/{1}/{0}-{1}.tar.xz".format(USDA_DB_NAME, __db_target_usda__)
+    url = (
+        "https://github.com/nutratech/usda-sqlite/releases"
+        "/download/{1}/{0}-{1}.tar.xz".format(USDA_DB_NAME, __db_target_usda__)
+    )
 
     if USDA_DB_NAME not in os.listdir(NUTRA_HOME):
         print("INFO: usda.sqlite3 doesn't exist, is this a fresh install?")
index 5943160aaf193e7ac6b7913060665faa2a122a5d..9f5529ff5fd91420ec2be7969f0392de282d73f3 100644 (file)
@@ -129,8 +129,8 @@ def foods_analyze(food_ids: set, grams: float = 0) -> tuple:
         # Print view
         # TODO: nested, color-coded tree view
         nutprogbar(food_amts, food_analyses, nutrients)
-        table = tabulate(nutrient_rows, headers=headers, tablefmt="presto")
-        print(table)
+        table = tabulate(nutrient_rows, headers=headers, tablefmt="presto")
+        print(table)
         nutrients_rows.append(nutrient_rows)
 
     return 0, nutrients_rows, servings_rows