main
This commit is contained in:
parent
5c2c3b4b95
commit
9880c175a6
|
@ -7,23 +7,26 @@ from .commands.process_command import ProcessCommand, add_process_command, get_p
|
|||
from .commands.copy_command import CopyCommand, add_copy_command, get_copy_args
|
||||
from .commands.transcode_command import TranscodeCommand, add_transcode_command, get_transcode_args
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="chaos's musicutil")
|
||||
subparsers = parser.add_subparsers(dest="subparser_name")
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="chaos's musicutil")
|
||||
subparsers = parser.add_subparsers(dest="subparser_name")
|
||||
add_copy_command(subparsers)
|
||||
add_process_command(subparsers)
|
||||
add_transcode_command(subparsers)
|
||||
add_genhtml_command(subparsers)
|
||||
|
||||
add_copy_command(subparsers)
|
||||
add_process_command(subparsers)
|
||||
add_transcode_command(subparsers)
|
||||
add_genhtml_command(subparsers)
|
||||
args = parser.parse_args()
|
||||
|
||||
args = parser.parse_args()
|
||||
if args.subparser_name == "process":
|
||||
ProcessCommand(get_process_args(args)).run()
|
||||
elif args.subparser_name == "copy":
|
||||
CopyCommand(get_copy_args(args)).run()
|
||||
elif args.subparser_name == "transcode":
|
||||
TranscodeCommand(get_transcode_args(args)).run()
|
||||
elif args.subparser_name == "genhtml":
|
||||
GenHTMLCommand(get_genhtml_args(args)).run()
|
||||
|
||||
if args.subparser_name == "process":
|
||||
ProcessCommand(get_process_args(args)).run()
|
||||
elif args.subparser_name == "copy":
|
||||
CopyCommand(get_copy_args(args)).run()
|
||||
elif args.subparser_name == "transcode":
|
||||
TranscodeCommand(get_transcode_args(args)).run()
|
||||
elif args.subparser_name == "genhtml":
|
||||
GenHTMLCommand(get_genhtml_args(args)).run()
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in a new issue