Fixed how quote IDs are read as argument and change the flag for listing quotes.
Added some more english & spanish quotes
This commit is contained in:
4
args.py
4
args.py
@@ -16,13 +16,13 @@ def handle_arguments(arguments, config):
|
||||
case '--filename'|'-f':
|
||||
config['filename'] = arguments[index+2]
|
||||
case '--quote'|'-q':
|
||||
config['quoteid'] = arguments[index+2]
|
||||
config['quoteid'] = int(arguments[index+2])
|
||||
case '--list-languages'|'-i':
|
||||
languages = os.listdir('languages')
|
||||
for lang in languages:
|
||||
print(lang.replace('.json',''))
|
||||
exit()
|
||||
case '--list-quotes'|'-q':
|
||||
case '--list-quotes'|'-u':
|
||||
with open(f'quotes/{config['language']}.json') as file:
|
||||
quotes = json.load(file)
|
||||
for index,quote in enumerate(quotes):
|
||||
|
||||
Reference in New Issue
Block a user