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:
deadvey
2026-03-30 14:32:43 +01:00
parent fea01154f3
commit 21345481b4
3 changed files with 111 additions and 208 deletions

View File

@@ -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):