say.py allow passing args to espeak
This commit is contained in:
7
say.py
7
say.py
@@ -17,7 +17,7 @@ def say(message):
|
|||||||
if platform == "darwin":
|
if platform == "darwin":
|
||||||
os.system("say " + args + " '" + message + "' 2>/dev/null")
|
os.system("say " + args + " '" + message + "' 2>/dev/null")
|
||||||
elif platform == "linux" or platform == "linux2":
|
elif platform == "linux" or platform == "linux2":
|
||||||
os.system("echo '" + message + "' | espeak 2>/dev/null")
|
os.system("echo '" + message + "' | espeak " + args + " 2>/dev/null")
|
||||||
|
|
||||||
|
|
||||||
def prof_post_chat_message_display(jid, message):
|
def prof_post_chat_message_display(jid, message):
|
||||||
@@ -83,14 +83,15 @@ def prof_init(version, status, account_name, fulljid):
|
|||||||
synopsis = [
|
synopsis = [
|
||||||
"/say on|off|active",
|
"/say on|off|active",
|
||||||
"/say args <args>",
|
"/say args <args>",
|
||||||
|
"/say clearargs",
|
||||||
"/say test <message>"
|
"/say test <message>"
|
||||||
]
|
]
|
||||||
description = "Read all messages out loud"
|
description = "Read all messages out loud"
|
||||||
args = [
|
args = [
|
||||||
[ "on|off", "Enable/disable say for all windows" ],
|
[ "on|off", "Enable/disable say for all windows" ],
|
||||||
[ "active", "Enable say for active window only" ],
|
[ "active", "Enable say for active window only" ],
|
||||||
[ "args <args>", "Arguments to pass to 'say' command on OSX" ],
|
[ "args <args>", "Arguments to pass to command" ],
|
||||||
[ "clearargs <args>", "Clear 'say' command arguments on OSX" ],
|
[ "clearargs <args>", "Clear command arguments" ],
|
||||||
[ "test <message>", "Say message" ]
|
[ "test <message>", "Say message" ]
|
||||||
]
|
]
|
||||||
examples = []
|
examples = []
|
||||||
|
|||||||
Reference in New Issue
Block a user