From b1181283ca30ccb4c63b2a9e2dd9bc9d22c6fb5a Mon Sep 17 00:00:00 2001 From: Hellow Date: Sat, 15 Apr 2023 19:24:23 +0200 Subject: [PATCH] cli option to print all music kraken paths --- src/music_kraken/__init__.py | 13 +++++++++++-- src/music_kraken/__main__.py | 11 +++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/music_kraken/__init__.py b/src/music_kraken/__init__.py index c45e74e..db687b8 100644 --- a/src/music_kraken/__init__.py +++ b/src/music_kraken/__init__.py @@ -7,8 +7,8 @@ import gc import musicbrainzngs from . import objects, pages -from .utils import exception -from .utils.config import config, read, write +from .utils import exception, shared +from .utils.config import config, read, write, PATHS_SECTION from .utils.shared import MUSIC_DIR, MODIFY_GC, NOT_A_GENRE_REGEX, get_random_message from .utils.string_processing import fit_to_file_system @@ -59,6 +59,15 @@ def exit_message(): print("See you soon! :3") +def paths(): + print(f"Temp dir:\t{shared.TEMP_DIR}\n" + f"Music dir:\t{shared.MUSIC_DIR}\n" + f"Log file:\t{shared.LOG_PATH}") + print() + print_cute_message() + print() + + def settings( name: str = None, value: str = None, diff --git a/src/music_kraken/__main__.py b/src/music_kraken/__main__.py index b0a6f83..3d03bc5 100644 --- a/src/music_kraken/__main__.py +++ b/src/music_kraken/__main__.py @@ -46,6 +46,13 @@ if __name__ == "__main__": action="store_true" ) + parser.add_argument( + "--paths", + "-p", + help="Prints an overview over all music-kraken paths.", + action="store_true" + ) + arguments = parser.parse_args() if arguments.verbose or arguments.test: @@ -61,6 +68,10 @@ if __name__ == "__main__": music_kraken.settings() exit() + if arguments.paths: + music_kraken.paths() + exit() + # getting the genre genre: str = arguments.genre if arguments.test: