From 5fa0c9d553e08f98be3493c6651423cc458fcc83 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 28 Dec 2020 14:47:15 -0800 Subject: [PATCH] Add test command for checking the config file --- inquisitor/cli.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/inquisitor/cli.py b/inquisitor/cli.py index 8d6dcc4..f56d00e 100644 --- a/inquisitor/cli.py +++ b/inquisitor/cli.py @@ -9,6 +9,25 @@ import random from inquisitor.configs import logger, DUNGEON_PATH, SOURCES_PATH +def command_test(args): + """Echo config file values.""" + from inquisitor.configs.resolver import ( + config_path, + CONFIG_DATA, data_path, + CONFIG_SOURCES, source_path, + CONFIG_CACHE, cache_path, + CONFIG_LOGFILE, log_file, + CONFIG_VERBOSE, is_verbose, + ) + print(f'Inquisitor configured from {config_path}') + print(f' {CONFIG_DATA} = {data_path}') + print(f' {CONFIG_SOURCES} = {source_path}') + print(f' {CONFIG_CACHE} = {cache_path}') + print(f' {CONFIG_LOGFILE} = {log_file}') + print(f' {CONFIG_VERBOSE} = {is_verbose}') + return 0 + + def command_update(args): """Fetch and store new items from the specified sources.""" parser = argparse.ArgumentParser(