trigger example

This commit is contained in:
Davide Alberani 2015-04-18 15:02:20 +02:00
parent 331d01dab1
commit 75c83067d6

19
data/triggers-available/echo.py Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env python
"""echo.py - Simply echo the environment and the stdin."""
import os
import sys
import json
def main():
print 'STDIN JSON:', json.loads(sys.stdin.read())
print ''
print 'ENV:', os.environ
if __name__ == '__main__':
try:
main()
except Exception, e:
print 'echo.py error: %s' % e
pass