diff --git a/uquiz b/uquiz index d910835..a047b62 100755 --- a/uquiz +++ b/uquiz @@ -15,12 +15,27 @@ uquiz is a simple user based quiz engine print(motd) -if len(sys.argv) < 2: - print('run with the uquiz file as an arg to start') +if len(sys.argv) < 2 or sys.argv[1] == 'help': + print(""" + Hi, welcome to uquiz, lickthecheese's userdir based assessment engine. + + To get started, type in a test name as the first argument of this + command, or make your own test by making a json file in your ~/.uquiz + + There is not much documentation at the moment of how to make a uquiz + compatable file, however you can just look at examples until i make + some docs lol + """) sys.exit() + + filename=subprocess.run(['bash -c "find /home/*/.uquiz/* | grep \'{}\' | head -n 1"'.format(sys.argv[1])], shell=True, stdout=subprocess.PIPE).stdout.decode('utf-8')[:-1] +if not filename: + print('Whoops! I cant find that quiz, try specifying the absolute path.') + sys.exit() + print('Using "{}"! wrong quiz file? specify a complete path (make sure your quiz file is in a .uquiz/ in a homedir)\n'.format(filename)) answers = []