Browse Source

Remove the pass_words option

Since Kaylee now supports Python plugins that can do arbitrary things
with spoken words, the pass_words option for shell commands seems
somewhat less necessary than before.  I never liked it in the first
place, because it was all-or-nothing: there was no non-hackish way to
pass the spoken words to only specific commands.  If I ever see a
compelling reason for this feature to come back, it may be
re-implemented in the form of a second shell plugin that passes words to
its commands.
Clara Hobbs 7 years ago
parent
commit
d7fb99707f
2 changed files with 0 additions and 12 deletions
  1. 0
    7
      kayleevc/plugins/shell.py
  2. 0
    5
      kayleevc/util.py

+ 0
- 7
kayleevc/plugins/shell.py View File

40
                 subprocess.call(self.options['valid_sentence_command'],
40
                 subprocess.call(self.options['valid_sentence_command'],
41
                                 shell=True)
41
                                 shell=True)
42
             cmd = self.commands[text]
42
             cmd = self.commands[text]
43
-            # Should we be passing words?
44
-            # TODO: configuration changes to make this not ridiculous
45
-            if self.options['pass_words']:
46
-                cmd += " " + text
47
             self._run_command(cmd)
43
             self._run_command(cmd)
48
             # TODO: Logging can be handled along with valid_sentence_command
44
             # TODO: Logging can be handled along with valid_sentence_command
49
             #self.log_history(text)
45
             #self.log_history(text)
55
                                 shell=True)
51
                                 shell=True)
56
             cmd = self.commands[numt]
52
             cmd = self.commands[numt]
57
             cmd = cmd.format(*nums)
53
             cmd = cmd.format(*nums)
58
-            # Should we be passing words?
59
-            if self.options['pass_words']:
60
-                cmd += " " + text
61
             self._run_command(cmd)
54
             self._run_command(cmd)
62
             #self.log_history(text)
55
             #self.log_history(text)
63
             return True
56
             return True

+ 0
- 5
kayleevc/util.py View File

53
                 action="store_true", dest="continuous", default=False,
53
                 action="store_true", dest="continuous", default=False,
54
                 help="Start interface with 'continuous' listen enabled")
54
                 help="Start interface with 'continuous' listen enabled")
55
 
55
 
56
-        self._parser.add_argument("-p", "--pass-words",
57
-                action="store_true", dest="pass_words", default=False,
58
-                help="Pass the recognized words as arguments to the shell" +
59
-                " command")
60
-
61
         self._parser.add_argument("-H", "--history", type=int,
56
         self._parser.add_argument("-H", "--history", type=int,
62
                 action="store", dest="history",
57
                 action="store", dest="history",
63
                 help="Number of commands to store in history file")
58
                 help="Number of commands to store in history file")

Loading…
Cancel
Save