Merge pull request #210 from TheDen/add-show-config-db-info

add flag to show configuration and db info
This commit is contained in:
Vitiko 2023-05-14 01:04:51 -04:00 committed by GitHub
commit b89ba3be3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -150,6 +150,12 @@ def main():
if arguments.reset:
sys.exit(_reset_config(CONFIG_FILE))
if arguments.show_config:
print(f"Configuation: {CONFIG_FILE}\nDatabase: {QOBUZ_DB}\n---")
with open(CONFIG_FILE, "r") as f:
print(f.read())
sys.exit()
if arguments.purge:
try:
os.remove(QOBUZ_DB)

View File

@ -149,6 +149,12 @@ def qobuz_dl_args(
action="store_true",
help="purge/delete downloaded-IDs database",
)
parser.add_argument(
"-sc",
"--show-config",
action="store_true",
help="show configuration",
)
subparsers = parser.add_subparsers(
title="commands",