Jabbot is an easily extensible chat robot written in java.
It supports connection to multiple servers & chat systems, and a pluggable chatroom command system and focus on extensibility.
Jabbot consists of 3 projects:
Bindings can be written using jabbot-binding api and are currently stored under the
bindings directory.
Extensions can be written using jabbot-extension-api and are currently stored under the extensions directory.
CGI Extensions can be written using in any language you want. Scripts and their json configuration are currently stored under the scripts directory.
Script Extensions can also be written the in chat language. Declaring a sub will result in a new bot function being created. Any existing bot command (regardless of implementation) can be called as a function. See the project Searle Script for information on the language syntax.
There is also a collection of script commands you can install, check them out in the Snippet Archive
Installing it via APT
Tested on Ubuntu Bionic
sudo apt-get install apt-transport-https ca-certificates echo "deb [trusted=yes] https://dl.bintray.com/midoricorp/deb unstable main" > /etc/apt/sources.list.d/midoricorp-jabbot.list sudo apt-get update sudo apt-get install jabbot-full
Configuring
Installing via apt will trigger genconf.pl being run. This will ask you which protocols and bindings you want to use.
If you make a mistake during this phase, simply delete or fix /etc/jabbot/saved_values.ini and invoke dpkg-reconfigure jabbbot
. See "Per-Protocol Configuration Details" for advice on how to configure each protocool.
Logs
logs for jabbot can be found in /var/log/jabbot/
Build debs from master
Tested on Ubuntu Bionic
sudo apt-get install git ca-certificates git clone https://github.com/midoricorp/jabbot.git cd jabbot sudo apt-get install build-essential fakeroot devscripts equivs sudo mk-build-deps --install --tool 'apt-get --yes --no-install-recommends' --remove sudo rm ../jabbot*_all.deb sudo dpkg-buildpackage -uc -us cd .. apt install ./jabbot*_all.deb
Build it by hand
Assuming you have git, java 8, jsvc and maven2 installed
host$ git clone https://github.com/midoricorp/jabbot.git host$ cd jabbot/ host$ mvn clean install -Pstandalone,all host$ cd jabbot-daemon/target/ host$ tar -xzf jabbot-daemon-<version>.tar.gz host$ cd ../../
Configure it
apt-get install libjson-perl libconfig-simple-perl ./genconf.pl mv jabbot.json jabbot-daemon/target/jabbot-daemon-<version>/conf/
Start it
host$ cd jabbot-daemon/target/jabbot-daemon-<version>/ host$ bin/jabbot.sh start
Jabbot can be configured by editing the main config file jabbot.json under the conf/ directory.
The config file consists in the following main areas
"bindings":[ { "name":"XMPP", "className":"org.wanna.jabbot.binding.xmpp.XmppBinding" } ]
Defines a list of available binding type such as xmpp, irc..
"serverList":[ { "type" : "XMPP", "identifier" : "XMPP", "url":"jabber.hostname.com", "serverName":"hostname.com", "port":5222, "username":"Jabbot", "password":"password", "commandPrefix":"!", "parameters":{ "allow_self_signed":true, "ping_interval":600 }, "rooms":[ {"name":"test_room@conference.hostname.com","nickname":"Jabbot"} ], "commands":[ {"name":"help","className":"org.wanna.jabbot.command.HelpCommand"} ] } ]
Defines a list of servers to which Jabbot will connect
You can use ngrok that can generate public URLs for testing your chatbots. After downloading and installation type
./ngrok http 8080
then copy URL and paste it in variableparameters.webhook_url
Markdown in the Web Client (and possibly other clients) can break in chat scrpting. Be sure to either disable markdown in the client, or place the code you are scripting into a code block e.g.
!script
```
print "hello world!"
```
"commands":[ {"name":"jira","className":"org.wanna.jabbot.extensions.jira.IssueViewer", "configuration":{ "url":"https://jira.hostname.com", "username":"username", "password":"password" } } ]
Defines a list of availble commands for the parent object
If you want to quickly test your new extension, there's one special type of binding which allow you to start Jabbot without any configuration required.
The cli binding is a binding emulator which will just read from standard input, process the command and print the response on the console.
In order to use it, simply follow the same steps show in the quickstart section but start it as following
host$ bin/jabbotcli.sh
Owner
Contributors
Categories
Programming Languages
JavaLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community