Coder Social home page Coder Social logo

perdu / panu Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 114 KB

A Jabber (XMPP) bot with tons of functionalities, e.g. saying sentences in the appropriate context

License: GNU General Public License v3.0

Python 79.19% PHP 1.82% Dockerfile 1.36% Shell 10.67% Jinja 6.96%
xmpp xmpp-bot python python3 slixmpp

panu's Introduction

panu

A Jabber (XMPP) bot. You can tell him quotes and it will reuse them in the appropriate context. It can compute how funny people in the room are according to other people's smileys, shorten URL and display the page's title... How cool is that?

Coded in English, talks in French.

Status: actively used and maintained (2020).

Commands

Commandes disponibles :

!backup : génère une backup de la base de données.
!battle : sélectionne un choix au hasard.
!cancel : Annule l'ajout d'une citation.
!cyber [<proba>] : Active le cyber-mode cyber.
!delete : Supprime la dernière citation.
!feature add|list|del : ajouter une demande de feature ou lister toutes les demandes.
!help : affiche les commandes disponibles
!isit <nick> : Deviner de qui est la citation précédente.
!pb [nick|date] : affiche les points-blague.
!quiet : Rendre le bot silencieux.
!quote [add] [<nick>]|search <recherche> : Citation aléatoire.
!quotes [sum [<nick>]|list] : Donne toutes les citations d'un auteur.
!related : Donne une citation en rapport.
!speak [less|more|<nombre>] : diminue/augmente la fréquence des citations aléatoires.
!truth : révèle une vérité absolue sur le monde.
!who : Indique de qui est la citation précédente.
!why : Indique ce qui a provoqué la citation précédente.
!! <nom> = <def> : ajouter une définition.
?? <nom> : lire une définition.

Dependencies

  • slixmpp : python-slixmpp-git from AUR (archlinux)
  • mysql/mariadb
  • python-sqlalchemy
  • python-mysqldb (debian) / python-mysqlclient from AUR (archlinux)
  • python-urllib3
  • python-lxml
  • python-certifi
  • a web server for the URL shortener

Install

Basic configuration

  • copy panu.conf.example to panu.conf
  • Create an XMPP account an indicate the JID and password in panu.conf
  • Indicate room and server to be joined in panu.conf

Easy install (Docker)

First, copy env.example to .end and edit it with your configuration. Then, run:

./setup_docker.sh
sudo docker-compose -f docker-compose.yml up --build

Manual install

Database
  • create a mariadb database, a user and give access rights for the database to the user
  • enter related configuration in the Database section of panu.conf
URL shortener (optional)

Place shortener/index.php on a web server you own. Optionally, you can use mine (default config)

Ansible role

There is also an ansible role to install new instances of the bot as a systemd service. It's not a full install, but it's useful to deploy new instances of the bot or pull latest version of the repo on running instances (see readme).

panu's People

Contributors

dependabot[bot] avatar perdu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.