ABTech / zdaemon

ABTech zdaemon slack/zulip bot
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link
bot chatbot python python3 slack slack-bot zdaemon zulip zulip-bot

This is zdaemon.

It is the python version, since few have survived looking at the legacy perl version.

Configuration

Configuration of maintainers, directories, and class name need to be made in zdaemon.json (see sample file). Additionally, a zuliprc from the bot config on zulip must be provided (possibly via the --config-file parameter)

It is recommended you get a baseline set of the data files from production to get a good sample of data to work with. Failing this, you will need to create ppdata.sqlite and cube.sqlite using the schemas described in plusplus.py and cube.py respectively. You will also want to have at least one cube slurped before things start to act normal. Finally, sending a single cube may be required to fully fill in the data.

Docker Deployment

Deployments need to provide the zuliprc, zdaemon.json, and triggers.yaml config files, as well as the data directory where zdaemon will keep its databases.

There is a sample Docker Compose YAML file you can also examine, compose.yml.sample.

Slack Bot Config

To configure the slack bot, create a new app at https://api.slack.com. The repository has a sample manifest describing the needed scopes and permissions in slack-bot.yaml.sample (but you probably want to change the bot name).

Triggers

The production triggers file is not available in the public repository, however a sample file (triggers.yaml.sample) is available to see how to create new triggers.

Credits

License

Copyright (c) 2024, AB Tech
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.