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,10 +40,6 @@ class Plugin(PluginBase):
40 40
                 subprocess.call(self.options['valid_sentence_command'],
41 41
                                 shell=True)
42 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 43
             self._run_command(cmd)
48 44
             # TODO: Logging can be handled along with valid_sentence_command
49 45
             #self.log_history(text)
@@ -55,9 +51,6 @@ class Plugin(PluginBase):
55 51
                                 shell=True)
56 52
             cmd = self.commands[numt]
57 53
             cmd = cmd.format(*nums)
58
-            # Should we be passing words?
59
-            if self.options['pass_words']:
60
-                cmd += " " + text
61 54
             self._run_command(cmd)
62 55
             #self.log_history(text)
63 56
             return True

+ 0
- 5
kayleevc/util.py View File

@@ -53,11 +53,6 @@ class Config:
53 53
                 action="store_true", dest="continuous", default=False,
54 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 56
         self._parser.add_argument("-H", "--history", type=int,
62 57
                 action="store", dest="history",
63 58
                 help="Number of commands to store in history file")

Loading…
Cancel
Save