Skip to content

Commit

Permalink
add flag to show configuration and db info
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDen committed Apr 27, 2023
1 parent fb5944a commit 0749553
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qobuz_dl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions qobuz_dl/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ def qobuz_dl_args(
action="store_true",
help="purge/delete downloaded-IDs database",
)
parser.add_argument(
"-c",
"--show-config",
action="store_true",
help="show configuration",
)

subparsers = parser.add_subparsers(
title="commands",
Expand Down

0 comments on commit 0749553

Please sign in to comment.