look in user dirs
This commit is contained in:
parent
b78eef2c77
commit
15c08a7de5
6
uquiz
6
uquiz
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys, os, json, hashlib
|
||||
import sys, os, json, hashlib, subprocess
|
||||
|
||||
motd="""
|
||||
\033c
|
||||
|
@ -19,7 +19,9 @@ if len(sys.argv) < 2:
|
|||
print('run with the uquiz file as an arg to start')
|
||||
sys.exit()
|
||||
|
||||
filename=sys.argv[1]+'.json'
|
||||
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]
|
||||
|
||||
print('Using "{}"! wrong quiz file? specify a complete path (make sure your quiz file is in a .uquiz/ in a homedir)'.format(filename))
|
||||
|
||||
answers = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue