#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8:ft=python # # Bad Witch # Copyright © 2020 Vintage Salt # # Distributed under terms of the MIT license. # import argparse import sys class BadWitch: def __init__(self): # Set up arguments self.argparser = argparse.ArgumentParser(description='Manage a declarative music library through YouTube scraping') self.argparser.add_argument('-c', '--config', metavar='c', nargs=1, help='Override default configuration file with this one') self.argparser.add_argument('-d', '--download-all', dest='downloadall', action='store_true', help='Download all songs declared in the songs file') self.argparser.add_argument('-v', '--verbose', action='store_true', help='Show more status messages') def execute(self): self.args = self.argparser.parse_args() if self.args.verbose: print(self.args.config) print(self.args.downloadall) print(self.args.verbose) badwitch = BadWitch() badwitch.execute()