Draft organizer

This commit is contained in:
Jakob Moser 2025-06-01 09:59:11 +02:00
parent 9450e8d54f
commit a29d52856c
Signed by: jakob
GPG Key ID: 3EF2BA2851B3F53C
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import argparse
from pathlib import Path
def get_parser(module_name: str, description: str) -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
prog=f"python3 -m karaokatalog.{module_name}",
description=description,
)
parser.add_argument(
"library_path",
type=Path,
help="The directory which contains the songs, the one you'd also configure UltraStar Deluxe to use",
)
return parser

View File

View File

@ -0,0 +1,23 @@
import logging
from karaokatalog.get_parser import get_parser
from karaokatalog.Library import Library
logging.basicConfig(
format="%(asctime)s [%(levelname)s] %(message)s", level=logging.INFO
)
if __name__ == "__main__":
args = get_parser(
"organize", "Organize UltraStar Deluxe song libraries"
).parse_args()
logging.info("Karaokatalog Organization started")
logging.info("Loading library")
library = Library.from_dir(args.library_path)
logging.info("Library loaded")
# TODO
logging.info("Karaokatalog Organization done")