fixed readme formatting and added two excepts for the mode modifier

This commit is contained in:
deadvey
2026-03-29 20:15:20 +01:00
parent 0b0baf21b2
commit 7f49d241d8
2 changed files with 16 additions and 14 deletions

View File

@@ -1,13 +1,13 @@
All these options overide configuration in config.json
**--wpm, -w <int>**
set the rate of dictation, defaults to 50, note: this is not exact as it measures the time between words in order to avoid a very short gap after a long word.
**--mode, -m <mode> <mod>**
Sets a mode, one of 'timed', 'words','quote' or 'file' followed by an optional modifier representing either the time (in seconds) or the number of words, or the quote ID, or the file name.
**--language, -l <language>**
Selects a language, defaults to english, must be a listed language in -i
**--list-quotes, -q**
Lists the available quotes and exits
**--list-languages, -i**
Lists the installed languages and exits
**--help, -h**
Output's this help text and exits
All these options overide configuration in config.json<br/>
**--wpm, -w <int>**<br/>
set the rate of dictation, defaults to 50, note: this is not exact as it measures the time between words in order to avoid a very short gap after a long word.<br/>
**--mode, -m <mode> <mod>**<br/>
Sets a mode, one of 'timed', 'words','quote' or 'file' followed by an optional modifier representing either the time (in seconds) or the number of words, or the quote ID, or the file name.<br/>
**--language, -l <language>**<br/>
Selects a language, defaults to english, must be a listed language in -i<br/>
**--list-quotes, -q**<br/>
Lists the available quotes and exits<br/>
**--list-languages, -i**<br/>
Lists the installed languages and exits<br/>
**--help, -h**<br/>
Output's this help text and exits<br/>

View File

@@ -11,8 +11,10 @@ def handle_arguments(arguments, config):
config['mode'] = arguments[index+2]
try:
config['mode_modifier'] = int(arguments[index+3])
except:
except ValueError:
config['mode_modifier'] = arguments[index+3]
except IndexError:
config.pop('mode_modifier',None)
case '--list-languages'|'-i':
languages = os.listdir('languages')
for lang in languages: