Welcome to OTR bot’s documentation!

The bot exists of four modules:

  • The OTR Bot module that runs an XMPP client that communicates with peers, to teach them how to enable and verify OTR connections.
  • The OTR Plugin module that enables the use of OTR with SleekXMPP.
  • A State Machine that executes actions and handles events.
  • A Learning Tools Interoperability (LTI) interface to be able to start talking with the OTR bot from a Learning Management System (LMS).

Quick Start

  • It is recommended to start by creating a virtualenv environment for the bot. The bot uses external python libraries that are fixed on a certain version. The easiest way to ensure that nothing else on your system breaks when installing these dependencies, is by using a virtual environment.
  • Install python-dev in order to be able to install all dependencies. On debian-based systems, run apt-get install python-dev.
  • Run pip install -r requirements.txt to fulfill all python requirements.
  • By default, the environment in settings/env.py is set to production. This means it searches for production.py in the settings folder. Alter this environment, or the production.py file:
    • The XMPP_ACCOUNTS dictionary should at least contain one valid jabber account. Its JID should be the key, its value a dictionary with the contents ‘password’, ‘private_key’, ‘SSL’, ‘port’ and ‘allow_plain_text’.
    • Enter the JID of one of the accounts in XMPP_ACCOUNTS in XMPP_DEFAULT_ACCOUNTS. This is the default account to start the bot with. If you don’t have a default account, always start the bot with the –jid flag.
  • Start the bot by running ./bot.py runclient. Run ./bot.py runclient –help for information on the available arguments. Other subcommands are available as well. Run python bot.py –help for more information.

Indices and tables