From e19d76f0515b291f9c6994bfd0faccccf5b894aa Mon Sep 17 00:00:00 2001 From: "Clayton G. Hobbs" Date: Wed, 30 Dec 2015 23:33:29 -0500 Subject: Added number parsing capabilities See commands.tmp for an example. It's pretty neat, but it could still use some work. I thought of a really clever way to parse numbers, better than the one I came up with last night, but since I have a working implementation now I figure I'd better commit it. We have a new bug which causes the dictionary to be updated every time the program starts. I hope I didn't force that to happen last night or something, but I have a vague feeling I did. --- commands.tmp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'commands.tmp') diff --git a/commands.tmp b/commands.tmp index 9e41147..10fa2c5 100644 --- a/commands.tmp +++ b/commands.tmp @@ -1,5 +1,7 @@ -# commands are key:value pairs -# key is the sentence to listen for -# value is the command to run when the key is spoken +# commands are pars of the form: +# KEY: VALUE +# KEY is the sentence to listen for +# VALUE is the command to run when the key is spoken -hello world:echo "hello world" +hello world: echo "hello world" +start a %d minute timer: (echo {0} minute timer started && sleep {0}m && echo {0} minute timer ended) & -- cgit 1.4.1