fixed readme formatting and added two excepts for the mode modifier
This commit is contained in:
26
README.md
26
README.md
@@ -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/>
|
||||
|
||||
4
args.py
4
args.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user