diff options
author | Clayton G. Hobbs <clay@lakeserv.net> | 2015-12-30 23:33:29 -0500 |
---|---|---|
committer | Clayton G. Hobbs <clay@lakeserv.net> | 2015-12-30 23:33:29 -0500 |
commit | e19d76f0515b291f9c6994bfd0faccccf5b894aa (patch) | |
tree | db29ef0dbecee06e0788d9f72c9d327caa1b1479 /commands.tmp | |
parent | 57f58295a48dfa4d893eb1546c5f2f64133c0e7f (diff) |
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.
Diffstat (limited to 'commands.tmp')
-rw-r--r-- | commands.tmp | 10 |
1 files changed, 6 insertions, 4 deletions
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) & |