From d998bf616cce4871380f5bcd1c6a660f7e86a8ae Mon Sep 17 00:00:00 2001 From: Melon Bread Date: Mon, 15 Oct 2018 23:29:44 -0400 Subject: [PATCH] Initial argument support --- RetroUFO.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RetroUFO.py b/RetroUFO.py index c85731a..492fc04 100644 --- a/RetroUFO.py +++ b/RetroUFO.py @@ -7,6 +7,7 @@ __author__ = "Melon Bread" __version__ = "0.1.0" __license__ = "MIT" +import argparse import os import zipfile from shutil import rmtree @@ -19,7 +20,7 @@ PLATFORM = 'linux/x86_64' CORE_LOCATION = '~/.config/retroarch/cores/' -def main(): +def main(args): """ Where the magic happens """ download_cores() extract_cores() @@ -79,5 +80,8 @@ def clean_up(): if __name__ == "__main__": """ This is executed when run from the command line """ - main() + parser = argparse.ArgumentParser() + + args = parser.parse_args() + main(args) pass