Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/youknowone/slackcode
General purpose slack outhook bot
https://github.com/youknowone/slackcode
Last synced: 29 days ago
JSON representation
General purpose slack outhook bot
- Host: GitHub
- URL: https://github.com/youknowone/slackcode
- Owner: youknowone
- Created: 2015-04-20T01:45:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-21T05:37:17.000Z (over 7 years ago)
- Last Synced: 2024-10-03T15:54:38.405Z (about 1 month ago)
- Language: Python
- Size: 12.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Add a simple compiler & interpreter for your slack
==================================================Disclaimer: This implementation is not very safe. Run it with only good people. At least run it on isolated and not very important servers.
Install
-------pip install -r requirements.txt
Run
---This is a WSGI app. You can demonize it with gunicorn or other similar tools.
In easier way:
./manage.py runserver 0.0.0.0
In this case, it is not demonized. Run it in screen or tmux.
Languages
---------See: https://github.com/youknowone/slackcode/blob/master/engine.py#L210
Interpreters or compilers must be installed and accessible in PATH.
Example
-------!save rot13 !py print string.translate('''{{:}}''', string.maketrans("ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz", "NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm"))
> !!rot13 Hello, World!
< Uryyb, Jbeyq!
> !!rot13 Uryyb, Jbeyq!
< Hello, World!!save 밯망희 !아희 밯망희
> !!밯망희 헬
< 54764!save 날씨 !py r = requests.get('http:' + '//www.kma.go.kr/wid/queryDFSRSS.jsp?zone=1141058500'); s = bs4.BeautifulSoup(r.text).find('data'); x = u'{}시 기온: {} 기상: {} 풍향: {}'.format(s.find('hour').text, s.find('temp').text, s.find('wfkor').text, s.find('wdkor').text); print x.encode('utf-8')
> !!날씨
< (diverse for every running)