From: Shane Jaroch Date: Sun, 25 Feb 2024 16:20:40 +0000 (-0500) Subject: fix URL for usda-sqlite.sql.tar.xz X-Git-Tag: v0.2.8.dev0~29 X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=154eee21e74a7406666d4c3a7e8cef88315d3865;p=nutratech%2Fcli.git fix URL for usda-sqlite.sql.tar.xz --- diff --git a/ntclient/persistence/sql/usda/__init__.py b/ntclient/persistence/sql/usda/__init__.py index cff5c99..de3eec3 100644 --- a/ntclient/persistence/sql/usda/__init__.py +++ b/ntclient/persistence/sql/usda/__init__.py @@ -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?") diff --git a/ntclient/services/analyze.py b/ntclient/services/analyze.py index 5943160..9f5529f 100644 --- a/ntclient/services/analyze.py +++ b/ntclient/services/analyze.py @@ -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