Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nh2/lambdabot-zulip
Lambdabot for Zulip Chat
https://github.com/nh2/lambdabot-zulip
haskell zulip-bot
Last synced: 2 months ago
JSON representation
Lambdabot for Zulip Chat
- Host: GitHub
- URL: https://github.com/nh2/lambdabot-zulip
- Owner: nh2
- Created: 2018-11-20T17:26:37.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-20T22:13:26.000Z (about 6 years ago)
- Last Synced: 2024-09-17T06:24:37.056Z (4 months ago)
- Topics: haskell, zulip-bot
- Language: Haskell
- Homepage:
- Size: 14.6 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# lambdabot-zulip
A [`lambdabot`](https://wiki.haskell.org/Lambdabot)-like bot for [Zulip](https://zulipchat.com/).
Can evaluate Haskell expressions and show their types.
### Screenshot
![Screenshot of the bot in action](images/evaluation-screenshot.png)
## Usage
Run the `lambdabot-zulip-server` executable to start the bot.
It reads a `settings.yaml` in the working directory (or passed via command line).
See [`example-settings/settings.yaml`](example-settings/settings.yaml) for an example.
You have to provide Zulip API credentials, and streams (channels) the bot should be active on.## Systemd unit
For the simple case that you want to run this in a small throwaway VM server as `root`, here's a systemd unit file.
It assumes that you have the repo cloned at `/root/lamdabot-zulip` and did `stack build` in there.
Put this into `/etc/systemd/system/lambdabot-zulip-server.service`:
```
[Unit]
Description=Lambdabot Zulip server
After=syslog.target network.target
StartLimitIntervalSec=0[Service]
ExecStart=/usr/local/bin/stack "exec" "lamdabot-zulip-server"
WorkingDirectory=/root/lambdabot-zulip
Restart=always
Environment="HOME=/root"
MemoryMax=1G[Install]
WantedBy=multi-user.target
```Note that you can't `ExecStart` the executable directly due to https://github.com/gwern/mueval/issues/16#issuecomment-448707773.
To load the service and have it start at boot:
```
systemctl daemon-reload
systemctl enable lambdabot-zulip-server
systemctl start lambdabot-zulip-server
```