examples moved to doc

This commit is contained in:
Ryan Huber 2014-11-17 21:22:37 -08:00
parent 3d07cf6ecf
commit f7a307c9dd
3 changed files with 25 additions and 0 deletions

9
doc/example/counter.py Normal file
View file

@ -0,0 +1,9 @@
import time
crontable = []
outputs = []
#crontable.append([.5,"add_number"])
crontable.append([5,"say_time"])
def say_time():
outputs.append(["D030GJLM2", time.time()])

8
doc/example/repeat.py Normal file
View file

@ -0,0 +1,8 @@
import time
crontable = []
outputs = []
def process_message(data):
if data['channel'].startswith("D"):
outputs.append([data['channel'], "from repeat1: " + data['text']])

8
doc/example/repeat2.py Normal file
View file

@ -0,0 +1,8 @@
import time
crontable = []
outputs = []
def process_message(data):
if data['channel'].startswith("D"):
outputs.append([data['channel'], "from repeat2: " + data['text']])