Use configuration file

This commit is contained in:
Ales (Shagi) Zabala Alava 2020-11-07 10:31:48 +01:00
parent f1d5292177
commit 4bac2acc79
1 changed files with 7 additions and 5 deletions

View File

@ -4,12 +4,14 @@ name = 'karaoke'
help_text = 'GUI for negromate karaoke'
def options(parser):
def options(parser, config, **kwargs):
parser.add_argument(
'song_folder', type=Path,
help="Folder with the song database.")
'-s', '--song_folder', type=Path,
default=config['global']['song_folder'],
help="Folder with the song database, defaults to {}".format(
config['global']['song_folder']))
def run(args):
def run(args, **kwargs):
from ..karaoke import main
main(args.song_folder)
main(args.song_folder.expanduser())