Giter VIP home page Giter VIP logo

goodbot's Introduction

goodbot Build Status CodeQL

A chat(help)bot for Wikimedia Zulipchat.

Directory guide

  • goodbot
    • bots
      • goodbot.py Zulip chatbot
      • ircbot.py Zulip-IRC bridgebot
      • parsebot.py GitHub bot that dynamically parses pages
    • config
      • config.json Parameterized values modifiable with goodbot
    • templates
      • faq.json FAQs for matching
      • projects.json Automatically generated by parsebot
      • replies.json Templated replies
    • app.py Web app that serves the landing page and webhooks
    • index.html Landing page for goodbot

Installation

It is recommended you use a virtual environment for building the project (such as Python's venv or the virtualenv module) to easily manage dependencies.

$ git clone [email protected]:QEDK/goodbot.git
$ cd goodbot
$ pip3 install -r requirements.txt

Dependencies for parsebot and the web app are found in requirements-parsebot.txt and requirements-web.txt respectively. Tests won't pass unless the latter file is installed.

$ pip3 install -r requirements-parsebot.txt
$ pip3 install -r requirements-web.txt

For running tests (you need to install flake8 beforehand for linting), run these commands inside the goodbot directory and it will automatically run the tests for you:

$ flake8 --ignore=W191,E117,E501 bots
$ nosetests

Basic configuration

goodbot will work with the zuliprc file provided by Zulip, provided that the template and configuration files are accessible and in valid JSON schema. ircbot uses a modified zuliprc-style file along the lines of:

[api]
email[email protected]
key=topsecretapikey
site=https://wikimedia.zulipchat.com

[irc]
server=irc.freenode.net
nickname=ircnick
channel=#ircchannel
nickserv_password=yourtopsecretpassword
stream=zulipstreamtobridge
topic=topicofstreamtobridge

Note the added [irc] section. It's also possible to use the same Zulip credentials (bot account basically) for both the bots and use one file.

Running the bots

The bots are essentially Python scripts at its core, so you would run it as you would run a normal script on your system, for e.g. from the goodbot directory:

$ python3 bots/goodbot.py

Running the web app

The web app requires usual Flask setup like:

$ export FLASK_APP=app.py
$ flask run
 * Running on http://127.0.0.1:5000/

Detailed instructions are available in Flask docs.

Advanced configuration and documentation

Further documentation exists on the wiki.

Style guidelines

Style guidelines are available on the wiki.

License

Licensed under either of

at your option.

The documentation is released under the GFDL license v1.3 or later.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the LGPL-3.0 license, shall be dual licensed as above, without any additional terms or conditions.

goodbot's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar pavithraes avatar qedk avatar srish avatar xsavitar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

goodbot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.