diff options
Diffstat (limited to 'kayleevc')
-rw-r--r-- | kayleevc/util.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kayleevc/util.py b/kayleevc/util.py index 5155d06..7984dc3 100644 --- a/kayleevc/util.py +++ b/kayleevc/util.py @@ -43,34 +43,34 @@ class Config: self._make_dir(self.data_dir) # Set up the argument parser - self.parser = ArgumentParser() - self.parser.add_argument("-i", "--interface", type=str, + self._parser = ArgumentParser() + self._parser.add_argument("-i", "--interface", type=str, dest="interface", action='store', help="Interface to use (if any). 'g' for GTK or 'gt' for GTK" + " system tray icon") - self.parser.add_argument("-c", "--continuous", + self._parser.add_argument("-c", "--continuous", action="store_true", dest="continuous", default=False, help="Start interface with 'continuous' listen enabled") - self.parser.add_argument("-p", "--pass-words", + self._parser.add_argument("-p", "--pass-words", action="store_true", dest="pass_words", default=False, help="Pass the recognized words as arguments to the shell" + " command") - self.parser.add_argument("-H", "--history", type=int, + self._parser.add_argument("-H", "--history", type=int, action="store", dest="history", help="Number of commands to store in history file") - self.parser.add_argument("-m", "--microphone", type=int, + self._parser.add_argument("-m", "--microphone", type=int, action="store", dest="microphone", default=None, help="Audio input card to use (if other than system default)") - self.parser.add_argument("--valid-sentence-command", type=str, + self._parser.add_argument("--valid-sentence-command", type=str, dest="valid_sentence_command", action='store', help="Command to run when a valid sentence is detected") - self.parser.add_argument("--invalid-sentence-command", type=str, + self._parser.add_argument("--invalid-sentence-command", type=str, dest="invalid_sentence_command", action='store', help="Command to run when an invalid sentence is detected") @@ -78,7 +78,7 @@ class Config: self._read_options_file() # Parse command-line arguments, overriding config file as appropriate - self.parser.parse_args(namespace=self.options) + self._parser.parse_args(namespace=self.options) def _make_dir(self, directory): if not os.path.exists(directory): |