Commit b1f11dfe authored by jezra's avatar jezra

Added 'execute once' commandline argument

parent 3f0c6b41
......@@ -133,6 +133,10 @@ class Blather:
print cmd, shell=True)
#now that we have executed, should we quit?
if self.options['execute_once']:
def recognizer_finished(self, recognizer, text):
t = text.lower()
#is there a matching command?
......@@ -206,6 +210,10 @@ if __name__ == "__main__":
action="store_true", dest="continuous", default=False,
help="starts interface with 'continuous' listen enabled")
parser.add_option("-x", "--execute-once",
action="store_true", dest="execute_once", default=False,
help="execute one command and then quit")
parser.add_option("-p", "--pass-words",
action="store_true", dest="pass_words", default=False,
help="passes the recognized words as arguments to the shell command")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment